$(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 email = $("input#email").val();
	if (email == "") {
		$("label#email_error").show();
		$("input#email").focus();
		return false;
	}	

	var name = $("input#name").val();
		if (name == "") {
      $("label#name_error").show();
      $("input#name").focus();
      return false;
    }


	var yemail = $("input#yemail").val();
	if (yemail == "") {
		$("label#yemail_error").show();
		$("input#yemail").focus();
		return false;
	}
	
	var baseUrl = $("input#baseUrl").val();
	var plantidSSS = $("input#plantidSSS").val();

		var msg = $("input#msg").val();
		if (msg == "") {
      $("label#msg_error").show();
      $("input#msg").focus();
      return false;
    }
		
		var dataString = '&email=' + email + '&name='+ name + '&yemail= ' + yemail  + '&msg=' + msg + '&baseUrl= ' + baseUrl + '&plantidSSS=' + plantidSSS ; 
		//alert (dataString);return false;
		
		$.ajax({
      type: "POST",
      url: "index.php?option=com_plants&view=plants&tmpl=component",
      data: dataString,
      success: function() {
		
        $('#contact_form').html("<div id='message'></div>");
        $('#message').html("An email has been sent to \n")
        .append(email)
        .hide()
        .fadeIn(1500, function() {
          $('#message').append("");
        });
      }
     });
    return false;
	});*/
});
runOnLoad(function(){
  $("input#name").select().focus();
});

