function totip_hd(){$("div[id='totip']").each(function(){if($(this).css("display")=="block"){$(this).hide()}})}function totip_hddl(A){if(A!=""){$("div."+A).remove()}setTimeout("totip_hd()",1000)}function totip_sh(D,B){totip_hddl(B);var A=D.charAt(0);if(A=="1"){A=D.substr(1);var C=$(A).attr("title");if(C!=""){$(A).totip({cont:C,className:B}).attr({title:""})}}else{$(D+"[title!='']").each(function(){var F=$(this);var E=F.attr("title");if(B==""){B="totip"}F.totip({cont:E,className:B}).attr({title:""})})}}(function(A){A.fn.totip=function(F,P){F=A.extend({cont:null,ajax:null,follow:true,auto:true,fadeIn:100,fadeOut:300,appendTip:document.body,degrade:false,offsetY:12,offsetX:10,style:{opacity:0.9},className:"totip",id:"totip",callBefore:function(T,S,R){},callAfter:function(T,S,R){},delay:500,timeout:50,cloneable:false},F||{});if(!F.style&&typeof F.style!="object"){F.style={};F.style.zIndex="1000"}else{F.style=A.extend({border:"1px solid #9B9B9B",background:"#edeef0",color:"#000",padding:"3px",zIndex:"1000",textAlign:"left"},F.style||{})}if(typeof P=="function"){F.callAfter=P||F.callAfter}F.style.display="none",F.style.position="absolute";var M,L,O,C,K={},B=true,E=false,N=false,Q=document.createElement("div"),G=(typeof document.body.style.maxWidth=="undefined")?true:false,J=(typeof A.talk=="function"&&typeof A.listen=="function")?true:false;if(F.id){Q.id=F.id}if(F.className){Q.className=F.className}F.degrade=(F.degrade&&G)?true:false;for(var D in F.style){Q.style[D]=F.style[D]}function I(R){if(R){if(F.degrade){A(Q).html(F.cont.replace(/<\/?[^>]+>/gi,""))}else{A(Q).html(F.cont)}}}if(F.ajax){A.get(F.ajax,function(R){if(R){F.cont=R}I(F.cont)})}function H(S){function T(U){if(M&&!F.cont){U.title=M;M=null}}function R(){if(!E&&F.auto){clearInterval(C);if(F.fadeOut){A(Q).fadeOut(F.fadeOut,function(){T(S)})}else{T(S);Q.style.display="none"}}if(typeof F.callAfter=="function"){F.callAfter(Q,S,F)}if(J){F=A.listen(F)}}if(F.timeout>0){O=setTimeout(function(){R()},F.timeout)}else{R()}}A(Q).hover(function(){E=true},function(){E=false;H(K)});if(J){F.key=Q;F.plugin="totip";F.channel="wayfarer";A.talk(F)}I(F.cont&&!F.ajax);A(Q).appendTo(F.appendTip);return this.each(function(){this.onmouseover=function(T){var S=this;clearTimeout(O);if(this.title&&!F.degrade&&!F.cont){M=this.title;this.title=""}if(F.cont&&F.degrade){this.title=Q.innerHTML}function R(){if(typeof F.callBefore=="function"){F.callBefore(Q,S,F)}if(J){F=A.listen(F)}if(F.auto){var U;if(F.cont){if(!F.degrade){U="block"}}else{if(M&&!F.degrade){A(Q).html(M);U="block"}else{U="none"}}if(U=="block"&&F.fadeIn){A(Q).fadeIn(F.fadeIn)}else{Q.style.display=U}}}if(F.delay>0){L=setTimeout(function(){R()},F.delay)}else{R()}};this.onmousemove=function(Y){var W=(Y)?Y:window.event,V=this;K=this;if(F.follow||B){var a=A(window).scrollTop(),b=A(window).scrollLeft(),X=W.clientY+a+F.offsetY,T=W.clientX+b+F.offsetX,Z=A(F.appendTip).outerHeight(),S=A(F.appendTip).innerHeight(),R=A(window).width()+b-A(Q).outerWidth(),U=A(window).height()+a-A(Q).outerHeight();X=(Z>S)?X-(Z-S):X;N=(X>U||T>R)?true:false;if(T-b<=0&&F.offsetX<0){T=b}else{if(T>R){T=R}}if(X-a<=0&&F.offsetY<0){X=a}else{if(X>U){X=U}}Q.style.top=X+"px";Q.style.left=T+"px";B=false}};this.onmouseout=function(){clearTimeout(L);var R=this;B=true;if(!F.follow||N||(F.offsetX<0&&F.offsetY<0)){setTimeout(function(){C=setInterval(function(){H(R)},1)},1)}else{H(this)}}})}})(jQuery);

