$(function() {
	$(document).pngFix();
	
	$(".navigation").lavaLamp({
		fx: "backout",
		speed: 500
	});
	
	$(".banner").easySlider({
		auto: true,
		pause: 8000,
		speed: 500,
		continuous: false,
		controlsShow: false
	});
	
	$(".box.slide").hover(function(){
		$(".headshot", this).stop().animate({ top: "80px" }, { queue: false, duration: 200 });
	}, function() {
		$(".headshot", this).stop().animate({ top: "0px"}, { queue: false, duration: 200 });
	});
});
	
function formSignup() {
	var Name = $("#Name").val();
	var Email = $("#Email").val();
	var Questions = $("#Questions").val();
	var Code = $("#Code").val();
	
	if (Name == "") {
		alert("Please enter your name.");

	} else if (Name.length < 6) {
		alert ("Please enter your full name!");
		
	} else if (Email == "") {
		alert("Please enter your email address.");

	} else if (Email.length < 6) {
		alert ("Please enter a working email address!");

	} else if (Code.length > 4) {
		alert ("Your promotional code shouldn't be longer than four digits long.");
		
	} else {
		$.post("/assets/p_signups.php", { Name: Name, Email: Email, Questions: Questions, Code: Code }, function (data) {
			$(".feedback").show();
			$("#Submit").attr("disabled", "disabled");
		});
	}
	
	return false;
}

function formContact() {
	var Name = $("#Name").val();
	var Email = $("#Email").val();
	var Message = $("#Message").val();
	
	if (Name == "") {
		alert("Please enter your name.");

	} else if (Name.length < 6) {
		alert ("Please enter your full name!");
		
	} else if (Email == "") {
		alert("Please enter your email address.");

	} else if (Email.length < 6) {
		alert ("Please enter a working email address!");
		
	} else if (Message == "") {
		alert("Please enter a message too!");
		
	} else {
		$.post("/assets/p_contact.php", { Name: Name, Email: Email, Message: Message }, function (data) {
			$(".feedback").show();
			$("#Submit").attr("disabled", "disabled");
		});
	}
	
	return false;
}