/*
 * InpHelper 0.1
 * Copyright (c) 2009
 *
 * Used 
 	$(element).inputHelper({label : 'text'});
*/

jQuery.fn.extend({
	inputHelper: function(condiments) {
		
		var options = {
			
		}
		
		var condiment = jQuery.extend(options, condiments);
		
		return this.each(function() {
			
			$(this).attr('value', condiment.label);
			
			$(this).focus(function(){
				var curr = $(this).attr('value');
				if ( curr == condiment.label  )
					var curr = $(this).attr('value', '');
			});
			
			$(this).blur(function(){
				
				var curr = $(this).attr('value');
				if ( curr == '' )
					$(this).attr('value', condiment.label);
			});
		});
	}	
});
