jQuery(document).ready(function(){

//jQuery(function() {
 // jQuery('.error').hide();
  jQuery('input.input').css({backgroundColor:"#FFFFFF"});
  jQuery('input.input').focus(function(){
    jQuery(this).css({backgroundColor:"#FFDDAA"});
  });
  jQuery('input.input').blur(function(){
    jQuery(this).css({backgroundColor:"#FFFFFF"});
  });

  jQuery(".submit_button").click(function() {
		// validate and process form
		// first hide any error messages
  //  jQuery('.error').hide();
		
	   var name = jQuery("input#name").val();
	   var email = jQuery("input#email").val();
	   var phone = jQuery("input#phone").val();
			
		var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone;
		//alert (dataString);return false;
		
		jQuery.ajax({
      type: "POST",
      url: "bin/process.php",
      data: dataString,
      success: function() {
        jQuery('#frm_cont').html("<div id='message'></div>");
        jQuery('#message').html("<img id='checkmark' src='images/check.png' />")
        .append("<h2 id='cont_head'>Your Request has been received.</h2><p></p><p id='cont_p'>Thank You. You should hear back from one of our representatives within 24 hours</p><br/><p>Go back to <a href='index.html'>Home Page</a></p>")
        .hide()
        .fadeIn(1500, function() {
		});		  
      }
     });

    return false;
	});
});
runOnLoad(function(){
  jQuery("input#name").select().focus();
});
