if(typeof $WowheadPower=="undefined"){var $WowheadPower=new function(){function t(AT,AS){var AR=document.createElement(AT);if(AS){AL(AR,AS)}return AR}function N(AR,AS){return AR.appendChild(AS)}function s(AS,AT,AR){if(window.attachEvent){AS.attachEvent("on"+AT,AR)}else{AS.addEventListener(AT,AR,false)}}function AL(AT,AR){for(var AS in AR){if(typeof AR[AS]=="object"){if(!AT[AS]){AT[AS]={}}AL(AT[AS],AR[AS])}else{AT[AS]=AR[AS]}}}function l(AR){if(!AR){AR=event}if(!AR._button){AR._button=AR.which?AR.which:AR.button;AR._target=AR.target?AR.target:AR.srcElement}return AR}function AB(){var AS=0,AR=0;if(typeof window.innerWidth=="number"){AS=window.innerWidth;AR=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){AS=document.documentElement.clientWidth;AR=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){AS=document.body.clientWidth;AR=document.body.clientHeight}}}return{w:AS,h:AR}}function Z(){var AR=0,AS=0;if(typeof (window.pageYOffset)=="number"){AR=window.pageXOffset;AS=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){AR=document.body.scrollLeft;AS=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){AR=document.documentElement.scrollLeft;AS=document.documentElement.scrollTop}}}return{x:AR,y:AS}}function AH(AT){var AS,AU;if(window.innerHeight){AS=AT.pageX;AU=AT.pageY}else{var AR=Z();AS=AT.clientX+AR.x;AU=AT.clientY+AR.y}return{x:AS,y:AU}}function a(AS){var AR=a.L;return(AR[AS]?AR[AS]:0)}a.L={fr:2,de:3,es:6,ru:7,wotlk:0,ptr:25};function AF(AR){var AS=AF.L;return(AS[AR]?AS[AR]:-1)}AF.L={npc:1,object:2,item:3,itemset:4,quest:5,spell:6,zone:7,faction:8,pet:9,achievement:10};function o(AW,AS,AV){var AU={12:1.5,13:12,14:15,15:5,16:10,17:10,18:8,19:14,20:14,21:14,22:10,23:10,24:0,25:0,26:0,27:0,28:10,29:10,30:10,31:10,32:14,33:0,34:0,35:25,36:10,37:2.5,44:4.69512176513672};if(AW<0){AW=1}else{if(AW>80){AW=80}}if((AS==14||AS==12||AS==15)&&AW<34){AW=34}if(AV<0){AV=0}var AT;if(AU[AS]==null){AT=0}else{var AR;if(AW>70){AR=(82/52)*Math.pow((131/63),((AW-70)/10))}else{if(AW>60){AR=(82/(262-3*AW))}else{if(AW>10){AR=((AW-8)/52)}else{AR=2/52}}}AT=AV/AU[AS]/AR}return AT}var Y={applyto:3},I,y,AG,r,h,AI,i,w,u,Q=document.getElementsByTagName("head")[0],c={},X={},J={},AP={},x,W,C,d,AJ,F=1,n=0,z=!!(window.attachEvent&&!window.opera),S=navigator.userAgent.indexOf("MSIE 7.0")!=-1,U=navigator.userAgent.indexOf("MSIE 6.0")!=-1&&!S,g={loading:"Loading...",noresponse:"No response from server :("},AD=0,M=1,K=2,q=3,AC=4,f=3,p=5,V=6,AA=10,P=15,k=15,R={3:[c,"item","Item"],5:[X,"quest","Quest"],6:[J,"spell","Spell"],10:[AP,"achievement","Achievement"]},H={0:"enus",2:"frfr",3:"dede",6:"eses",7:"ruru",25:"ptr"};function AN(){N(Q,t("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power.css?3",rel:"stylesheet"}));if(z){N(Q,t("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie.css?3",rel:"stylesheet"}));if(U){N(Q,t("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie6.css?3",rel:"stylesheet"}))}}s(document,"mouseover",e)}function O(AR){var AS=AH(AR);w=AS.x;u=AS.y}function AO(Aa,AY){if(Aa.nodeName!="A"&&Aa.nodeName!="AREA"){return -2323}if(!Aa.href.length){return }var AX,AV,AT,AS,AU={};var AR=function(Ab,Ad,Ac){if(Ad=="buff"||Ad=="sock"){AU[Ad]=true}else{if(Ad=="rand"||Ad=="ench"||Ad=="lvl"){AU[Ad]=parseInt(Ac)}else{if(Ad=="gems"||Ad=="pcs"){AU[Ad]=Ac.split(":")}}}};if(Y.applyto&1){AX=1;AV=2;AT=3;AS=Aa.href.match(/^http:\/\/(www|dev|fr|es|de|ru|wotlk|ptr)?\.?wowhead\.com\/\?(item|quest|spell|achievement)=([0-9]+)/);n=0}if(AS==null&&(Y.applyto&2)&&Aa.rel){AX=0;AV=1;AT=2;AS=Aa.rel.match(/(item|quest|spell|achievement).?([0-9]+)/);n=1}Aa.href.replace(/([a-zA-Z]+).?([0-9:\\-]*)/g,AR);if(Aa.rel){Aa.rel.replace(/([a-zA-Z]+).?([0-9:\\-]*)/g,AR)}if(AS){var AZ,AW="www";if(AX&&AS[AX]){AW=AS[AX]}AZ=a(AW);if(AW=="wotlk"){AW="www"}r=AW;if(!Aa.onmousemove){Aa.onmousemove=B;Aa.onmouseout=D}O(AY);j(AF(AS[AV]),AS[AT],AZ,AU)}}function e(AT){AT=l(AT);var AS=AT._target;var AR=0;while(AS!=null&&AR<3&&AO(AS,AT)==-2323){AS=AS.parentNode;++AR}}function B(AR){AR=l(AR);O(AR);b()}function D(){I=null;h=[];AI=null;i=null;T()}function G(){if(!x){var AW=t("div"),Aa=t("table"),AT=t("tbody"),AV=t("tr"),AS=t("tr"),AR=t("td"),AZ=t("th"),AY=t("th"),AX=t("th");AW.className="wowhead-tooltip";AZ.style.backgroundPosition="top right";AY.style.backgroundPosition="bottom left";AX.style.backgroundPosition="bottom right";N(AV,AR);N(AV,AZ);N(AT,AV);N(AS,AY);N(AS,AX);N(AT,AS);N(Aa,AT);d=t("p");d.style.display="none";N(d,t("div"));N(AW,d);N(AW,Aa);N(document.body,AW);x=AW;W=Aa;C=AR;var AU=t("div");AU.className="wowhead-tooltip-powered";N(AW,AU);AJ=AU;T()}}function AQ(AU,AV,AW,AS){if(!x){G()}if(!AU){AU=R[I][2]+" not found :(";AV="Temp"}else{if(AW&&AW.length){var AX=0;for(var AT=0,AR=AW.length;AT<AR;++AT){if(m=AU.match(new RegExp("<span><!--si([0-9]+:)*"+AW[AT]+"(:[0-9]+)*-->"))){AU=AU.replace(m[0],'<span class="q8"><!--si'+AW[AT]+"-->");++AX}}if(AX>0){AU=AU.replace("(0/","("+AX+"/");AU=AU.replace(new RegExp("<span>\\(([0-"+AX+"])\\)","g"),'<span class="q2">($1)')}}if(AS){AU=AU.replace(/\(<!--r([0-9]+):([0-9]+):([0-9]+)-->([0-9.%]+)(.+?)([0-9]+)\)/g,function(AZ,AZ,Aa,AY,AZ,Ac,AZ){var Ab=o(AS,Aa,AY);Ab=(Math.round(Ab*100)/100);if(Aa!=12&&Aa!=37){Ab+="%"}return"(<!--r"+AS+":"+Aa+":"+AY+"-->"+Ab+Ac+AS+")"})}}if(AJ){AJ.style.display=(n?"":"none")}if(F&&AV){d.style.backgroundImage="url(http://static.wowhead.com/images/icons/medium/"+AV.toLowerCase()+".jpg)";d.style.display=""}else{d.style.backgroundImage="none";d.style.display="none"}x.style.display="";x.style.width="320px";C.innerHTML=AU;AM();b();x.style.visibility="visible"}function T(){if(!x){return }x.style.display="none";x.style.visibility="hidden"}function AM(){var AS=C.childNodes;if(AS.length>=2&&AS[0].nodeName=="TABLE"&&AS[1].nodeName=="TABLE"){AS[0].style.whiteSpace="nowrap";var AR;if(AS[1].offsetWidth>300){AR=Math.max(300,AS[0].offsetWidth)+20}else{AR=Math.max(AS[0].offsetWidth,AS[1].offsetWidth)+20}if(AR>20){x.style.width=AR+"px";AS[0].style.width=AS[1].style.width="100%"}}else{x.style.width=W.offsetWidth+"px"}}function b(){if(!x){return }if(w==null){return }var Aa=AB(),Ab=Z(),AX=Aa.w,AU=Aa.h,AW=Ab.x,AT=Ab.y,AV=W.offsetWidth,AR=W.offsetHeight,AS=w+P,AZ=u-AR-k;if(AS+P+AV+4>=AW+AX){var AY=w-AV-P;if(AY>=0){AS=AY}else{AS=AW+AX-AV-P-4}}if(AZ<AT){AZ=u+k;if(AZ+AR>AT+AU){AZ=AT+AU-AR;if(F){if(w>=AS-48&&w<=AS&&u>=AZ-4&&u<=AZ+48){AZ-=48-(u-AZ)}}}}x.style.left=AS+"px";x.style.top=AZ+"px"}function AK(AR){return(i?"buff_":"tooltip_")+H[AR]}function AE(AT,AU,AS){var AR=R[AT][0];if(AR[AU]==null){AR[AU]={}}if(AR[AU].status==null){AR[AU].status={}}if(AR[AU].status[AS]==null){AR[AU].status[AS]=AD}}function j(AU,AW,AS,AV){if(!AV){AV={}}var AT=AW+(AV.rand?"r"+AV.rand:"")+(AV.ench?"e"+AV.ench:"")+(AV.gems?"g"+AV.gems.join(","):"")+(AV.sock?"s":"");I=AU;y=AT;AG=AS;h=AV.pcs;AI=AV.lvl;i=AV.buff;AE(AU,AT,AS);var AR=R[AU][0];if(AR[AT].status[AS]==AC||AR[AT].status[AS]==q){AQ(AR[AT][AK(AS)],AR[AT].icon,h,AI)}else{if(AR[AT].status[AS]==M){AQ(g.tooltip_loading)}else{E(AU,AW,AS,null,AV)}}}function E(AX,AR,AZ,AW,AT){var AY=AR+(AT.rand?"r"+AT.rand:"")+(AT.ench?"e"+AT.ench:"")+(AT.gems?"g"+AT.gems.join(","):"")+(AT.sock?"s":"");var AV=R[AX][0];if(AV[AY].status[AZ]!=AD&&AV[AY].status[AZ]!=K){return }AV[AY].status[AZ]=M;if(!AW){AV[AY].timer=setTimeout(function(){L.apply(this,[AX,AY,AZ])},333)}var AS="";for(var AU in AT){if(AU!="rand"&&AU!="ench"&&AU!="gems"&&AU!="sock"){continue}if(typeof AT[AU]=="object"){AS+="&"+AU+"="+AT[AU].join(":")}else{if(AU=="sock"){AS+="&sock"}else{AS+="&"+AU+"="+AT[AU]}}}A("http://"+r+".wowhead.com/?"+R[AX][1]+"="+AR+AS+"&power&lol")}function A(AR){N(Q,t("script",{type:"text/javascript",src:AR}))}function L(AT,AU,AS){if(I==AT&&y==AU&&AG==AS){AQ(g.loading);var AR=R[AT][0];AR[AU].timer=setTimeout(function(){v.apply(this,[AT,AU,AS])},3850)}}function v(AT,AU,AS){var AR=R[AT][0];AR[AU].status[AS]=K;if(I==AT&&y==AU&&AG==AS){AQ(g.tooltip_noresponse)}}this.register=function(AU,AV,AS,AT){var AR=R[AU][0];clearTimeout(AR[AV].timer);AL(AR[AV],AT);if(AR[AV][AK(AS)]){AR[AV].status[AS]=AC}else{AR[AV].status[AS]=q}if(I==AU&&AV==y&&AG==AS){AQ(AR[AV][AK(AS)],AR[AV].icon,h,AI)}};this.registerItem=function(AT,AR,AS){this.register(f,AT,AR,AS)};this.registerQuest=function(AT,AR,AS){this.register(p,AT,AR,AS)};this.registerSpell=function(AT,AR,AS){this.register(V,AT,AR,AS)};this.registerAchievement=function(AT,AR,AS){this.register(AA,AT,AR,AS)};this.set=function(AR){AL(Y,AR)};this.showTooltip=function(AT,AS,AR){O(AT);AQ(AS,AR)};this.hideTooltip=function(){T()};this.moveTooltip=function(AR){B(AR)};AN()}};