/*
 * jQuery Default Value Script v1.1
 * http://www.emarketed.com/
 *
 * Copyright (c) 2010 emarketed.
 *
 * PARAMETERS:
 *
 * USAGE/EXAMPLE:
 *
 */

(function($) {
	
	$.fn.defaultValue = function(def) {

		return(this.each(function() {
			var el = $(this);
			el.val(def);
			el.focus(function() {
				if(jQuery.trim(el.val()) == def) {
					el.val("");
				}
			}); //end el.focus
			el.blur(function() {
				if(jQuery.trim(el.val()) == "") {
					el.val(def);
				}
			}); //end el.blur
		})); //end return this.each
	}; //end fn.defaultvalue
}) (jQuery);
