/**
* @author Remy Sharp
* @url http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
* @modded to access textareas by tcs.
*/

(function ($) {

	$.fn.textHint = function (blurClass) {
  
  if (!blurClass) { blurClass = 'blur'; }
    
  return this.each(
  	
  	function () {
			// get jQuery version of 'this'
			var $text = $(this),
			
    	// capture the rest of the variable to allow for reuse
      $form = $(this.form),
      $win = $(window);
 
		 function remove() {
		 	if ($text.hasClass(blurClass)) {  $text.removeClass(blurClass); }
		 } //close remove
 
		// on blur, set value to title attr if text is blank
		$text.blur(function () {
			if($text.val() == '') { $text.addClass(blurClass); }
		}).focus(remove).blur(); // remove blur class on focus
		
  });// close each and it's function


	} // close blurClass function

})(jQuery);
