/*
 *  Dev One (http://www.dev-one.com)
 *  Watermark jQuery plug-in
 *
 */

 (function($) {
	$.fn.watermark = function(css, text) {
		$(this).focus(function() {
			$(this).filter(function() {
				return $(this).val() == "" || $(this).val() == text
			}).removeClass(css).val("");
		});

		$(this).blur(function() {
			$(this).filter(function() {
				return $(this).val() == ""
			}).addClass(css).val(text);
		});
		
		var input = $(this);
		$(this).closest("form").submit(function() {
			input.filter(function() {
				return $(this).val() == text
			}).val("");
		});
		
		$(this).addClass(css).val(text);
	};
})(jQuery);
