$("#nav img:not(.activePage)").hover(function (e) {
	$(this).attr('src', $(this).attr('src').replace(/\/images\/nav/, '/images/hover'));
}, function (e) {
	$(this).attr('src', $(this).attr('src').replace(/\/images\/hover/, '/images/nav'));
});
$("img#quote, .hoverButton").hover(function (e) {
	$(this).attr('src', $(this).attr("src").replace(/\.png/, "-hover.png"));
}, function (e) {
	$(this).attr('src', $(this).attr("src").replace(/\-hover\.png/, ".png"));
});
$("form#quote").submit(function() {
	var data = $(this).serializeArray();
	var form = "";
	switch(data[1].value) {
		default:
			switch(data[0].value) {
				default:
					if(siteVersion == "maif") {
						onlineOverlay(2);
						return false;
					} else
						form = "./forms/auto_quote_request_md.html";
					break;
				case "dc":
					form = "./forms/auto_quote_request_dc.html";
					break;
			}
			break;
		case "cycle":
			form = "./forms/motorcycle_quote_request_mddc.html";
			break;
	}
	window.open(form);
	return false;
});
$("#quoteOnline").click(function() {
	$("form#quote").submit();
	return false;
});
$(function(){$(document).pngFix();});
function onlineOverlay(num) {
	if(typeof num == "undefined")
		$("#onlineOverlay, #onlineOverlayContent").hide();
	else {
		$("#onlineOverlayContent > div > div").hide();
		$("#onlineOverlay, #onlineOverlayContent, #onlineOverlayContent > div > div[data-num='" + num + "']").show();
	}
}
