(function($) {
	$.fn.prompt = function(settings) {
		settings = $.extend({}, $.fn.prompt.defaults, settings);
		
		return this.each(function() {
			function promptUser(event) {
				if ( this.value == "" || this.value == this.alt ) {
					$(this).addClass(settings.promptClass);
					this.value = this.alt;
				}
			}
			
			function clearPrompt(event) {
				if ( this.value == this.alt ) {
					this.value = "";
					$(this).removeClass(settings.promptClass);
				}
			}
			
			$(this).blur(promptUser).trigger('blur').focus(clearPrompt);
		});
	};
	
	$.fn.prompt.defaults = {
		promptClass: "prompt"
	};
})(jQuery);