/**
 * defaultValue - Save default value of an input value
 *	http://richardvandermeer.nl
 *	Richard van der Meer
 *
 * version 0.1		october 2009
 *
 * Built on top of the jQuery library
 *   http://jquery.com
 *
 */
(function($) {

	$.fn.defaultValue = function() {

		return this.each(function() {

			$(this).data("originalText", $(this).val());

			$(this).blur(function() {
				if ($(this).val() == "") {
					$(this).val($(this).data("originalText"));
					$(this).removeClass("active");
				}
			});

			$(this).focus(function() {
				if ($(this).val() == $(this).data("originalText")) {
					$(this).val("");
				}
				$(this).addClass("active");
			});

		});

	}

})(jQuery);
