(function($) {
  
  $.fn.defaultValue = function(value) {
    
    return $.each(this, function(i, n) {
      var t = $(n);
      if (t.val() == '') t.val(value);
      t.focus(function() {
        if (t.val() == value) t.val('');
        else t.select();
      }).blur(function() {
        if (t.val() == '') t.val(value);
      });
    });
    
  }
  
})(jQuery);