  $(function() {
	$('.error').hide();  
    $(".button").click(function() {
      // validate and process form here
	   $('.error').hide();  
	   $(".button").attr("value", "Processing");
	   $('.button').attr('disabled', 'disabled');
      var name = $("input#name").val();  
        if (name == "") {  
		  $("label#form_error").show();			
		  $("input#name").focus();  
		  $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');
		  return false;  
		}  
        var email = $("input#email").val();  
        if (email == "") {  
		  $("label#form_error").show();  
		  $("input#email").focus(); 
 $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');		  
		  return false;  
		}  
        var phone = $("input#phone").val();  
        if (phone == "") {  
		  $("label#form_error").show();  
		  $("input#phone").focus(); 
 $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');		  
		  return false;  
		}  
		
		
		var call = $("input#call").val();  
        if (call == "") {  
		  $("label#form_error").show();  
		  $("input#call").focus();
 $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');		  
		  return false;  
		} 
		
		var loc = $("input#loc").val();  
        if (loc == "") {  
		  $("label#form_error").show();  
		  $("input#loc").focus();  
		   $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');
		  return false;  
		} 
		
		var desc = $("textarea#desc").val();  
        if (desc == "") {  
		  $("label#form_error").show();  
		  $("textarea#desc").focus();  
		   $(".button").attr("value", "Send");
		  $('.button').removeAttr('disabled');
		  return false;  
		} 
		
		// var dataString = "name=" + name + "&email=" + email + "&phone=" + phone + "&call=" + call + "&loc=" + loc + "&desc=" + desc;
	  //alert (dataString);return false;
	  $.ajax({
		type: "POST",
		url: "includes/process2.asp",
		data: $("form").serialize(),
		success: function() {
		  $('#contact_form').html("<div id='message'></div>");
		  $('#message').html("<h2><img id='checkmark' src='images/accept.png' />Request Submitted</h2>")
		  .append("<p>If you entered a valid email address, you should get a confirmation email within the hour. We will contact you within two business days per your request. Thank you!</p>")
		  .hide()
		  .fadeIn(1500, function() {
			//$('#message').append("<img id='checkmark' src='images/accept.png' />");
		  });
		}
	  });
	  
	  
	  return false;
    });
  });
