(function($){  
 $.fn.placeHolder = function() {  

  return this.each(function() { 	
    // su quale elemento è stato associato il plugin
  	var tipo = $(this)[0].nodeName.toLowerCase();	
	// se l'elemento è un form o div, applico il plugin a tutte le textbox presenti; in caso contrario solo alla textbox  
	var obj = ( tipo == 'form' || tipo == 'div'? tipo + ' input[type=text]' : $(this) );
   
	$(obj).focus(function(){ 
	  if($(this).val() == $(this).attr('defaultValue')){
		$(this).val('');
	  }
	});
	
	
	$(obj).blur(function(){
  
	  if($(this).val() == ''){
		$(this).val($(this).attr('defaultValue'));
	  } 
	  
	});});  
  

 };  
})(jQuery);  
