// Main JS
// Modern Blue

$(document).ready(function() {
	
	//video
	$("a#vlink").fancybox({
		'hideOnContentClick': false,
		'frameWidth': 476,
		'frameHeight' : 348,
		'overlayOpacity' : 0.8,
		'callbackOnClose': function() {
			$("#fancy_content").empty(); 
		}
	});	
	
	//zip search
	var zip = $("#zip");
	zip.focus(function() {
		if(zip.val() == "Your Zip") {
			zip.val('');	
		}
	});	
	
	$("#zipsearch").submit(function() {
		if( $("#zip",this).val() == "") {
			alert("Please enter your zip");
			var error = true;
			$("#zip",this).focus();	
		}
		
		if(error) {
			return false;
		}
		
	});
	
	//express request
	$("#expressForm").submit(function() {
		//if nothing redirect to get started
		var name  = $("input[name=name]",this).val();
		var email = $("input[name=email]",this).val();
		var phone = $("input[name=phone]",this).val();
		
		if(name == "" && email == "" && phone == "") {
			window.location = "get-started.php";
			return false;
		}
		
	});
	
});
						  