$(document).ready(function() {
	$('#infoBarBack').css('opacity','0.7');
	//$('.logoArea').css('opacity','0.9');
	$('#back').cycle();
	
	//$('form').fadeIn();
	
	$(function() {  
	  //$('.error').hide();  
	  $(".button").click(function() {  
		// validate and process form here  
	  			
		$('.error').hide();  
		  var name = $("input#name").val();  
			if (name == ""){  
		  		$("#name_error").show();
		  		$("input#name").focus();  
		  		$("input#name").css('background-color', '#09F');
				$("input#name").css('color', '#FFF');
		  		return false;  
			}  
			var email = $("input#email").val();  
			if (email == ""){  
		  		$("#email_error").show();  
		  		$("input#email").focus();
		  		$("input#email").css('background-color', '#09F');
				$("input#email").css('color', '#FFF');  
		  		return false;  
			}   
	  		var message = $("textarea#message").val();
			if (message == ""){
				$("#message_error").show();
				$("textarea#message").focus();
				$("textarea#message").css('background-color', '#09F');
				$("textarea#message").css('color', '#FFF');
				return false;
			}	
		
			var spam_mail = $("input#email2").val();	
	  
		var dataString = "name="+ name + "&email=" + email + "&spam_mail=" + spam_mail + "&message=" + message;  
		//alert (dataString);return false;  
		$.ajax({  
		  type: "POST",  
		  url: "send_contactTEST.php",  
		  data: dataString,  
		  success: function() {  
			$('#contactFormHolder').html("<div id='SubmitMessage'></div>");  
			$('#SubmitMessage').html("<h2>Contact Form Submitted!</h2>")  
			.append("<p>We will be in touch soon.</p>")  
			.hide()  
			.fadeIn(1500);  
		  }  
		});  
		return false;
	  
	  
	  
	  
	  });  
	});
	

});
