;$(function(){
    switchText = function()
    {
      if ($(this).val() == $(this).attr('title'))
        $(this).val('').removeClass('blur');
      else if ($.trim($(this).val()) == '')
        $(this).addClass('blur').val($(this).attr('title'));
    }
    $("form").each(function(){
      //this references the form
      var inputs = this.elements;
      var $hints = $($.grep(this.elements,function(a){ return a.nodeName === "INPUT" })); //cast elements to jQuery Objects
      $hints.each(function() {
        if ($.trim($(this).val()) == '') $(this).val($(this).attr('title'));
        if ($(this).val() == $(this).attr('title')) $(this).addClass('blur');
      }).focus(switchText).blur(switchText);
      
      /*$(this).submit(function() { 
        Moved to form validation area 
         $hints.each(function() { //Clear the help text on submit
          if ($(this).val() == $(this).attr('title')) $(this).val('').removeClass("blur");
        }); 
        return validate(inputs); //Validate
      });*/
    });
});


