//full version and license can be found here: http://plugins.jquery.com/files/jquery.inlineFieldLabel.js.txt (function($){$.fn.inlineFieldLabel=function(options){var opts=$.extend({},$.fn.inlineFieldLabel.defaults,options);this.each(function(){$this=$(this);var o=$.metadata?$.extend({},opts,$this.metadata({type:opts.metadataType,name:opts.metadataName})):opts;innerFunction($this,o.label);});return this;};$.fn.inlineFieldLabel.defaults={label:'some placeholder',metadataType:'class',metadataName:'metadata'};function innerFunction(jqElement,fieldLabel){var textInput=null;var clonedTextInput=null;var strBefore="";var strAfter="";var counter=0;textInput=jqElement;if(textInput.attr('type')=='password'){clonedTextInput=textInput.clone();strBefore=clonedTextInput.append(textInput.clone()).html();strAfter=strBefore.replace('type="password"','type="text"');;strAfter.replace('type="password"','type="text"');textInput.after(strAfter);clonedTextInput=textInput.next();clonedTextInput.addClass("intra-field-label").val(fieldLabel);textInput.hide();}else{textInput.addClass("intra-field-label").val(fieldLabel);} if(clonedTextInput!=null){clonedTextInput.focus(function(){textInput.show();textInput.trigger('focus');clonedTextInput.hide();});} textInput.focus(function() {if(this.value==fieldLabel) {textInput.removeClass("intra-field-label").val("");};});textInput.blur(function() {if(this.value=="") {if(clonedTextInput!=null){textInput.hide();clonedTextInput.show();} else{textInput.addClass("intra-field-label").val(fieldLabel);}};});textInput.parents('form:first').find('input[type="submit"]').click(function(){if(clonedTextInput!=null){textInput.show();clonedTextInput.remove();} if(textInput.val()==fieldLabel) {textInput.removeClass("intra-field-label").val("");};});}})(jQuery);