function JT_init(){$(".jTip").hover(function(){JT_show(this.href,this.id,$("#"+this.id).attr("jtip-title-text"))},function(){$("#JT").remove()}).click(function(){return false})} function JT_show(b,a,c){if(c==false)c="&nbsp;";b=document.documentElement;var d=(self.innerWidth||b&&b.clientWidth||document.body.clientWidth)-getAbsoluteLeft(a);b=getAbsoluteTop(a)-3;var e=$("#"+a).attr("jtip-popup-width");if(e==undefined)e=250;$("#"+a).bind("click",function(){return false});$("#"+a).css("cursor","pointer");if(d>e*1+75){$("body").append("<div id='JT' style='width:"+e*1+"px'><div id='JT_arrow_left'></div><div id='JT_close_left'>"+c+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>"); c=getElementWidth(a)+11;c=getAbsoluteLeft(a)+c}else{$("body").append("<div id='JT' style='width:"+e*1+"px'><div id='JT_arrow_right' style='left:"+(e*1+1)+"px'></div><div id='JT_close_right'>"+c+"</div><div id='JT_copy'><div class='JT_loader'><div></div></div>");c=getAbsoluteLeft(a)-(e*1+15)}switch($("#"+a).attr("jtip-mode")){case "text":a=$("#"+a).attr("jtip-inner-text");$("#JT_copy").attr("innerText",a);break;case "html":a=$("#"+a).attr("jtip-div-source");$("#JT_copy").attr("innerHTML",$("#"+a).attr("innerHTML")); break;case "url":a=$("#"+a).attr("jtip-url");$("#JT_copy").load(a)}$("#JT").css({left:c+"px",top:b+"px"});$("#JT").show()}function getElementWidth(b){x=document.getElementById(b);return x.offsetWidth}function getAbsoluteLeft(b){o=document.getElementById(b);for(oLeft=o.offsetLeft;o.offsetParent!=null;){oParent=o.offsetParent;oLeft+=oParent.offsetLeft;o=oParent}return oLeft} function getAbsoluteTop(b){o=document.getElementById(b);for(oTop=o.offsetTop;o.offsetParent!=null;){oParent=o.offsetParent;oTop+=oParent.offsetTop;o=oParent}return oTop}function parseQuery(b){var a={};if(!b)return a;b=b.split(/[;&]/);for(var c=0;c<b.length;c++){var d=b[c].split("=");if(!(!d||d.length!=2)){var e=unescape(d[0]);d=unescape(d[1]);d=d.replace(/\+/g," ");a[e]=d}}return a}function blockEvents(b){if(b.target)b.preventDefault();else b.returnValue=false};
