/**
 * jQuery --> Default Input Value
 * v1.0
 *
 * Sets the default value for an input field. Removing the content on 
 * focus and returning the value if the field is left empty
 *
 * @copyright	Start Creative, 2007
 * @author		Paul Campbell <pcampbell@zonecontent.com>
 *
 * @return		Array
 */
(function() {
	
	jQuery.fn.defaultvalue = function(value) {
		
		var elements = this;
		
		//////////////////////// Apply ////
		
		return(
			elements.each(function() {
				
				var el = $(this);
				var default_val = value;
				
				el.val(default_val).focus(function() {
					if(el.val() == default_val) {
						el.val("");
					}
					el.blur(function() {
						if(el.val() == "") {
							el.val(default_val);
						}
					})
				});			
			})
			
		);		
	}
	
})(jQuery)