﻿(function($){$.fn.inputHint=function(options){return this.each(function(){var defaults={hintClass:"rubric",noSubmissionIfNoInput:false};options=$.extend(defaults,options);var $me=$(this);var myHint=$me.attr("title");if(!myHint)return;$me.parents("form:first").submit(function(event){if(($me.val().length<1)||($me.val()==myHint)){if(options.noSubmissionIfNoInput){event.stopPropagation();$("button").attr("disabled",false);return false;}
removeHint();}});var showHint=function(){$me.val(myHint).addClass(options.hintClass);};var removeHint=function(){$me.val("").removeClass(options.hintClass);};if(this.value.length<1)showHint();$me.focus(function(){if($me.val()==myHint)
removeHint();}).blur(function(){if($me.val().length<1)
showHint();}).end();if($.browser.mozilla&&!$me.attr("autocomplete")){setTimeout(function(){if($me.val()==myHint)removeHint();$me.blur();},10);};});};})(jQuery);
