/**
 * clearClick is setup to replace all clearclick functionality

*/
jQuery.fn.clearClick = function(){
	 this.each(function(i){//loop through all instances of function
	 	$(this).attr('_jqclearclick', $(this).val()); //set the default text to an attribute
	 	$(this).focus(function(){
			var val = $(this).attr("_jqclearclick");
			if(val == $(this).val())
				$(this).val('');
		});
		$(this).blur(function(){
			var val = $(this).attr("_jqclearclick");
			if('' == $(this).val())
				$(this).val(val);
		});
	 });
}
/*jQuery.fn.clearClick = function(){
	 this.each(function(i){//loop through all instances of function
	 	var $name = $(this).attr('name');
		var 
	 	var altel = $('<input type="text" tabindex="2" value="Password" name="'+$name+'_placeholder" id="pass_placeholder" class="inputtext  DOMControl_placeholder">')
		$(this).attr('_jqcp', 'jqcp_'+i); //set the default text to an attribute
		$(this).after(altel);
	 	
		$(altel).focus(function(){
			var $name = $(this).attr('name').replace("_placeholder");
			
			$(this).hide();
			$('');
		});
		
		$(this).blur(function(){
			var val = $(this).attr("_jqclearclick");
			if('' == $(this).val())
				$(this).val(val);
		});
	 });
}*/
jQuery(document).ready(function(){
	jQuery(".clearclick").clearClick();
});
