/**
 * jPrompt, by Alexis Bouhet
 * La Haute Société (c) 2010
 * All Rights Reserved 
 */
(function ($) {
	$.fn.prompt = function (pPrompt, pClass) {
		this.each(function () {
			var t = $(this);
			var c = !pClass ? "prompted" : pClass;
			function update (e) {
				if (t.val() == pPrompt && e.type == 'focus')
					t.val('').removeClass(c);
				if ((t.val() == '' && e.type == 'blur') || (e.init && (t.val() == "" || t.val() == pPrompt)))
					t.val(pPrompt).addClass(c);
			}
			t.focus(update).blur(update);
			update({init: true});
		});
		return this;
	};
})(jQuery);
