(function(a){a.fn.extend({defaultValue:function(b){return this.each(function(){var h=a(this),d=b||h.attr("rel");if(h.attr("type")=="password"){f()}else{e()}function f(){var i=c();i.insertAfter(h);h.hide();h.blur(function(){if(h.val().length<=0){i.show();h.hide()}})}function e(){g();h.keypress(function(){if(h.val().length>0){g()}}).blur(g).focus(function(){h.val()==d&&h.val("")});h.closest("form").submit(function(){h.val()==d&&h.val("")})}function g(){val=a.trim(h.val());if(val.length<=0||val==d){h.val(d).addClass("empty")}else{h.removeClass("empty")}}function c(){var i=a("<input />").attr({type:"text",value:d,"class":h.attr("class")+" empty",style:h.attr("style"),tabindex:h.attr("tabindex")});i.focus(function(){i.hide();h.show();setTimeout(function(){h.focus()},1)});return i}})}})})(jQuery);