$(document).ready(function(){
	$("p#intro-video").hide();
	$("a.video-pop").click(function(ev){
		ev.preventDefault();
		$("p#intro-video").show();
		return false;
	});
	$(".contact-i").keydown(function(){
		$("div.contactWarn").hide();
	});
	$("td.contactSubmit input").click(function(){
		var hasErrors=0;
		$(".contact-i").each(function(){
			var theInput=jQuery.trim($(this).val());
			if(theInput==""){
				$("div.contactWarn").fadeIn("slow");
				$(this).focus();
				hasErrors=1;
				return false;
			}
		});
		if(!hasErrors){
			$("td.contactSubmit").html("Sending email...");
			var dataString	="&rand="+Math.random();
			dataString	+="&theName="+encodeURIComponent($("input#name").val());
			dataString	+="&theContact="+encodeURIComponent($("input#contact").val());
			dataString	+="&theMessage="+encodeURIComponent($("textarea#message").val());
			$.ajax({
				type: "POST",
				url: "/wp-content/themes/dozumba.com/handsomemouse.php?requestType=contact_form",
				cache: false,
				data: dataString,
				success: function(data){
					window.location="/sent";
				},
				error: function(){
				}
			});
		}
	});
	//alert($(".footerbox-last").width());
});