$(function(){
	$('.error').hide();
	$(".button").click(function(){
		// validate and process form
		
		$('.error').hide();
			var email = $("input#email").val();
			if(email == ""){
				$("label#email_error").show();
				$("input#email").focus();
				return false;
			}
			
			var dataString = 'email=' + email;

			$.ajax({
				type: "POST",
				url: "process.php",
				data: dataString,
				success: function() {
					$('#formContainer').html("<div id='contactMessage'></div>");
					$('#contactMessage').html("<h3>Thank you for signing up!</h3>")
					.hide()
					.fadeIn(1500, function() {
				  });
				}
			  });
			  return false;  
  
			
	});
});