//
// jQuery Default Text Value
// Version: 1.1
// Author Name: emarketed
// Author Website: http://www.emarketed.com
//
// ----------------------------
// USAGE:
// ----------------------------
//
// $('input[type=text], textarea').defaultText();
//

jQuery.fn.defaultText = function(options) {
	
	//begin plugin process
	return this.each(function() {
		var el = $(this);
		var oValue = $(el).attr('value');
		$(el).val(oValue)
			.focus(function() {
				if(jQuery.trim($(el).val())==oValue) {
					$(el).val('');
				}
			}).blur(function() {
				if(jQuery.trim($(el).val()).length<1) {
					$(el).val(oValue);
				}
			});
	});
	//end plugin process

};
