/*
* Plugin: Textarea Hint // Version 1 // 11-9-2009
* Author: Eric Ditmer <http://ericditmer.com>
*/
(function ($) {
	$.fn.textareaHint = function(params) {
		var params = $.extend({
			hintColor: '#999999',	//Text color while hinting
			focusColor: '#353535',	//Text color while focused
			stayBlank: false		//If true, hint isn't displayed when input is blank
		}, params);
		
		return this.each(function() {
			var defaultText = $(this).val();
			
			$(this).focus(function() {
				if($(this).val() == defaultText) {
					$(this).val('').css("color", params.focusColor);
				}
			});
			$(this).blur(function() {
				if($(this).val() == "" && params.stayBlank == false) {
					$(this).val(defaultText).css("color", params.hintColor);
				}
			});
			
		});
	};
})(jQuery);
