(function($) {  
  $.fn.defaultInputValue = function() {
  		// Loops over all specified elements and sets default value
		// from the title attribule.
		this.each(function() {
			if ($(this).val() == "") {
				$(this).val($(this).attr('title'));
			}
		});
		
		// If the value equals the title
		// it will be cleared when input is clicked.
  		$(this).click(function(){
    		if ($(this).attr('title') == $(this).val()) {
    			$(this).val('');
    		}
    	});
    	
    	// When input lose its focus
    	// and if the value is empty the default text specified in the title
    	// will be set as value.
    	$(this).blur(function(){
    		if ($(this).val() == '') {
    			$(this).val($(this).attr('title'));
    		}
    });
  };
})(jQuery);
