-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathext20210522.js
13 lines (13 loc) · 53.5 KB
/
ext20210522.js
1
2
3
4
5
6
7
8
9
10
11
12
13
var paperlink2_d=document;var pubget_fail_once_fallback=0;const guestApiKey2015 = 'MjAxNTEwMDVhZzBvYXNmdzAzODJ3ZDNvcTBsMWxpd3o';const tpl2themeColor=['cream','green','blue'];//'light','dark'
var paperlink2_agt=navigator.userAgent.toLowerCase(),paperlink2_ime_is_ie=(paperlink2_agt.indexOf("msie")!==-1&&paperlink2_d.all);var paperlink2_styles='.paperlink2_found{text-decoration:underline;cursor:pointer;padding-left:.2rem;padding-right:.2rem}.Off{display:none !important}.Right{width:280px;float:right;overflow:hidden}.eSumP{font-size:12px;line-height:17px;padding:5px 0 3px}.eSumP:before{content: "- "}.eSumP>span{color:#666666}.eSumP>u{cursor:pointer}.eSumP>a{text-decoration:none;color:#999999}.hor-minimalist-a{width:400px;border-collapse:collapse;text-align:center;margin-bottom:5px;border:0}.hor-minimalist-a th{font-size:12px;font-weight:bold;border-bottom:2px solid;border-top:2px solid;padding:2px 0 1px;border-left:0;border-right:0;background-color:transparent;text-align:left}.hor-minimalist-a tbody{border-bottom:2px solid}.hor-minimalist-a td{font-size:12px;padding:2px 0 1px;border:0;background-color:transparent;text-align:left}.hor-minimalist-a tbody tr:hover td{text-decoration:underline}';if(paperlink2_ime_is_ie){paperlink2_d.createStyleSheet().cssText=paperlink2_styles}else{var paperlink2_css=paperlink2_d.createElement("style");paperlink2_css.setAttribute("type","text/css");paperlink2_css.appendChild(paperlink2_d.createTextNode(paperlink2_styles));paperlink2_d.body.appendChild(paperlink2_css)}var paperlink2_base="https://2.thepaperlink.com/",thepaperlink_base="https://www.thepaperlink.com/";var paperlink2_st=paperlink2_d.createElement("script");paperlink2_st.setAttribute("type","text/javascript");paperlink2_st.setAttribute("src",thepaperlink_base+"static/head.load.096.js");paperlink2_d.body.appendChild(paperlink2_st);var paperlink2_currentTrns,paperlink2_currentId,paperlink2_currentSearch,paperlink2_timer;var paperlink2_loadHeadAttempts=5;var paperlink2_loadingMsg=' loading... <img src="'+thepaperlink_base+'static/load.gif" width="16" height="11"/>';var paperlink2_notSupportedMsg="oops, this site is not supported";var call_by_jsClient=true;if(paperlink2_d.getElementById("thepaperlink_canvas_facebook")){call_by_jsClient=false}if(typeof window.needInfo==="undefined"){window.needInfo=function(c,a){var b=confirm("\n\nwant more information about this item?\n");if(b){jq183Tpl.ajax({type:"POST",url:thepaperlink_base,data:{pmid:c,apikey:a,action:"more_info"},success:function(){jq183Tpl("#thepaperlink_C"+c).fadeOut("fast")}})}}}if(typeof window.reportWrongLink==="undefined"){window.reportWrongLink=function(c,a){var b=confirm("\n\nthe pdf link of this item is wrong: are you sure?\n");if(b){jq183Tpl.ajax({type:"POST",url:thepaperlink_base,data:{pmid:c,apikey:a,action:"wrong_link"},success:function(){jq183Tpl("#thepaperlink_B"+c).fadeOut("fast")}})}}}if(typeof window.emailIt==="undefined"){window.emailIt=function(c,a,zzz){var b=confirm("\n\nemail the abstract of this paper to you?\n");if(b){jq183Tpl.ajax({type:"POST",url:thepaperlink_base,data:{pmid:c,apikey:a,cc:zzz,action:"email"},success:function(){jq183Tpl("#thepaperlink_A"+c).fadeOut("fast")}})}}}if(typeof window.email_pdf==="undefined"){window.email_pdf=function(f,b,d){var a=jq183Tpl("#thepaperlink_A"+f).html(),c={apikey:b},e=null;if(d){c={apikey:b,no_email:1}}else{e=confirm("\nEmail the pdf of this paper to you?\n\nCaution: it might fail, then only the abstract will be sent ["+a+"]\n")}if(e||d){jq183Tpl.ajax({url:thepaperlink_base+"file/new",dataType:"jsonp",data:c,success:function(h){var j=document.getElementById("thepaperlink_hidden"+f),g=document.createEvent("Event");g.initEvent("email_pdf",true,true);j.innerText=h;if(!d){jq183Tpl("#thepaperlink_D"+f).fadeOut("fast")}else{jq183Tpl("#thepaperlink_save"+f).addClass("no_email")}j.dispatchEvent(g)}})}}}if(typeof window.show_me_the_money==="undefined"){window.show_me_the_money=function(e,d,zzz){var f=jq183Tpl("#"+e+"> div.thepaperlink"),g;f.append(' <span id="thepaperlink_A'+e+'" class="thepaperlink-home" onclick="emailIt(\''+e+"','"+d+"','"+zzz+"')\">email it</span>");if(jq183Tpl("#thepaperlink_pdf"+e).length){if(jq183Tpl("#thepaperlink_hidden"+e).length&&!jq183Tpl("#thePaperLink_chrome_limited").length){f.append('<span id="thepaperlink_D'+e+'" class="thepaperlink-home" onclick="email_pdf(\''+e+"','"+d+"',0)\">email it</span>");jq183Tpl("#thepaperlink_A"+e).html(jq183Tpl.browser.version);jq183Tpl("#thepaperlink_A"+e).addClass("Off")}f.append('<span id="thepaperlink_B'+e+'" class="thepaperlink-home" onclick="reportWrongLink(\''+e+"','"+d+"')\">wrong link?</span>")}f.append('<span id="thepaperlink_C'+e+'" class="thepaperlink-home" onclick="needInfo(\''+e+"','"+d+"')\">more info?</span>");jq183Tpl("#thepaperlink_rpt"+e).remove()}}if(typeof window.saveIt_pubmeder==="undefined"){window.saveIt_pubmeder=function(e,b,d){var c={apikey:b,email:d,pmid:e},a=setTimeout(function(){if(a){alert("please visit http://pubmeder.cailiang.net/input?apikey="+b+"&email="+d+"&pmid="+e);clearTimeout(a)}},10000);jq183Tpl.getJSON("https://pubmeder-hrd.appspot.com/input?callback=?",c,function(f){clearTimeout(a);if(f.respond>1){jq183Tpl("#thepaperlink_saveAll").fadeOut("fast")}if(f.input.search(/,/)>=0){jq183Tpl.each(f.input.split(","),function(g,h){jq183Tpl("#thepaperlink_save"+h).fadeOut("fast")})}else{jq183Tpl("#thepaperlink_save"+f.input).html("done");jq183Tpl("#thepaperlink_save"+f.input).fadeOut("slow")}}).error(function(){alert("please visit http://pubmeder.cailiang.net/input?apikey="+b+"&email="+d+"&pmid="+e)})}}if(typeof window.saveIt_thepaperlink==="undefined"){window.saveIt_thepaperlink=function(b,a){jq183Tpl.ajax({type:"POST",url:thepaperlink_base+"api",data:{pmid:b,apikey:a},success:function(){jq183Tpl("#thepaperlink_save"+b).html("done");jq183Tpl("#thepaperlink_save"+b).fadeOut("slow")}})}}if(typeof window.saveIt==="undefined"){window.saveIt=function(e,a,b,c,d){jq183Tpl("#thepaperlink_save"+e).html("trying");if(a&&b){saveIt_pubmeder(e,a,b)}if(c&&d){saveIt_thepaperlink(e,c)}}}function paperlink2_finalMsg(a){alert(a)}function paperlink2_eFetch(d){jq183Tpl(".abs"+d).toggleClass("Off");if(!jq183Tpl(".abs"+d).text()){jq183Tpl(".abs"+d).html(paperlink2_loadingMsg);var c={apikey:atob(guestApiKey2015),db:"pubmed",id:d},b="",a=setTimeout(function(){if(a){jq183Tpl(".abs"+d).toggleClass("Off");alert("Failed to get the abstract.\r\nPlease visit http://www.ncbi.nlm.nih.gov/pubmed/"+d+"/?tool=thepaperlink");clearTimeout(a)}},10000);jq183Tpl.getJSON("https://www.thepaperlink.com/entrezajax/efetch?callback=?",c,function(e){clearTimeout(a);if(e.result&&e.result.PubmedArticle[0].MedlineCitation.Article.Abstract){b=e.result.PubmedArticle[0].MedlineCitation.Article.Abstract.AbstractText;jq183Tpl(".abs"+d).html("<span>"+b+"</span>")}else{jq183Tpl(".abs"+d).html("<span>[ no abstract found via efetch ]</span>")}}).error(function(){jq183Tpl(".abs"+d).toggleClass("Off");alert("Failed to get the abstract.\r\nPlease visit http://www.ncbi.nlm.nih.gov/pubmed/"+d+"/?tool=thepaperlink")})}}function paperlink2_eSum_xml(b,a){jq183Tpl.ajax({type:"GET",url:"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&tool=thepaperlink&retmode=xml&id="+b,dataType:"xml",success:function(c){jq183Tpl(c).find("DocSum").each(function(){var f,g="",d="",e=jq183Tpl(this),j=e.find("Id").text(),k=e.find('Item[Name="Author"]'),h=k.length;if(e.find('Item[Name="PmcRefCount"]')){g='; <span style="eSumA">referred '+e.find('Item[Name="PmcRefCount"]').text()+" times</span>"}if(e.find('Item[Name="DOI"]')){g=', <span style="eSumA">DOI:'+e.find('Item[Name="DOI"]').text()+"</span>"+g}k.each(function(l){f=jq183Tpl(this).text();if(l===0){d="<b>"+f+"</b>"}else{if(l===(h-1)){d+=", <b>"+f+"</b>"}else{d+=", "+f}}});a+='<p class="eSumP" id="'+j+'">'+d+" ("+e.find('Item[Name="PubDate"]').text()+"). <u onclick=\"paperlink2_eFetch('"+j+"')\">"+e.find('Item[Name="Title"]').text()+"</u> <i>"+e.find('Item[Name="Source"]').text()+"</i>, "+e.find('Item[Name="SO"]').text()+'. <a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/'+j+'/?tool=paperlink2"> PMID:'+j+'</a>'+g+'.<br/><span class="abs'+j+' Off"><span></p>'});jq183Tpl(".Right").html(a)}})}function paperlink2_eSum_json(c,b){var a=setTimeout(function(){if(a){
alert("Click the same link again please.");pubget_fail_once_fallback += 1;clearTimeout(a)}},4000);
var eBase='https://www.thepaperlink.com';
if(pubget_fail_once_fallback>0){eBase='https://www.thepaperlink.cn'}
jq183Tpl.getJSON(eBase+"/entrezajax/esummary?callback=?",{apikey:atob(guestApiKey2015),db:"pubmed",id:c},function(e){clearTimeout(a);jq183Tpl.each(e.result,function(g,d){var h="",f="",k=d.Id,j=d.AuthorList.length;if(d.PmcRefCount){h='; <span style="eSumA">referred '+d.PmcRefCount+" times</span>"}if(d.DOI){h=', <span style="eSumA">DOI:'+d.DOI+"</span>"+h}if(d.ArticleIds.pmc){h=', <span style="eSumA">'+d.ArticleIds.pmc+"</span>"+h}jq183Tpl.each(d.AuthorList,function(l,m){if(l===0){f="<b>"+m+"</b>"}else{if(l===(j-1)){f+=", <b>"+m+"</b>"}else{f+=", "+m}}});b+='<p class="eSumP" id="'+k+'">'+f+" ("+d.PubDate+"). <u onclick=\"paperlink2_eFetch('"+k+"')\">"+d.Title+"</u> <i>"+d.Source+"</i>, "+d.SO+'. <a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/'+k+'/?tool=paperlink2"> PMID:'+k+'</a>'+h+'.<br/><span class="abs'+k+' Off"><span></p>'});jq183Tpl(".Right").html(b)})}function paperlink2_eSum(c,b){jq183Tpl(".hor-minimalist-a").css({width:"100px"});jq183Tpl(".Right").removeClass("Off");jq183Tpl(".Right").html(paperlink2_loadingMsg);var a='<p style="margin-top:-2px;padding-top:0;"><i>"'+paperlink2_currentSearch+'" published '+c.split(",").length+" times in year "+b+":</i></p>";paperlink2_eSum_json(c,a)}function paperlink2_formatItems(b,c){var a='<div class="Right Off"></div><table class="hor-minimalist-a"><tr><th>year</th><th>impact</th></tr><tbody>';jq183Tpl.each(b,function(d,e){if(e.list&&e.list!=="None"){a+='<tr style="cursor:pointer;" onClick="paperlink2_eSum(\''+e.list+"','"+e.year+"')\"><td>"+e.year+"</td><td>"+e.sum_if+"</td></tr>"}else{if(e.sum_if&&parseFloat(e.sum_if)>0){a+="<tr><td>"+e.year+"</td><td>"+e.sum_if+"</td><td>N/A</td></tr>"}}});a+="</tbody></table>";a='<p style="text-align:center;margin-top:5px;padding-top:0;"><img src="'+c+'" alt="chart generated by google" /><br/><span style="background-color:#aaaaaa">'+c+"</span></p>"+a;jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent(a,true)}function paperlink2_json_peaks(){if(paperlink2_timer){clearInterval(paperlink2_timer)}var a=setTimeout(function(){if(a){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent('"Peaks" did not response correctly - the server might be down.<br/>You could try <a target="_blank" href="//2./?term='+paperlink2_currentId+'">this link</a>.',false);clearTimeout(a)}},10000);try{jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateTitle('access "the paper link" ...');jq183Tpl.getJSON(paperlink2_base+"api?callback=?",{peaks:paperlink2_currentId},function(d){clearTimeout(a);if(d.name){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateTitle("Peaks - the paper link");paperlink2_currentSearch=d.name;paperlink2_formatItems(d.items,d.img_url)}else{if(d.exception){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateTitle('"Peaks" is processing data from PubMed');jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent(d.exception,false);if(d.exception==="just taskqueue the request, fetching author data..."){var c=8;paperlink2_timer=setInterval(function(){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent("will refresh in "+c+" sec",false);if(c===0){paperlink2_json_peaks(1)}c--},1000)}}else{jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent('"Peaks" did not response correctly, please try again later',false)}}}).error(function(){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent('"Peaks" did not response correctly - the server might be down.<br/>You could try <a target="_blank" href="//2./?term='+paperlink2_currentId+'">this link</a>.',false)});return false}catch(b){jq183Tpl(paperlink2_currentTrns).qtip100rc3("api").updateContent("error to fetch the remote data",false);return false}}function showPeaks(b){
let tpl2themeColorRandom=Math.floor(Math.random()*tpl2themeColor.length);
jq183Tpl(b).qtip100rc3({content:{text:paperlink2_loadingMsg,title:{text:'access "the paper link" ...',button:'<span style="cursor:pointer;" onclick="return false;">close</span>'}},position:{corner:{target:"topMiddle",tooltip:"bottomMiddle"},adjust:{screen:true}},show:{when:false,solo:true},hide:false,style:{fontSize:"12px",title:{fontSize:"13px"},border:{radius:5},tip:true,textAlign:"left",direction:"ltr",name:tpl2themeColor[tpl2themeColorRandom],width:{min:430}}});jq183Tpl(b).qtip100rc3("show");try{paperlink2_currentTrns=b;paperlink2_currentId=jq183Tpl(b).text();if(!paperlink2_currentId){paperlink2_currentId=jq183Tpl(b).attr("id")}}catch(a){jq183Tpl(b).qtip100rc3("api").updateContent("error to extract in the selection",false);return false}paperlink2_json_peaks()}function paperlink2_ol(a){window.location.href="http://www.ncbi.nlm.nih.gov/pubmed?term=%22"+a.replace(" ","%20")+"%22%5BAuthor%5D"}function paperlink2_embolden_b(a){if(a.substr(0,1)===" "){return' <span class="paperlink2_found">'+a.substr(1)+"</span>"}else{return'<span class="paperlink2_found">'+a+"</span>"}}function paperlink2_embolden_a(a){return'<span style="text-decoration:underline;" title="search about - '+a+'" onclick="paperlink2_ol(\''+a+"')\">"+a+'</span> <img class="paperlink2_found" src="'+thepaperlink_base+'static/peaks-icon.png" width="24" height="24" id="'+a+'" /> '}function paperlink2_refresh(){(function(a){a.fn.replaceText=function(d,e,f){return this.each(function(){var c=this.firstChild,b,h,j=[];if(c){do{if(c.nodeType===3){b=c.nodeValue;h=b.replace(d,e);if(h!==b){if(!f&&/</.test(h)){a(c).before(h);j.push(c)}else{c.nodeValue=h}}}}while(c=c.nextSibling)}j.length&&a(j).remove()})}})(jq183Tpl);jq183Tpl(".desc, .desc b, .desc .highlight").replaceText(/[^\?\!\"\,\;\.\r\n]+/g,paperlink2_embolden_b);jq183Tpl(".auth_list a, .auths a").replaceText(/[^\?\!\"\,\;\.\r\n]+/g,paperlink2_embolden_a);jq183Tpl(".paperlink2_found").each(function(){jq183Tpl(this).parent().attr("onclick","").click(function(a){if(paperlink2_ime_is_ie){a.returnValue=false}else{a.preventDefault()}return false});jq183Tpl(this).parent().attr("href","#");jq183Tpl(this).parent().css("text-decoration","none")});jq183Tpl(".paperlink2_found").click(function(){showPeaks(this)})}function paperlink2_jqueryWrapper(b){if(!b){
jq183Tpl=jQuery.noConflict(true);
(function(c){c.fn.replaceText=function(d,e,f){return this.each(function(){var j=this.firstChild,h,k,l=[];if(j){do{if(j.nodeType===3){h=j.nodeValue;k=h.replace(d,e);if(k!==h){if(!f&&/</.test(k)){c(j).before(k);l.push(j)}else{j.nodeValue=k}}}}while(j=j.nextSibling)}l.length&&c(l).remove()})}})(jq183Tpl);
(function(D){D.fn.qtip100rc3=function(c,k){var f,l,d,m,g,h,j,e;if(typeof c=="string"){if(typeof D(this).data("qtip100rc3")!=="object"){D.fn.qtip100rc3.log.error.call(self,1,D.fn.qtip100rc3.constants.NO_TOOLTIP_PRESENT,false)}if(c=="api"){return D(this).data("qtip100rc3").interfaces[D(this).data("qtip100rc3").current]}else{if(c=="interfaces"){return D(this).data("qtip100rc3").interfaces}}}else{if(!c){c={}}if(typeof c.content!=="object"||(c.content.jquery&&c.content.length>0)){c.content={text:c.content}}if(typeof c.content.title!=="object"){c.content.title={text:c.content.title}}if(typeof c.position!=="object"){c.position={corner:c.position}}if(typeof c.position.corner!=="object"){c.position.corner={target:c.position.corner,tooltip:c.position.corner}}if(typeof c.show!=="object"){c.show={when:c.show}}if(typeof c.show.when!=="object"){c.show.when={event:c.show.when}}if(typeof c.show.effect!=="object"){c.show.effect={type:c.show.effect}}if(typeof c.hide!=="object"){c.hide={when:c.hide}}if(typeof c.hide.when!=="object"){c.hide.when={event:c.hide.when}}if(typeof c.hide.effect!=="object"){c.hide.effect={type:c.hide.effect}}if(typeof c.style!=="object"){c.style={name:c.style}}c.style=G(c.style);m=D.extend(true,{},D.fn.qtip100rc3.defaults,c);m.style=I.call({options:m},m.style);m.user=D.extend(true,{},c)}return D(this).each(function(){if(typeof c=="string"){h=c.toLowerCase();d=D(this).qtip100rc3("interfaces");if(typeof d=="object"){if(k===true&&h=="destroy"){while(d.length>0){d[d.length-1].destroy()}}else{if(k!==true){d=[D(this).qtip100rc3("api")]}for(f=0;f<d.length;f++){if(h=="destroy"){d[f].destroy()}else{if(d[f].status.rendered===true){if(h=="show"){d[f].show()}else{if(h=="hide"){d[f].hide()}else{if(h=="focus"){d[f].focus()}else{if(h=="disable"){d[f].disable(true)}else{if(h=="enable"){d[f].disable(false)}}}}}}}}}}}else{j=D.extend(true,{},m);j.hide.effect.length=m.hide.effect.length;j.show.effect.length=m.show.effect.length;if(j.position.container===false){j.position.container=D(document.body)}if(j.position.target===false){j.position.target=D(this)}if(j.show.when.target===false){j.show.when.target=D(this)}if(j.hide.when.target===false){j.hide.when.target=D(this)}l=D.fn.qtip100rc3.interfaces.length;for(f=0;f<l;f++){if(typeof D.fn.qtip100rc3.interfaces[f]=="undefined"){l=f;break}}g=new F(D(this),j,l);D.fn.qtip100rc3.interfaces[l]=g;if(typeof D(this).data("qtip100rc3")=="object"){if(typeof D(this).attr("qtip100rc3")==="undefined"){D(this).data("qtip100rc3").current=D(this).data("qtip100rc3").interfaces.length}D(this).data("qtip100rc3").interfaces.push(g)}else{D(this).data("qtip100rc3",{current:0,interfaces:[g]})}if(j.content.prerender===false&&j.show.when.event!==false&&j.show.ready!==true){j.show.when.target.bind(j.show.when.event+".qtip100rc3-"+l+"-create",{qtip:l},function(n){e=D.fn.qtip100rc3.interfaces[n.data.qtip100rc3];e.options.show.when.target.unbind(e.options.show.when.event+".qtip100rc3-"+n.data.qtip100rc3+"-create");e.cache.mouse={x:n.pageX,y:n.pageY};u.call(e);e.options.show.when.target.trigger(e.options.show.when.event)})}else{g.cache.mouse={x:j.show.when.target.offset().left,y:j.show.when.target.offset().top};u.call(g)}}})};function F(d,e,c){var f=this;f.id=c;f.options=e;f.status={animated:false,rendered:false,disabled:false,focused:false};f.elements={target:d.addClass(f.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};f.cache={mouse:{},position:{},toggle:0};f.timers={};D.extend(f,f.options.api,{show:function(k){var g,j;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"show")}if(f.elements.tooltip.css("display")!=="none"){return f}f.elements.tooltip.stop(true,false);g=f.beforeShow.call(f,k);if(g===false){return f}function h(){if(f.options.position.type!=="static"){f.focus()}f.onShow.call(f,k);if(D.browser.msie){f.elements.tooltip.get(0).style.removeAttribute("filter")}}f.cache.toggle=1;if(f.options.position.type!=="static"){f.updatePosition(k,(f.options.show.effect.length>0))}if(typeof f.options.show.solo=="object"){j=D(f.options.show.solo)}else{if(f.options.show.solo===true){j=D("div.qtip100rc3").not(f.elements.tooltip)}}if(j){j.each(function(){if(D(this).qtip100rc3("api").status.rendered===true){D(this).qtip100rc3("api").hide()}})}if(typeof f.options.show.effect.type=="function"){f.options.show.effect.type.call(f.elements.tooltip,f.options.show.effect.length);f.elements.tooltip.queue(function(){h();D(this).dequeue()})}else{switch(f.options.show.effect.type.toLowerCase()){case"fade":f.elements.tooltip.fadeIn(f.options.show.effect.length,h);break;case"slide":f.elements.tooltip.slideDown(f.options.show.effect.length,function(){h();if(f.options.position.type!=="static"){f.updatePosition(k,true)}});break;case"grow":f.elements.tooltip.show(f.options.show.effect.length,h);break;default:f.elements.tooltip.show(null,h);break}f.elements.tooltip.addClass(f.options.style.classes.active)}return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_SHOWN,"show")},hide:function(j){var g;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(f.elements.tooltip.css("display")==="none"){return f}}clearTimeout(f.timers.show);f.elements.tooltip.stop(true,false);g=f.beforeHide.call(f,j);if(g===false){return f}function h(){f.onHide.call(f,j)}f.cache.toggle=0;if(typeof f.options.hide.effect.type=="function"){f.options.hide.effect.type.call(f.elements.tooltip,f.options.hide.effect.length);f.elements.tooltip.queue(function(){h();D(this).dequeue()})}else{switch(f.options.hide.effect.type.toLowerCase()){case"fade":f.elements.tooltip.fadeOut(f.options.hide.effect.length,h);break;case"slide":f.elements.tooltip.slideUp(f.options.hide.effect.length,h);break;case"grow":f.elements.tooltip.hide(f.options.hide.effect.length,h);break;default:f.elements.tooltip.hide(null,h);break}f.elements.tooltip.removeClass(f.options.style.classes.active)}return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_HIDDEN,"hide")},updatePosition:function(M,q){var h,O,m,p,N,Q,o,r,j,g,n,k,P,l;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(f.options.position.type=="static"){return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.CANNOT_POSITION_STATIC,"updatePosition")}}O={position:{left:0,top:0},dimensions:{height:0,width:0},corner:f.options.position.corner.target};m={position:f.getPosition(),dimensions:f.getDimensions(),corner:f.options.position.corner.tooltip};if(f.options.position.target!=="mouse"){if(f.options.position.target.get(0).nodeName.toLowerCase()=="area"){p=f.options.position.target.attr("coords").split(",");for(h=0;h<p.length;h++){p[h]=parseInt(p[h])}N=f.options.position.target.parent("map").attr("name");Q=D('img[usemap="#'+N+'"]:first').offset();O.position={left:Math.floor(Q.left+p[0]),top:Math.floor(Q.top+p[1])};switch(f.options.position.target.attr("shape").toLowerCase()){case"rect":O.dimensions={width:Math.ceil(Math.abs(p[2]-p[0])),height:Math.ceil(Math.abs(p[3]-p[1]))};break;case"circle":O.dimensions={width:p[2]+1,height:p[2]+1};break;case"poly":O.dimensions={width:p[0],height:p[1]};for(h=0;h<p.length;h++){if(h%2==0){if(p[h]>O.dimensions.width){O.dimensions.width=p[h]}if(p[h]<p[0]){O.position.left=Math.floor(Q.left+p[h])}}else{if(p[h]>O.dimensions.height){O.dimensions.height=p[h]}if(p[h]<p[1]){O.position.top=Math.floor(Q.top+p[h])}}}O.dimensions.width=O.dimensions.width-(O.position.left-Q.left);O.dimensions.height=O.dimensions.height-(O.position.top-Q.top);break;default:return D.fn.qtip100rc3.log.error.call(f,4,D.fn.qtip100rc3.constants.INVALID_AREA_SHAPE,"updatePosition");break}O.dimensions.width-=2;O.dimensions.height-=2}else{if(f.options.position.target.add(document.body).length===1){O.position={left:D(document).scrollLeft(),top:D(document).scrollTop()};O.dimensions={height:D(window).height(),width:D(window).width()}}else{if(typeof f.options.position.target.attr("qtip100rc3")!=="undefined"){O.position=f.options.position.target.qtip100rc3("api").cache.position}else{O.position=f.options.position.target.offset()}O.dimensions={height:f.options.position.target.outerHeight(),width:f.options.position.target.outerWidth()}}}o=D.extend({},O.position);if(O.corner.search(/right/i)!==-1){o.left+=O.dimensions.width}if(O.corner.search(/bottom/i)!==-1){o.top+=O.dimensions.height}if(O.corner.search(/((top|bottom)Middle)|center/)!==-1){o.left+=(O.dimensions.width/2)}if(O.corner.search(/((left|right)Middle)|center/)!==-1){o.top+=(O.dimensions.height/2)}}else{O.position=o={left:f.cache.mouse.x,top:f.cache.mouse.y};O.dimensions={height:1,width:1}}if(m.corner.search(/right/i)!==-1){o.left-=m.dimensions.width}if(m.corner.search(/bottom/i)!==-1){o.top-=m.dimensions.height}if(m.corner.search(/((top|bottom)Middle)|center/)!==-1){o.left-=(m.dimensions.width/2)}if(m.corner.search(/((left|right)Middle)|center/)!==-1){o.top-=(m.dimensions.height/2)}r=(D.browser.msie)?1:0;j=(D.browser.msie&&parseInt(D.browser.version.charAt(0))===6)?1:0;if(f.options.style.border.radius>0){if(m.corner.search(/Left/)!==-1){o.left-=f.options.style.border.radius}else{if(m.corner.search(/Right/)!==-1){o.left+=f.options.style.border.radius}}if(m.corner.search(/Top/)!==-1){o.top-=f.options.style.border.radius}else{if(m.corner.search(/Bottom/)!==-1){o.top+=f.options.style.border.radius}}}if(r){if(m.corner.search(/top/)!==-1){o.top-=r}else{if(m.corner.search(/bottom/)!==-1){o.top+=r}}if(m.corner.search(/left/)!==-1){o.left-=r}else{if(m.corner.search(/right/)!==-1){o.left+=r}}if(m.corner.search(/leftMiddle|rightMiddle/)!==-1){o.top-=1}}if(f.options.position.adjust.screen===true){o=v.call(f,o,O,m)}if(f.options.position.target==="mouse"&&f.options.position.adjust.mouse===true){if(f.options.position.adjust.screen===true&&f.elements.tip){n=f.elements.tip.attr("rel")}else{n=f.options.position.corner.tooltip}o.left+=(n.search(/right/i)!==-1)?-6:6;o.top+=(n.search(/bottom/i)!==-1)?-6:6}if(!f.elements.bgiframe&&D.browser.msie&&parseInt(D.browser.version.charAt(0))==6){D("select, object").each(function(){k=D(this).offset();k.bottom=k.top+D(this).height();k.right=k.left+D(this).width();if(o.top+m.dimensions.height>=k.top&&o.left+m.dimensions.width>=k.left){z.call(f)}})}o.left+=f.options.position.adjust.x;o.top+=f.options.position.adjust.y;P=f.getPosition();if(o.left!=P.left||o.top!=P.top){l=f.beforePositionUpdate.call(f,M);if(l===false){return f}f.cache.position=o;if(q===true){f.status.animated=true;f.elements.tooltip.animate(o,200,"swing",function(){f.status.animated=false})}else{f.elements.tooltip.css(o)}f.onPositionUpdate.call(f,M);if(typeof M!=="undefined"&&M.type&&M.type!=="mousemove"){D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return f},updateWidth:function(h){var g;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(h&&typeof h!=="number"){return D.fn.qtip100rc3.log.error.call(f,2,"newWidth must be of type number","updateWidth")}}g=f.elements.contentWrapper.siblings().add(f.elements.tip).add(f.elements.button);if(!h){if(typeof f.options.style.width.value=="number"){h=f.options.style.width.value}else{f.elements.tooltip.css({width:"auto"});g.hide();if(D.browser.msie){f.elements.wrapper.add(f.elements.contentWrapper.children()).css({zoom:"normal"})}h=f.getDimensions().width+1;if(!f.options.style.width.value){if(h>f.options.style.width.max){h=f.options.style.width.max}if(h<f.options.style.width.min){h=f.options.style.width.min}}}}if(h%2!==0){h-=1}f.elements.tooltip.width(h);g.show();if(f.options.style.border.radius){f.elements.tooltip.find(".qtip100rc3-betweenCorners").each(function(j){D(this).width(h-(f.options.style.border.radius*2))})}if(D.browser.msie){f.elements.wrapper.add(f.elements.contentWrapper.children()).css({zoom:"1"});f.elements.wrapper.width(h);if(f.elements.bgiframe){f.elements.bgiframe.width(h).height(f.getDimensions.height)}}return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(j){var k,h,g,m,l;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof j!=="string"||!D.fn.qtip100rc3.styles[j]){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.STYLE_NOT_DEFINED,"updateStyle")}}f.options.style=I.call(f,D.fn.qtip100rc3.styles[j],f.options.user.style);f.elements.content.css(t(f.options.style));if(f.options.content.title.text!==false){f.elements.title.css(t(f.options.style.title,true))}f.elements.contentWrapper.css({borderColor:f.options.style.border.color});if(f.options.style.tip.corner!==false){if(D("<canvas>").get(0).getContext){k=f.elements.tooltip.find(".qtip100rc3-tip canvas:first");g=k.get(0).getContext("2d");g.clearRect(0,0,300,300);m=k.parent("div[rel]:first").attr("rel");l=H(m,f.options.style.tip.size.width,f.options.style.tip.size.height);B.call(f,k,l,f.options.style.tip.color||f.options.style.border.color)}else{if(D.browser.msie){k=f.elements.tooltip.find('.qtip100rc3-tip [nodeName="shape"]');k.attr("fillcolor",f.options.style.tip.color||f.options.style.border.color)}}}if(f.options.style.border.radius>0){f.elements.tooltip.find(".qtip100rc3-betweenCorners").css({backgroundColor:f.options.style.border.color});if(D("<canvas>").get(0).getContext){h=C(f.options.style.border.radius);f.elements.tooltip.find(".qtip100rc3-wrapper canvas").each(function(){g=D(this).get(0).getContext("2d");g.clearRect(0,0,300,300);m=D(this).parent("div[rel]:first").attr("rel");s.call(f,D(this),h[m],f.options.style.border.radius,f.options.style.border.color)})}else{if(D.browser.msie){f.elements.tooltip.find('.qtip100rc3-wrapper [nodeName="arc"]').each(function(){D(this).attr("fillcolor",f.options.style.border.color)})}}}return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(h,m){var k,g,j;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!h){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.NO_CONTENT_PROVIDED,"updateContent")}}k=f.beforeContentUpdate.call(f,h);if(typeof k=="string"){h=k}else{if(k===false){return}}if(D.browser.msie){f.elements.contentWrapper.children().css({zoom:"normal"})}if(h.jquery&&h.length>0){h.clone(true).appendTo(f.elements.content).show()}else{f.elements.content.html(h)}g=f.elements.content.find("img[complete=false]");if(g.length>0){j=0;g.each(function(n){D('<img src="'+D(this).attr("src")+'" />').load(function(){if(++j==g.length){l()}})})}else{l()}function l(){f.updateWidth();if(m!==false){if(f.options.position.type!=="static"){f.updatePosition(f.elements.tooltip.is(":visible"),true)}if(f.options.style.tip.corner!==false){w.call(f)}}}f.onContentUpdate.call(f);return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(j,k,h){var l;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"loadContent")}l=f.beforeContentLoad.call(f);if(l===false){return f}if(h=="post"){D.post(j,k,g)}else{D.get(j,k,g)}function g(m){f.onContentLoad.call(f);D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_CONTENT_LOADED,"loadContent");f.updateContent(m)}return f},updateTitle:function(g){if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!g){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=f.beforeTitleUpdate.call(f);if(returned===false){return f}if(f.elements.button){f.elements.button=f.elements.button.clone(true)}f.elements.title.html(g);if(f.elements.button){f.elements.title.prepend(f.elements.button)}f.onTitleUpdate.call(f);return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(h){var l,g,j,k;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(f.options.position.type=="static"){return D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.CANNOT_FOCUS_STATIC,"focus")}}l=parseInt(f.elements.tooltip.css("z-index"));g=6000+D("div.qtip100rc3[qtip]").length-1;if(!f.status.focused&&l!==g){k=f.beforeFocus.call(f,h);if(k===false){return f}D("div.qtip100rc3[qtip]").not(f.elements.tooltip).each(function(){if(D(this).qtip100rc3("api").status.rendered===true){j=parseInt(D(this).css("z-index"));if(typeof j=="number"&&j>-1){D(this).css({zIndex:parseInt(D(this).css("z-index"))-1})}D(this).qtip100rc3("api").status.focused=false}});f.elements.tooltip.css({zIndex:g});f.status.focused=true;f.onFocus.call(f,h);D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_FOCUSED,"focus")}return f},disable:function(g){if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"disable")}if(g){if(!f.status.disabled){f.status.disabled=true;D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_DISABLED,"disable")}else{D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(f.status.disabled){f.status.disabled=false;D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_ENABLED,"disable")}else{D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return f},destroy:function(){var h,g,j;g=f.beforeDestroy.call(f);if(g===false){return f}if(f.status.rendered){f.options.show.when.target.unbind("mousemove.qtip100rc3",f.updatePosition);f.options.show.when.target.unbind("mouseout.qtip100rc3",f.hide);f.options.show.when.target.unbind(f.options.show.when.event+".qtip100rc3");f.options.hide.when.target.unbind(f.options.hide.when.event+".qtip100rc3");f.elements.tooltip.unbind(f.options.hide.when.event+".qtip100rc3");f.elements.tooltip.unbind("mouseover.qtip100rc3",f.focus);f.elements.tooltip.remove()}else{f.options.show.when.target.unbind(f.options.show.when.event+".qtip100rc3-create")}if(typeof f.elements.target.data("qtip100rc3")=="object"){j=f.elements.target.data("qtip100rc3").interfaces;if(typeof j=="object"&&j.length>0){for(h=0;h<j.length-1;h++){if(j[h].id==f.id){j.splice(h,1)}}}}delete D.fn.qtip100rc3.interfaces[f.id];if(typeof j=="object"&&j.length>0){f.elements.target.data("qtip100rc3").current=j.length-1}else{f.elements.target.removeData("qtip100rc3")}f.onDestroy.call(f);D.fn.qtip100rc3.log.error.call(f,1,D.fn.qtip100rc3.constants.EVENT_DESTROYED,"destroy");return f.elements.target},getPosition:function(){var h,g;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"getPosition")}h=(f.elements.tooltip.css("display")!=="none")?false:true;if(h){f.elements.tooltip.css({visiblity:"hidden"}).show()}g=f.elements.tooltip.offset();if(h){f.elements.tooltip.css({visiblity:"visible"}).hide()}return g},getDimensions:function(){var h,g;if(!f.status.rendered){return D.fn.qtip100rc3.log.error.call(f,2,D.fn.qtip100rc3.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}h=(!f.elements.tooltip.is(":visible"))?true:false;if(h){f.elements.tooltip.css({visiblity:"hidden"}).show()}g={height:f.elements.tooltip.outerHeight(),width:f.elements.tooltip.outerWidth()};if(h){f.elements.tooltip.css({visiblity:"visible"}).hide()}return g}})}function u(){var h,d,f,g,e,j,c;h=this;h.beforeRender.call(h);h.status.rendered=true;h.elements.tooltip='<div qtip="'+h.id+'" class="qtip '+(h.options.style.classes.tooltip||h.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+h.options.position.type+';"><div class="qtip100rc3-wrapper" style="position:relative; overflow:hidden; text-align:left;"><div class="qtip100rc3-contentWrapper" style="overflow:hidden;"><div class="qtip100rc3-content '+h.options.style.classes.content+'"></div></div></div></div>';h.elements.tooltip=D(h.elements.tooltip);h.elements.tooltip.appendTo(h.options.position.container);h.elements.tooltip.data("qtip100rc3",{current:0,interfaces:[h]});h.elements.wrapper=h.elements.tooltip.children("div:first");h.elements.contentWrapper=h.elements.wrapper.children("div:first").css({background:h.options.style.background});h.elements.content=h.elements.contentWrapper.children("div:first").css(t(h.options.style));if(D.browser.msie){h.elements.wrapper.add(h.elements.content).css({zoom:1})}if(h.options.hide.when.event=="unfocus"){h.elements.tooltip.attr("unfocus",true)}if(typeof h.options.style.width.value=="number"){h.updateWidth()}if(D("<canvas>").get(0).getContext||D.browser.msie){if(h.options.style.border.radius>0){x.call(h)}else{h.elements.contentWrapper.css({border:h.options.style.border.width+"px solid "+h.options.style.border.color})}if(h.options.style.tip.corner!==false){E.call(h)}}else{h.elements.contentWrapper.css({border:h.options.style.border.width+"px solid "+h.options.style.border.color});h.options.style.border.radius=0;h.options.style.tip.corner=false;D.fn.qtip100rc3.log.error.call(h,2,D.fn.qtip100rc3.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof h.options.content.text=="string"&&h.options.content.text.length>0)||(h.options.content.text.jquery&&h.options.content.text.length>0)){f=h.options.content.text}else{if(typeof h.elements.target.attr("title")=="string"&&h.elements.target.attr("title").length>0){f=h.elements.target.attr("title").replace("\\n","<br />");h.elements.target.attr("title","")}else{if(typeof h.elements.target.attr("alt")=="string"&&h.elements.target.attr("alt").length>0){f=h.elements.target.attr("alt").replace("\\n","<br />");h.elements.target.attr("alt","")}else{f=" ";D.fn.qtip100rc3.log.error.call(h,1,D.fn.qtip100rc3.constants.NO_VALID_CONTENT,"render")}}}if(h.options.content.title.text!==false){A.call(h)}h.updateContent(f);y.call(h);if(h.options.show.ready===true){h.show()}if(h.options.content.url!==false){g=h.options.content.url;e=h.options.content.data;j=h.options.content.method||"get";h.loadContent(g,e,j)}h.onRender.call(h);D.fn.qtip100rc3.log.error.call(h,1,D.fn.qtip100rc3.constants.EVENT_RENDERED,"render")}function x(){var o,g,p,e,j,r,n,m,c,h,k,d,f,q,l;o=this;o.elements.wrapper.find(".qtip100rc3-borderBottom, .qtip100rc3-borderTop").remove();p=o.options.style.border.width;e=o.options.style.border.radius;j=o.options.style.border.color||o.options.style.tip.color;r=C(e);n={};for(g in r){n[g]='<div rel="'+g+'" style="'+((g.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+e+"px; width:"+e+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(D("<canvas>").get(0).getContext){n[g]+='<canvas height="'+e+'" width="'+e+'" style="vertical-align: top"></canvas>'}else{if(D.browser.msie){m=e*2+3;n[g]+='<v:arc stroked="false" fillcolor="'+j+'" startangle="'+r[g][0]+'" endangle="'+r[g][1]+'" style="width:'+m+"px; height:"+m+"px; margin-top:"+((g.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((g.search(/Right/)!==-1)?r[g][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}n[g]+="</div>"}c=o.getDimensions().width-(Math.max(p,e)*2);h='<div class="qtip100rc3-betweenCorners" style="height:'+e+"px; width:"+c+"px; overflow:hidden; background-color:"+j+'; line-height:0.1px; font-size:1px;">';k='<div class="qtip100rc3-borderTop" dir="ltr" style="height:'+e+"px; margin-left:"+e+'px; line-height:0.1px; font-size:1px; padding:0;">'+n.topLeft+n.topRight+h;o.elements.wrapper.prepend(k);d='<div class="qtip100rc3-borderBottom" dir="ltr" style="height:'+e+"px; margin-left:"+e+'px; line-height:0.1px; font-size:1px; padding:0;">'+n.bottomLeft+n.bottomRight+h;o.elements.wrapper.append(d);if(D("<canvas>").get(0).getContext){o.elements.wrapper.find("canvas").each(function(){f=r[D(this).parent("[rel]:first").attr("rel")];s.call(o,D(this),f,e,j)})}else{if(D.browser.msie){o.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}q=Math.max(e,(e+(p-e)));l=Math.max(p-e,0);o.elements.contentWrapper.css({border:"0px solid "+j,borderWidth:l+"px "+q+"px"})}function s(e,c,g,f){var d=e.get(0).getContext("2d");d.fillStyle=f;d.beginPath();d.arc(c[0],c[1],g,0,Math.PI*2,false);d.fill()}function E(e){var g,h,c,f,d;g=this;if(g.elements.tip!==null){g.elements.tip.remove()}h=g.options.style.tip.color||g.options.style.border.color;if(g.options.style.tip.corner===false){return}else{if(!e){e=g.options.style.tip.corner}}c=H(e,g.options.style.tip.size.width,g.options.style.tip.size.height);g.elements.tip='<div class="'+g.options.style.classes.tip+'" dir="ltr" rel="'+e+'" style="position:absolute; height:'+g.options.style.tip.size.height+"px; width:"+g.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(D("<canvas>").get(0).getContext){g.elements.tip+='<canvas height="'+g.options.style.tip.size.height+'" width="'+g.options.style.tip.size.width+'"></canvas>'}else{if(D.browser.msie){f=g.options.style.tip.size.width+","+g.options.style.tip.size.height;d="m"+c[0][0]+","+c[0][1];d+=" l"+c[1][0]+","+c[1][1];d+=" "+c[2][0]+","+c[2][1];d+=" xe";g.elements.tip+='<v:shape fillcolor="'+h+'" stroked="false" filled="true" path="'+d+'" coordsize="'+f+'" style="width:'+g.options.style.tip.size.width+"px; height:"+g.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((e.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';g.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';g.elements.contentWrapper.css("position","relative")}}g.elements.tooltip.prepend(g.elements.tip+"</div>");g.elements.tip=g.elements.tooltip.find("."+g.options.style.classes.tip).eq(0);if(D("<canvas>").get(0).getContext){B.call(g,g.elements.tip.find("canvas:first"),c,h)}if(e.search(/top/)!==-1&&D.browser.msie&&parseInt(D.browser.version.charAt(0))===6){g.elements.tip.css({marginTop:-4})}w.call(g,e)}function B(e,c,f){var d=e.get(0).getContext("2d");d.fillStyle=f;d.beginPath();d.moveTo(c[0][0],c[0][1]);d.lineTo(c[1][0],c[1][1]);d.lineTo(c[2][0],c[2][1]);d.fill()}function w(f){var g,d,h,c,e;g=this;if(g.options.style.tip.corner===false||!g.elements.tip){return}if(!f){f=g.elements.tip.attr("rel")}d=positionAdjust=(D.browser.msie)?1:0;g.elements.tip.css(f.match(/left|right|top|bottom/)[0],0);if(f.search(/top|bottom/)!==-1){if(D.browser.msie){if(parseInt(D.browser.version.charAt(0))===6){positionAdjust=(f.search(/top/)!==-1)?-3:1}else{positionAdjust=(f.search(/top/)!==-1)?1:2}}if(f.search(/Middle/)!==-1){g.elements.tip.css({left:"50%",marginLeft:-(g.options.style.tip.size.width/2)})}else{if(f.search(/Left/)!==-1){g.elements.tip.css({left:g.options.style.border.radius-d})}else{if(f.search(/Right/)!==-1){g.elements.tip.css({right:g.options.style.border.radius+d})}}}if(f.search(/top/)!==-1){g.elements.tip.css({top:-positionAdjust})}else{g.elements.tip.css({bottom:positionAdjust})}}else{if(f.search(/left|right/)!==-1){if(D.browser.msie){positionAdjust=(parseInt(D.browser.version.charAt(0))===6)?1:((f.search(/left/)!==-1)?1:2)}if(f.search(/Middle/)!==-1){g.elements.tip.css({top:"50%",marginTop:-(g.options.style.tip.size.height/2)})}else{if(f.search(/Top/)!==-1){g.elements.tip.css({top:g.options.style.border.radius-d})}else{if(f.search(/Bottom/)!==-1){g.elements.tip.css({bottom:g.options.style.border.radius+d})}}}if(f.search(/left/)!==-1){g.elements.tip.css({left:-positionAdjust})}else{g.elements.tip.css({right:positionAdjust})}}}h="padding-"+f.match(/left|right|top|bottom/)[0];c=g.options.style.tip.size[(h.search(/left|right/)!==-1)?"width":"height"];g.elements.tooltip.css("padding",0);g.elements.tooltip.css(h,c);if(D.browser.msie&&parseInt(D.browser.version.charAt(0))==6){e=parseInt(g.elements.tip.css("margin-top"))||0;e+=parseInt(g.elements.content.css("margin-top"))||0;g.elements.tip.css({marginTop:e})}}function A(){var c=this;if(c.elements.title!==null){c.elements.title.remove()}c.elements.title=D('<div class="'+c.options.style.classes.title+'">').css(t(c.options.style.title,true)).css({zoom:(D.browser.msie)?1:0}).prependTo(c.elements.contentWrapper);if(c.options.content.title.text){c.updateTitle.call(c,c.options.content.title.text)}if(c.options.content.title.button!==false&&typeof c.options.content.title.button=="string"){c.elements.button=D('<a class="'+c.options.style.classes.button+'" style="float:right; position: relative"></a>').css(t(c.options.style.button,true)).html(c.options.content.title.button).prependTo(c.elements.title).click(function(d){if(!c.status.disabled){c.hide(d)}})}}function y(){var g,e,f,h;g=this;e=g.options.show.when.target;f=g.options.hide.when.target;if(g.options.hide.fixed){f=f.add(g.elements.tooltip)}if(g.options.hide.when.event=="inactive"){h=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function j(k){if(g.status.disabled===true){return}clearTimeout(g.timers.inactive);g.timers.inactive=setTimeout(function(){D(h).each(function(){f.unbind(this+".qtip100rc3-inactive");g.elements.content.unbind(this+".qtip100rc3-inactive")});g.hide(k)},g.options.hide.delay)}}else{if(g.options.hide.fixed===true){g.elements.tooltip.bind("mouseover.qtip100rc3",function(){if(g.status.disabled===true){return}clearTimeout(g.timers.hide)})}}function c(k){if(g.status.disabled===true){return}if(g.options.hide.when.event=="inactive"){D(h).each(function(){f.bind(this+".qtip100rc3-inactive",j);g.elements.content.bind(this+".qtip100rc3-inactive",j)});j()}clearTimeout(g.timers.show);clearTimeout(g.timers.hide);g.timers.show=setTimeout(function(){g.show(k)},g.options.show.delay)}function d(k){if(g.status.disabled===true){return}if(g.options.hide.fixed===true&&g.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&D(k.relatedTarget).parents("div.qtip100rc3[qtip]").length>0){k.stopPropagation();k.preventDefault();clearTimeout(g.timers.hide);return false}clearTimeout(g.timers.show);clearTimeout(g.timers.hide);g.elements.tooltip.stop(true,true);g.timers.hide=setTimeout(function(){g.hide(k)},g.options.hide.delay)}if((g.options.show.when.target.add(g.options.hide.when.target).length===1&&g.options.show.when.event==g.options.hide.when.event&&g.options.hide.when.event!=="inactive")||g.options.hide.when.event=="unfocus"){g.cache.toggle=0;e.bind(g.options.show.when.event+".qtip100rc3",function(k){if(g.cache.toggle==0){c(k)}else{d(k)}})}else{e.bind(g.options.show.when.event+".qtip100rc3",c);if(g.options.hide.when.event!=="inactive"){f.bind(g.options.hide.when.event+".qtip100rc3",d)}}if(g.options.position.type.search(/(fixed|absolute)/)!==-1){g.elements.tooltip.bind("mouseover.qtip100rc3",g.focus)}if(g.options.position.target==="mouse"&&g.options.position.type!=="static"){e.bind("mousemove.qtip100rc3",function(k){g.cache.mouse={x:k.pageX,y:k.pageY};if(g.status.disabled===false&&g.options.position.adjust.mouse===true&&g.options.position.type!=="static"&&g.elements.tooltip.css("display")!=="none"){g.updatePosition(k)}})}}function v(j,h,c){var d,l,f,e,k,g;d=this;if(c.corner=="center"){return h.position}l=D.extend({},j);e={x:false,y:false};k={left:(l.left<D.fn.qtip100rc3.cache.screen.scroll.left),right:(l.left+c.dimensions.width+2>=D.fn.qtip100rc3.cache.screen.width+D.fn.qtip100rc3.cache.screen.scroll.left),top:(l.top<D.fn.qtip100rc3.cache.screen.scroll.top),bottom:(l.top+c.dimensions.height+2>=D.fn.qtip100rc3.cache.screen.height+D.fn.qtip100rc3.cache.screen.scroll.top)};f={left:(k.left&&(c.corner.search(/right/i)!=-1||(c.corner.search(/right/i)==-1&&!k.right))),right:(k.right&&(c.corner.search(/left/i)!=-1||(c.corner.search(/left/i)==-1&&!k.left))),top:(k.top&&c.corner.search(/top/i)==-1),bottom:(k.bottom&&c.corner.search(/bottom/i)==-1)};if(f.left){if(d.options.position.target!=="mouse"){l.left=h.position.left+h.dimensions.width}else{l.left=d.cache.mouse.x}e.x="Left"}else{if(f.right){if(d.options.position.target!=="mouse"){l.left=h.position.left-c.dimensions.width}else{l.left=d.cache.mouse.x-c.dimensions.width}e.x="Right"}}if(f.top){if(d.options.position.target!=="mouse"){l.top=h.position.top+h.dimensions.height}else{l.top=d.cache.mouse.y}e.y="top"}else{if(f.bottom){if(d.options.position.target!=="mouse"){l.top=h.position.top-c.dimensions.height}else{l.top=d.cache.mouse.y-c.dimensions.height}e.y="bottom"}}if(l.left<0){l.left=j.left;e.x=false}if(l.top<0){l.top=j.top;e.y=false}if(d.options.style.tip.corner!==false){l.corner=new String(c.corner);if(e.x!==false){l.corner=l.corner.replace(/Left|Right|Middle/,e.x)}if(e.y!==false){l.corner=l.corner.replace(/top|bottom/,e.y)}if(l.corner!==d.elements.tip.attr("rel")){E.call(d,l.corner)}}return l}function t(d,e){var c,f;c=D.extend(true,{},d);for(f in c){if(e===true&&f.search(/(tip|classes)/i)!==-1){delete c[f]}else{if(!e&&f.search(/(width|border|tip|title|classes|user)/i)!==-1){delete c[f]}}}return c}function G(c){if(typeof c.tip!=="object"){c.tip={corner:c.tip}}if(typeof c.tip.size!=="object"){c.tip.size={width:c.tip.size,height:c.tip.size}}if(typeof c.border!=="object"){c.border={width:c.border}}if(typeof c.width!=="object"){c.width={value:c.width}}if(typeof c.width.max=="string"){c.width.max=parseInt(c.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof c.width.min=="string"){c.width.min=parseInt(c.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof c.tip.size.x=="number"){c.tip.size.width=c.tip.size.x;delete c.tip.size.x}if(typeof c.tip.size.y=="number"){c.tip.size.height=c.tip.size.y;delete c.tip.size.y}return c}function I(){var h,g,f,c,e,d;h=this;f=[true,{}];for(g=0;g<arguments.length;g++){f.push(arguments[g])}c=[D.extend.apply(D,f)];while(typeof c[0].name=="string"){c.unshift(G(D.fn.qtip100rc3.styles[c[0].name]))}c.unshift(true,{classes:{tooltip:"qtip100rc3-"+(arguments[0].name||"defaults")}},D.fn.qtip100rc3.styles.defaults);e=D.extend.apply(D,c);d=(D.browser.msie)?1:0;e.tip.size.width+=d;e.tip.size.height+=d;if(e.tip.size.width%2>0){e.tip.size.width+=1}if(e.tip.size.height%2>0){e.tip.size.height+=1}if(e.tip.corner===true){e.tip.corner=(h.options.position.corner.tooltip==="center")?false:h.options.position.corner.tooltip}return e}function H(c,d,e){var f={bottomRight:[[0,0],[d,e],[d,0]],bottomLeft:[[0,0],[d,0],[0,e]],topRight:[[0,e],[d,0],[d,e]],topLeft:[[0,0],[0,e],[d,e]],topMiddle:[[0,e],[d/2,0],[d,e]],bottomMiddle:[[0,0],[d,0],[d/2,e]],rightMiddle:[[0,0],[d,e/2],[0,e]],leftMiddle:[[d,0],[d,e],[0,e/2]]};f.leftTop=f.bottomRight;f.rightTop=f.bottomLeft;f.leftBottom=f.topRight;f.rightBottom=f.topLeft;return f[c]}function C(d){var c;if(D("<canvas>").get(0).getContext){c={topLeft:[d,d],topRight:[0,d],bottomLeft:[d,0],bottomRight:[0,0]}}else{if(D.browser.msie){c={topLeft:[-90,90,0],topRight:[-90,90,-d],bottomLeft:[90,270,0],bottomRight:[90,270,-d]}}}return c}function z(){var e,d,c;e=this;c=e.getDimensions();d='<iframe class="qtip100rc3-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+c.height+"px; width:"+c.width+'px" />';e.elements.bgiframe=e.elements.wrapper.prepend(d).children(".qtip100rc3-bgiframe:first")}D(document).ready(function(){D.fn.qtip100rc3.cache={screen:{scroll:{left:D(window).scrollLeft(),top:D(window).scrollTop()},width:D(window).width(),height:D(window).height()}};var c;D(window).bind("resize scroll",function(d){clearTimeout(c);c=setTimeout(function(){if(d.type==="scroll"){D.fn.qtip100rc3.cache.screen.scroll={left:D(window).scrollLeft(),top:D(window).scrollTop()}}else{D.fn.qtip100rc3.cache.screen.width=D(window).width();D.fn.qtip100rc3.cache.screen.height=D(window).height()}for(i=0;i<D.fn.qtip100rc3.interfaces.length;i++){var e=D.fn.qtip100rc3.interfaces[i];if(e.status.rendered===true&&(e.options.position.type!=="static"||e.options.position.adjust.scroll&&d.type==="scroll"||e.options.position.adjust.resize&&d.type==="resize")){e.updatePosition(d,true)}}},100)});D(document).bind("mousedown.qtip100rc3",function(d){if(D(d.target).parents("div.qtip100rc3").length===0){D(".qtip100rc3[unfocus]").each(function(){var e=D(this).qtip100rc3("api");if(D(this).is(":visible")&&!e.status.disabled&&D(d.target).add(e.elements.target).length>1){e.hide(d)}})}})});D.fn.qtip100rc3.interfaces=[];D.fn.qtip100rc3.log={error:function(){return this}};D.fn.qtip100rc3.constants={};D.fn.qtip100rc3.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};D.fn.qtip100rc3.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip100rc3-tip",title:"qtip100rc3-title",button:"qtip100rc3-button",content:"qtip100rc3-content",active:"qtip100rc3-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip100rc3-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip100rc3-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip100rc3-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip100rc3-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip100rc3-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip100rc3-blue"}}}})(jq183Tpl)
}
try{jq183Tpl("body").append('<div id="paperlink2_display"></div>');paperlink2_refresh()}catch(a){paperlink2_finalMsg(paperlink2_notSupportedMsg)}}function paperlink2_startmeup(){if(!call_by_jsClient){return}if(typeof head==="undefined"){setTimeout(paperlink2_startmeup,500);return}try{if(typeof jq183Tpl==="undefined"){head.js(thepaperlink_base+"static/jquery183min.js",paperlink2_jqueryWrapper)}else{paperlink2_jqueryWrapper(true)}}catch(a){if(paperlink2_loadHeadAttempts--===0){paperlink2_finalMsg(paperlink2_notSupportedMsg)}else{setTimeout(paperlink2_startmeup,500)}}}paperlink2_startmeup();