(function(A){A.fn.inputHintBox=function(B){B=A.extend({},A.inputHintBoxer.defaults,B);this.each(function(){new A.inputHintBoxer(this,B)});return this};A.inputHintBoxer=function(K,O){var H,J=H=A(K),E,I=false,C;if((J.attr("type")=="radio"||J.attr("type")=="checkbox")&&J.parent().is("label")){H=A(J.parent())}function N(){var P=O.html!=""?O.html:O.source=="attr"?J.attr(O.attr):"";if(typeof P==="undefined"){P=""}E=O.div!=""?O.div.clone():A("<div/>").addClass(O.className);E=E.css("display","none").addClass("_hintBox").appendTo(O.attachTo);C=O.func?O.func:null;if(O.div_sub==""){E.html(P)}else{A(O.div_sub,E).html(P)}J.focus(function(){if(C){C()}A("body").mousedown(D);L()}).blur(function(){B()})}function G(){var P=H.position(),R=P.left+H.width()+O.incrementLeft+5+(A.browser.safari?5:(A.browser.msie?10:(A.browser.mozilla?6:0))),Q=P.top+O.incrementTop+(A.browser.msie?14:(A.browser.mozilla?8:0));E.css({position:"absolute",top:Q,left:R})}function L(){G();E.fadeIn("slow")}function B(){A("body").click(M);if(I){return }A.inputHintBoxer.mostRecentHideTimer=setTimeout(function(){F()},300)}var M=function(Q){var P=A(Q.target),R="._hintBox";clearTimeout(A.inputHintBoxer.mostRecentHideTimer);if(P.parents(R).length==0&&P.is(R)==false){F()}};var D=function(Q){var P=A(Q.target),R="._hintBox";I=(P.parents(R).length!=0||P.is(R)!=false)};function F(){A("body").unbind("click",M);A("body").unbind("mousedown",D);G();E.fadeOut("slow")}N();return{}};A.inputHintBoxer.mostRecentHideTimer=0;A.inputHintBoxer.defaults={div:"",className:"input_hint_box",source:"attr",div_sub:"",attr:"title",html:"",incrementLeft:5,incrementTop:0,attachTo:"body"}})(jQuery);
