$(document).ready(function() {

	// cqa side nav
	$("#cqa_side_nav .get_quotes").click(function() {
		var quoter = $("#cqa_side_nav_quoter").val();
		if (quoter != "") {
			var url = "http://www.kanetix.ca/ktxf-" + quoter;
			window.open(url,"ktxf");
		} else {
			alert("Please select a product from the list provided.");
		}
		return false;
	});

	// cqa focus
	$("form#cqa .get_quotes").click(function() {
		var quoter = $("#cqa_quoter").val();
		if (quoter != "") {
			var url = "http://www.kanetix.ca/ktxf-" + quoter;
			window.open(url,"ktxf");
		} else {
			alert("Please select a product from the list provided.");
		}
		return false;
	});
	
	// generic read more link
	$(".read_more_link").click(function() {
		$(".more_content").slideToggle(1000);
		return false;
	});
	
	// default cqa_quoter to current section
	var get_quotes = new Array();
	get_quotes['life-insurance'] = "life-insurance";
	get_quotes['critical-illness-insurance'] = "critical-illness-insurance";
	get_quotes['travel-health-insurance'] ="travel-insurance";
	get_quotes['travel-health-insurance-health'] = "health-insurance";
	get_quotes['travel-health-insurance-visitors'] = "visitors-to-canada-insurance";
	get_quotes['mortgage-loans'] = "mortgage-rates";

	$("#cqa_side_nav_quoter").val(get_quotes[$("body").attr("id")]);
	$("#cqa_quoter").val(get_quotes[$("body").attr("id")]);

});

	
function request_info(product){
	var win = window.open('/request-info?product='+product, 'request_info', 'toolbar=no,scrollbars=yes,width=420,height=300,resizable=yes');	
	win.focus();
	
}