$(document).ready(function() 
    {
    jQuery.validator.addMethod("default", function(value, element) 
    {
    
     switch (element.value) 
     {
      case "Your Full Name...":
          return false;
      case "Estimated Budget...":
          return false;
      default: return true;
     }
    });
    
    $("#gaq-form").validate(
    {
      rules: 
      {
       Name: "required default"
      }
    });
  	});

	
function validate()
{

	
	$isValid = $("#gaq-form").valid(); 
	
	if($isValid)
	{
			$("#status").css("color", "#53859f");
			$("#status").text("Sending...");
		$.post("/mail.php", { fullname: $("input[name=fullname]").val(), email: $("input[name=email]").val(), phone: $("input[name=phone]").val(), budget: $("input[name=budget]").val(), overview: $("textarea[name=overview]").val() },
			function(data){
				if(data=="sent")
				{
					$("#status").text("Thank you! I will respond back soon.");
					$("input[name=submit]").attr('disabled', 'disabled');	
				}
				else
				$("#status").text(data);
				
		});
		
			return false;
	}
	else
	{
		$("#status").css("color", "#f35858");
		$("#status").text("Form could not be processed due to following errors:");
		$("#fullname").select();
	}
	
}
