(function(){ jQuery.fn.inputlabel = function(value, cls){ var input = this; if( value == undefined ) value = input.attr('name'); if( cls == undefined ) cls = 'inputlabel'; this.val(value).addClass(cls); this.focus(function(){ input.removeClass(cls); if(input.val() == value) input.val(''); }); this.blur(function(){ if(input.val() == '') input.val(value).addClass(cls); }); if( this.parent('form') )