$(function() {


	/*$("#appointments-form #submit").hover(
		function () {
			$(this).attr("src", "images/btn-send-over.png");
		}, 
		function () {
			$(this).attr("src", "images/btn-send.png");
		}
	);*/

	
	$("#appointments-form #name").focus(function () {
		if($(this).val() == "Name") {
			$(this).val("");
		} 		
	});	
	$("#appointments-form #phone").focus(function () {
		if($(this).val() == "Telephone (required)") {
			$(this).val("");
		} 		
	});		
	$("#appointments-form #email").focus(function () {
		if($(this).val() == "Email") {
			$(this).val("");
		} 		
	});	
	$("#appointments-form #how").focus(function () {
		if($(this).val() == "How did you hear about us?") {
			$(this).val("");
		} 		
	});	
	$("#appointments-form #message").focus(function () {
		if($(this).val() == "Message") {
			$(this).val("");
		} 		
	});	
	
	$("#appointments-form #name").blur(function () {
		if($(this).val() == "") {
			$(this).val("Name");
		} 		
	});
	$("#appointments-form #phone").blur(function () {
		if($(this).val() == "") {
			$(this).val("Telephone (required)");
		} 		
	});	
	$("#appointments-form #email").blur(function () {
		if($(this).val() == "") {
			$(this).val("Email");
		}
	});	
	$("#appointments-form #how").blur(function () {
		if($(this).val() == "") {
			$(this).val("How did you hear about us?");
		} 		
	});	
	$("#appointments-form #message").blur(function () {
		if($(this).val() == "") {
			$(this).val("Message");
		} 		
	});
	
	var checkFor = "@"
	var validEmail = $("#appointments-form #email").val(); 	
	
	$("#appointments-form").submit(function () {	
		if($("#appointments-form #phone").val() == "" || $("#appointments-form #phone").val() == "Telephone (required)") {
			$("#appointments-form #phone").addClass("form-error");
			return false;
		} else {
			return true;
		}
	});

});