$(document).ready(function() {
	$(".main-navigation ul li:has(a.inactive)").each(function() {
		$("a",this).mouseover(function() {
			var strTemp = $("img",this).attr("src");
			$("img",this).attr("src",strTemp.replace("-off","-on"));
			delete strTemp;
		}).mouseout(function() {
			var strTemp = $("img",this).attr("src");
			$("img",this).attr("src",strTemp.replace("-on","-off"));
			delete strTemp;
		});
	});
});

function getResults() {
	var intResultTotal = 0;
	$("form input:checked").each(function() {
		intResultTotal += parseInt($(this).val());
	});
	if (intResultTotal >= 22) {
		tb_show("Your Results","#TB_inline?height=300&amp;width=300&amp;inlineId=points22",null);
	} else if (intResultTotal >= 15) {
		tb_show("Your Results","#TB_inline?height=300&amp;width=300&amp;inlineId=points15",null);
	} else if (intResultTotal < 15) {
		tb_show("Your Results","#TB_inline?height=300&amp;width=300&amp;inlineId=points10",null);
	}
	delete intResultTotal;
}

function validateForm() {
	if (($("#contactname").val() != "") || ($("#contactemail").val() != "")) {
		$("#contactform").submit();
	} else {
		alert("You must provide either an Email Address or Phone Number.");
	}
}