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