if(typeof $WowheadPower=="undefined"){var $WowheadPower=new function(){function p(AM,AL){var AK=document.createElement(AM);if(AL){AF(AK,AL)}return AK}function N(AK,AL){return AK.appendChild(AL)}function o(AL,AM,AK){if(window.attachEvent){AL.attachEvent("on"+AM,AK)}else{AL.addEventListener(AM,AK,false)}}function AF(AM,AK){for(var AL in AK){if(typeof AK[AL]=="object"){if(!AM[AL]){AM[AL]={}}AF(AM[AL],AK[AL])}else{AM[AL]=AK[AL]}}}function j(AK){if(!AK){AK=event}if(!AK._button){AK._button=AK.which?AK.which:AK.button;AK._target=AK.target?AK.target:AK.srcElement}return AK}function w(){var AL=0,AK=0;if(typeof window.innerWidth=="number"){AL=window.innerWidth;AK=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){AL=document.documentElement.clientWidth;AK=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){AL=document.body.clientWidth;AK=document.body.clientHeight}}}return{w:AL,h:AK}}function Z(){var AK=0,AL=0;if(typeof (window.pageYOffset)=="number"){AK=window.pageXOffset;AL=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){AK=document.body.scrollLeft;AL=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){AK=document.documentElement.scrollLeft;AL=document.documentElement.scrollTop}}}return{x:AK,y:AL}}function AC(AM){var AL,AN;if(window.innerHeight){AL=AM.pageX;AN=AM.pageY}else{var AK=Z();AL=AM.clientX+AK.x;AN=AM.clientY+AK.y}return{x:AL,y:AN}}function a(AL){var AK=a.L;return(AK[AL]?AK[AL]:0)}a.L={fr:2,de:3,es:6};function AA(AK){var AL=AA.L;return(AL[AK]?AL[AK]:-1)}AA.L={npc:1,object:2,item:3,itemset:4,quest:5,spell:6,zone:7,faction:8};var Y={applyto:3},I,u,AB,n,s,q,Q=document.getElementsByTagName("head")[0],c=[],X=[],J=[],t,W,C,d,AD,F=1,k=0,v=!!(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 :("},y=0,M=1,K=2,m=3,x=4,f=3,l=5,V=6,P=15,i=15,R={3:[c,"item","Item"],5:[X,"quest","Quest"],6:[J,"spell","Spell"]},H={0:"enus",2:"frfr",3:"dede",6:"eses"};function AH(){N(Q,p("link",{type:"text/css",href:"http://www.wowhead.com/widgets/power/power.css?3",rel:"stylesheet"}));if(v){N(Q,p("link",{type:"text/css",href:"http://www.wowhead.com/widgets/power/power_ie.css?3",rel:"stylesheet"}));if(U){N(Q,p("link",{type:"text/css",href:"http://www.wowhead.com/widgets/power/power_ie6.css?3",rel:"stylesheet"}))}}o(document,"mouseover",e)}function O(AK){var AL=AC(AK);s=AL.x;q=AL.y}function AI(AM,AR){if(AM.nodeName!="A"&&AM.nodeName!="AREA"){return -2323}if(!AM.href.length){return }var AQ,AO,AN,AL;AO=2;AN=3;if(Y.applyto&1){AQ=1;AL=AM.href.match(/^http:\/\/(www|dev|fr|es|de|wotlk)?\.?wowhead\.com\/\?(item|quest|spell)=([0-9]+)/);k=0}if(AL==null&&(Y.applyto&2)&&AM.rel){AQ=0;AO=1;AN=2;AL=AM.rel.match(/(item|quest|spell).?([0-9]+)/);k=1}if(AL){var AK,AP="www";if(AQ&&AL[AQ]){AP=AL[AQ]}AK=a(AP);n=AP;if(!AM.onmousemove){AM.onmousemove=B;AM.onmouseout=D}O(AR);h(AA(AL[AO]),AL[AN],AK)}}function e(AM){AM=j(AM);var AL=AM._target;var AK=0;while(AL!=null&&AK<3&&AI(AL,AM)==-2323){AL=AL.parentNode;++AK}}function B(AK){AK=j(AK);O(AK);b()}function D(){I=null;T()}function G(){if(!t){var AP=p("div"),AT=p("table"),AM=p("tbody"),AO=p("tr"),AL=p("tr"),AK=p("td"),AS=p("th"),AR=p("th"),AQ=p("th");AP.className="wowhead-tooltip";AS.style.backgroundPosition="top right";AR.style.backgroundPosition="bottom left";AQ.style.backgroundPosition="bottom right";N(AO,AK);N(AO,AS);N(AM,AO);N(AL,AR);N(AL,AQ);N(AM,AL);N(AT,AM);d=p("p");d.style.display="none";N(d,p("div"));N(AP,d);N(AP,AT);N(document.body,AP);t=AP;W=AT;C=AK;var AN=p("div");AN.className="wowhead-tooltip-powered";N(AP,AN);AD=AN;T()}}function AJ(AK,AL){if(!t){G()}if(!AK){AK=R[I][2]+" not found :(";AL="Temp"}if(AD){AD.style.display=(k?"":"none")}if(F&&AL){d.style.backgroundImage="url(http://static.wowhead.com/images/icons/medium/"+AL.toLowerCase()+".jpg)";d.style.display=""}else{d.style.backgroundImage="none";d.style.display="none"}t.style.display="";t.style.width="320px";C.innerHTML=AK;AG();b();t.style.visibility="visible"}function T(){if(!t){return }t.style.display="none";t.style.visibility="hidden"}function AG(){var AL=C.childNodes;if(AL.length>=2&&AL[0].nodeName=="TABLE"&&AL[1].nodeName=="TABLE"){var AK;if(AL[1].offsetWidth>300){AK=Math.max(300,AL[0].offsetWidth)+20}else{AK=Math.max(AL[0].offsetWidth,AL[1].offsetWidth)+20}if(AK>20){t.style.width=AK+"px";AL[0].style.width=AL[1].style.width="100%"}}else{t.style.width=W.offsetWidth+"px"}}function b(){if(!t){return }if(s==null){return }var AT=w(),AU=Z(),AQ=AT.w,AN=AT.h,AP=AU.x,AM=AU.y,AO=W.offsetWidth,AK=W.offsetHeight,AL=s+P,AS=q-AK-i;if(AL+P+AO+4>=AP+AQ){var AR=s-AO-P;if(AR>=0){AL=AR}else{AL=AP+AQ-AO-P-4}}if(AS<AM){AS=q+i;if(AS+AK>AM+AN){AS=AM+AN-AK;if(F){if(s>=AL-48&&s<=AL&&q>=AS-4&&q<=AS+48){AS-=48-(q-AS)}}}}t.style.left=AL+"px";t.style.top=AS+"px"}function AE(AK){return"tooltip_"+H[AK]}function z(AM,AN,AL){var AK=R[AM][0];if(AK[AN]==null){AK[AN]={}}if(AK[AN].status==null){AK[AN].status={}}if(AK[AN].status[AL]==null){AK[AN].status[AL]=y}}function h(AM,AN,AL){I=AM;u=AN;AB=AL;z(AM,AN,AL);var AK=R[AM][0];if(AK[AN].status[AL]==x||AK[AN].status[AL]==m){AJ(AK[AN][AE(AL)],AK[AN].icon)}else{if(AK[AN].status[AL]==M){AJ(g.tooltip_loading)}else{E(AM,AN,AL)}}}function E(AN,AO,AL,AM){var AK=R[AN][0];if(AK[AO].status[AL]!=y&&AK[AO].status[AL]!=K){return }AK[AO].status[AL]=M;if(!AM){AK[AO].timer=setTimeout(function(){L.apply(this,[AN,AO,AL])},333)}A("http://"+n+".wowhead.com/?"+R[AN][1]+"="+AO+"&power")}function A(AK){N(Q,p("script",{type:"text/javascript",src:AK}))}function L(AM,AN,AL){if(I==AM&&u==AN&&AB==AL){AJ(g.loading);var AK=R[AM][0];AK[AN].timer=setTimeout(function(){r.apply(this,[AM,AN,AL])},3850)}}function r(AM,AN,AL){var AK=R[AM][0];AK[AN].status[AL]=K;if(I==AM&&u==AN&&AB==AL){AJ(g.tooltip_noresponse)}}this.register=function(AN,AO,AL,AM){var AK=R[AN][0];clearTimeout(AK[AO].timer);AF(AK[AO],AM);if(AK[AO][AE(AL)]){AK[AO].status[AL]=x}else{AK[AO].status[AL]=m}if(I==AN&&AO==u&&AB==AL){AJ(AK[AO][AE(AL)],AK[AO].icon)}};this.registerItem=function(AM,AK,AL){this.register(f,AM,AK,AL)};this.registerQuest=function(AM,AK,AL){this.register(l,AM,AK,AL)};this.registerSpell=function(AM,AK,AL){this.register(V,AM,AK,AL)};this.set=function(AK){AF(Y,AK)};this.showTooltip=function(AM,AL,AK){O(AM);AJ(AL,AK)};this.hideTooltip=function(){T()};this.moveTooltip=function(AK){B(AK)};AH()}};