$(function() {
  $('.error').hide();
  $('input.text-input').css('backgroundColor', "#FFFFFF");
  $('input.text-input').focus(function(){
    $(this).css('backgroundColor', "#FFDDAA");
  });
  $('input.text-input').blur(function(){
    $(this).css('backgroundColor', "#FFFFFF");
  });

/*
  $(".button").click(function() {
		// validate and process form
		// first hide any error messages
    $('.error').hide();
		
	var name = $("input#name").val();
	if (name == "" || name == "name") {
      $("label#name_error").show();
	  alert('Please Enter Your Name');
      $("input#name").focus();
      return false;
    }
	
	var email = $("input#email").val();
	if (email == "" || email == "email address") {
      $("label#email_error").show();
	  alert('Please Enter a Valid Email Address');
      $("input#email").focus();
      return false;
    }
	
	var phone = $("input#phone").val();
	if (phone == "" || phone == "phone number") {
      $("label#phone_error").show();
	  alert('Please Enter Your Phone Number');
      $("input#phone").focus();
      return false;
    }
	var comments = $("textarea#comments").val();
		if (comments == "") {
      $("label#comments_error").show();
      $("textarea#comments").focus();
      return false;
    }
	var URL = $("input#URL").val();
		if (comments == "") {
      $("label#URL_error").show();
      $("input#URL").focus();
      return false;
    }
	
		var dataString = 'name='+ name + '&email=' + email + '&phone=' + phone + '&comments=' + comments + '&URL=' + URL;
		//alert (dataString);return false;
		
	$.ajax({
      type: "POST",
      url: "/bin/process.php",
      data: dataString,
      success: function() {
		$('#submit_btn').css('visibility', 'hidden');
        $('#contact_form').html("<div id='message'></div>");
        $('#message').html("<p>Thank you for your request!<br>Someone will contact you shortly.</p>")
        //.append("<p>Thank you for your request!.<br>Someone will contact you shortly.</p>")
        .hide()
        .fadeIn(1500, function() {
          //$('#message').append("<img id='checkmark' src='images/check.png' />");
        });
      }
     });
     
    return false;
	
	});
	*/
});

/*runOnLoad(function(){
  $("input#name").select().focus();
}); */
