jQuery.fn.extend({
	autotip: function(options) {
		return this.each(function() {
			new jQuery.AutoTip(this, options);
		});
	}
});


jQuery.AutoTip = function(container, options) {

	var settings = {
	text: 'Enter a value',
	color: '#ccc'
	};

if(options) $.extend(settings, options);
	
	$(container).focus(function(){
		if($(this).val()==settings['text']){
			$(this).val('');
		}
		$(this).css('color','#000');
	});

	$(container).blur(function(){
		if($(this).val()==''){
			$(this).val(settings['text']);
			$(this).css('color',settings['color']);
		}
	});
	
	$(container).blur();
};
