/*
txgReplacePasswordInput
Replaces password input types with text to let you show a message within it. Once the user clicks on it, the original password field is restored. If the user leaves it empty, then the substitution will occour again.

Usage:

$('input[type=password]').txgReplacePasswordInput({
	show_text : 'Insert you password'
});

For more info: http://simonelippolis.com
*/

jQuery.fn.txgReplacePasswordInput=function(options){var options=jQuery.extend({show_text:'Password'},options);function trim(txt){return txt.replace(/^\s+|\s+$/g,'');}
return this.each(function(){if(jQuery(this).val().length==0){var $pos=jQuery(this).position();var $style=jQuery(this).attr('style');var $class=jQuery(this).attr('class');var $size=jQuery(this).attr('size');var $id=jQuery(this).attr('id');var $name=jQuery(this).attr('name');jQuery(this).hide();jQuery(this).after('<input type="text" id="txgrpl-'+$id+'" name="txgrpl-'+$name+'" size="'+$size+'" class="'+$class+'" style="'+$style+'" value="'+options.show_text+'" rel="'+$id+'" title="'+options.show_text+'" />');$('#txgrpl-'+$id).focus(function(){$(this).hide();var $id=$(this).attr('rel');$('#'+$id).show().focus();});}
jQuery(this).blur(function(){if(trim(jQuery(this).val())==''||jQuery(this).val()==undefined){var $id=jQuery(this).attr('id');jQuery(this).hide();$('#txgrpl-'+$id).show();}});});};