jQuery(function(){ graytext.start(); });
var graytext = {
   e: null,
   start: function(){
      jQuery('input[type="text"].graytext').each(function(){
         var b=jQuery(this);
         graytext.set_text(b,b.attr('title')||b.attr('value'));
      });
   },
   set_text: function(e,t){
      if(e) this.e=jQuery(e)
      else this.e=e;
      this.e.attr('title',t)
      .attr('value', t).css('color','gray')
      .unbind('click').bind('click', function(){
         var b=jQuery(this);
         if(b.attr('value')==b.attr('title')) {b.removeAttr('value');b.css('color','black');} 
         
         return false;
      }).unbind('blur').bind('blur', function(){
         var b=jQuery(this);
         if(!b.attr('value')) {b.attr('value', b.attr('title'));b.css('color','gray');} return false
      }); return this;
   }
}