/*
 * Wowhead script
 */
 if(typeof $WowheadPower=="undefined"){var $WowheadPower=new function(){var ag=(typeof g_getIngameLink=="undefined");var T={};if(ag){T.ce=function(au,at){var ar=document.createElement(au);if(at){T.cO(ar,at)}return ar};T.ae=function(ar,at){return ar.appendChild(at)};T.aE=function(at,au,ar){if(window.attachEvent){at.attachEvent("on"+au,ar)}else{at.addEventListener(au,ar,false)}};T.cO=function(au,ar){for(var at in ar){if(typeof ar[at]=="object"){if(!au[at]){au[at]={}}T.cO(au[at],ar[at])}else{au[at]=ar[at]}}};T.$E=function(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};T.sprintf=function(at){var ar;for(ar=1,len=arguments.length;ar<len;++ar){at=at.replace("$"+ar,arguments[ar])}return at};T.getWindowSize=function(){var ar=0,at=0;if(typeof window.innerWidth=="number"){ar=window.innerWidth;at=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){ar=document.documentElement.clientWidth;at=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){ar=document.body.clientWidth;at=document.body.clientHeight}}}return{w:ar,h:at}};T.getScroll=function(){var ar=0,at=0;if(typeof(window.pageYOffset)=="number"){ar=window.pageXOffset;at=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){ar=document.body.scrollLeft;at=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){ar=document.documentElement.scrollLeft;at=document.documentElement.scrollTop}}}return{x:ar,y:at}};T.getCursorPos=function(au){var ar,av;if(window.innerHeight){ar=au.pageX;av=au.pageY}else{var at=T.getScroll();ar=au.clientX+at.x;av=au.clientY+at.y}return{x:ar,y:av}};T.createReverseLookupJson=function(at){var au={};for(var ar in at){au[at[ar]]=ar}return au};T.getLocaleFromDomain=function(ar){var au=T.getLocaleFromDomain.L;if(ar){var at=ar.indexOf(".");if(at!=-1){ar=ar.substring(0,at)}}return(au[ar]?au[ar]:0)};T.getLocaleFromDomain.L={fr:2,de:3,es:6,ru:7,ptr:25};T.getDomainFromLocale=function(ar){var at;if(T.getDomainFromLocale.L){at=T.getDomainFromLocale.L}else{at=T.getDomainFromLocale.L=T.createReverseLookupJson(T.getLocaleFromDomain.L)}return(at[ar]?at[ar]:"www")};T.getIdFromTypeName=function(ar){var at=T.getIdFromTypeName.L;return(at[ar]?at[ar]:-1)};T.getIdFromTypeName.L={npc:1,object:2,item:3,itemset:4,quest:5,spell:6,zone:7,faction:8,pet:9,achievement:10,profile:100};T.ajaxIshRequest=function(ar){T.ae(t,T.ce("script",{type:"text/javascript",src:ar}))};T.convertRatingToPercent=function(ax,at,aw){var av={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/1.1};if(ax<0){ax=1}else{if(ax>80){ax=80}}if((at==14||at==12||at==15)&&ax<34){ax=34}if(aw<0){aw=0}var ar;if(av[at]==null){ar=0}else{var au;if(ax>70){au=(82/52)*Math.pow((131/63),((ax-70)/10))}else{if(ax>60){au=(82/(262-3*ax))}else{if(ax>10){au=((ax-8)/52)}else{au=2/52}}}ar=aw/av[at]/au}return ar}}else{T.ae=ae;T.ce=ce;T.aE=aE;T.cO=cO;T.$E=$E;T.sprintf=sprintf;T.getWindowSize=g_getWindowSize;T.getScroll=g_getScroll;T.getCursorPos=g_getCursorPos;T.createReverseLookupJson=g_createReverseLookupJson;T.getLocaleFromDomain=g_getLocaleFromDomain;T.getDomainFromLocale=g_getDomainFromLocale;T.getIdFromTypeName=g_getIdFromTypeName;T.ajaxIshRequest=g_ajaxIshRequest;T.convertRatingToPercent=g_convertRatingToPercent}var D={applyto:3},t=document.getElementsByTagName("head")[0],M=false,i,Y,ac,Q,y,ak,V,S,k=0,X={},j={},F={},O={},af={},aq={},g={},w,C,ao,E,ah,aj=1,H=0,W=!!(window.attachEvent&&!window.opera),v=navigator.userAgent.indexOf("MSIE 7.0")!=-1,x=navigator.userAgent.indexOf("MSIE 6.0")!=-1&&!v,ab=0,aa=1,l=2,z=3,Z=4,B=1,n=2,J=3,P=5,A=6,q=10,m=100,s=15,L=15,I={loading:"Loading...",noresponse:"No response from server :(",achievementcomplete:"Achievement earned by $1 on $2/$3/$4"},u={1:[X,"npc","NPC"],2:[j,"object","Object"],3:[F,"item","Item"],5:[O,"quest","Quest"],6:[af,"spell","Spell"],10:[aq,"achievement","Achievement"],100:[g,"profile","Profile"]},f={0:"enus",2:"frfr",3:"dede",6:"eses",7:"ruru"},b={wotlk:"www"};if(ag){var ad={id:0,name:"enus"}}if(M){f[25]="ptr"}else{b.ptr="www"}function al(){if(ag){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power.css?3",rel:"stylesheet"}));if(W){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie.css?3",rel:"stylesheet"}));if(x){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie6.css?3",rel:"stylesheet"}))}}}T.aE(document,"mouseover",G)}function r(ar){var at=T.getCursorPos(ar);V=at.x;S=at.y}function an(aF,aA){if(aF.nodeName!="A"&&aF.nodeName!="AREA"){return -2323}if(!aF.href.length){return}if(aF.rel.indexOf("np")!=-1){return}var ax,aw,au,at,ay={};y=ay;var ar=function(aG,aI,aH){if(aI=="buff"||aI=="sock"){ay[aI]=true}else{if(aI=="rand"||aI=="ench"||aI=="lvl"||aI=="c"){ay[aI]=parseInt(aH)}else{if(aI=="gems"||aI=="pcs"){ay[aI]=aH.split(":")}else{if(aI=="who"||aI=="domain"){ay[aI]=aH}else{if(aI=="when"){ay[aI]=new Date(parseInt(aH))}}}}}};if(D.applyto&1){aw=2;au=3;if(aF.href.indexOf("http://")==0){ax=1;at=aF.href.match(/^http:\/\/(.+?)?\.?wowhead\.com\/\?(item|quest|spell|achievement|npc|object)=([0-9]+)/);if(at==null){at=aF.href.match(/^http:\/\/(.+?)?\.?wowhead\.com\/\?(profile)=([^&#]+)/)}H=0}else{at=aF.href.match(/()\?(item|quest|spell|achievement|npc|object)=([0-9]+)/);if(at==null){at=aF.href.match(/()\?(profile)=([^&#]+)/)}H=1}}if(at==null&&aF.rel&&(D.applyto&2)){ax=0;aw=1;au=2;at=aF.rel.match(/(item|quest|spell|achievement|npc|object).?([0-9]+)/);if(at==null){at=aF.rel.match(/(profile).?([^&#]+)/)}H=1}if(aF.rel){aF.rel.replace(/([a-zA-Z]+)=?([a-zA-Z0-9:-]*)/g,ar);if(ay.gems&&ay.gems.length>0){var az;for(az=Math.min(3,ay.gems.length-1);az>=0;--az){if(parseInt(ay.gems[az])){break}}++az;if(az==0){delete ay.gems}else{if(az<ay.gems.length){ay.gems=ay.gems.slice(0,az)}}}}if(at){var aD,av="www";ak=aF;if(ay.domain){av=ay.domain}else{if(ax&&at[ax]){av=at[ax]}}if(b[av]){av=b[av]}aD=T.getLocaleFromDomain(av);Q=av;if(aF.href.indexOf("#")!=-1&&document.location.href.indexOf(at[aw]+"="+at[au])!=-1){return}k=(aF.parentNode.className.indexOf("icon")==0?1:0);if(!aF.onmouseout){if(k==0){aF.onmousemove=a}aF.onmouseout=am}r(aA);var aC=T.getIdFromTypeName(at[aw]),aB=at[au];if(aC==m&&(typeof g_dev=="undefined"||!g_dev)){aD=0}K(aC,aB,aD,ay)}}function G(au){au=T.$E(au);var at=au._target;var ar=0;while(at!=null&&ar<5&&an(at,au)==-2323){at=at.parentNode;++ar}}function a(ar){ar=T.$E(ar);r(ar);if(ag){N()}else{Tooltip.move(V,S,0,0,s,L)}}function am(){i=null;ak=null;if(ag){R()}else{Tooltip.hide()}}function ai(ar){return(y&&y.buff?"buff_":"tooltip_")+f[ar]}function o(at,av,au){var ar=u[at][0];if(ar[av]==null){ar[av]={}}if(ar[av].status==null){ar[av].status={}}if(ar[av].status[au]==null){ar[av].status[au]=ab}}function K(at,ax,av,aw){if(!aw){aw={}}var au=h(ax,aw);i=at;Y=au;ac=av;y=aw;o(at,au,av);var ar=u[at][0];if(ar[au].status[av]==Z||ar[au].status[av]==z){ap(ar[au][ai(av)],ar[au].icon)}else{if(ar[au].status[av]==aa){ap(I.loading)}else{c(at,ax,av,null,aw)}}}function c(aB,aw,aC,au,ax){var ar=h(aw,ax);var az=u[aB][0];if(az[ar].status[aC]!=ab&&az[ar].status[aC]!=l){return}az[ar].status[aC]=aa;if(!au){az[ar].timer=setTimeout(function(){p.apply(this,[aB,ar,aC])},333)}var av="";for(var ay in ax){if(ay!="rand"&&ay!="ench"&&ay!="gems"&&ay!="sock"){continue}if(typeof ax[ay]=="object"){av+="&"+ay+"="+ax[ay].join(":")}else{if(ay=="sock"){av+="&sock"}else{av+="&"+ay+"="+ax[ay]}}}var at="";if(typeof g_dev=="undefined"||!g_dev){at+="http://"+T.getDomainFromLocale(aC)+".wowhead.com"}else{if(document.domain.indexOf("dev.wowhead.com")!=-1){var aA=T.getDomainFromLocale(aC);if(aA!="www"&&document.domain.indexOf(aA)!=0){at+="http://"+T.getDomainFromLocale(aC)+"."+document.domain}}}at+="/?"+u[aB][1]+"="+aw+"&power"+av;T.ajaxIshRequest(at)}function ap(av,aw){if(ak&&ak._fixTooltip){ak._fixTooltip(av,i,Y,ak)}var ax=false;if(ag&&!w){e()}if(!av){av=u[i][2]+" not found :(";aw="inv_misc_questionmark";ax=true}else{if(y!=null){if(y.pcs&&y.pcs.length){var ay=0;for(var au=0,at=y.pcs.length;au<at;++au){var ar;if(ar=av.match(new RegExp("<span><!--si([0-9]+:)*"+y.pcs[au]+"(:[0-9]+)*-->"))){av=av.replace(ar[0],'<span class="q8"><!--si'+y.pcs[au]+"-->");++ay}}if(ay>0){av=av.replace("(0/","("+ay+"/");av=av.replace(new RegExp("<span>\\(([0-"+ay+"])\\)","g"),'<span class="q2">($1)')}}if(y.c){av=av.replace(/<span class="c([0-9]+?)">(.+?)<\/span><br \/>/g,'<span class="c$1" style="display: none">$2</span>');av=av.replace(new RegExp('<span class="c('+y.c+')" style="display: none">(.+?)</span>',"g"),'<span class="c$1">$2</span><br />')}if(y.lvl){av=g_setTooltipItemLevel(av,y.lvl)}if(y.who&&y.when){av=av.replace("<table><tr><td><br />",'<table><tr><td><br /><span class="q2">'+T.sprintf(I.achievementcomplete,y.who,y.when.getMonth()+1,y.when.getDate(),y.when.getFullYear())+"</span><br /><br />");av=av.replace(/class="q0"/g,'class="r3"')}}}if(ag&&ah){ah.style.display=(H&&!ax?"":"none")}if(!ag){if(k==1){Tooltip.setIcon(null);Tooltip.show(ak,av)}else{Tooltip.setIcon(aw);Tooltip.showAtXY(av,V,S,s,L)}}else{if(aj&&aw){E.style.backgroundImage="url(http://static.wowhead.com/images/icons/medium/"+aw.toLowerCase()+".jpg)";E.style.display=""}else{E.style.backgroundImage="none";E.style.display="none"}w.style.display="";w.style.width="320px";ao.innerHTML=av;d();N();w.style.visibility="visible"}}function p(at,av,au){if(i==at&&Y==av&&ac==au){ap(I.loading);var ar=u[at][0];ar[av].timer=setTimeout(function(){U.apply(this,[at,av,au])},3850)}}function U(at,av,au){var ar=u[at][0];ar[av].status[au]=l;if(i==at&&Y==av&&ac==au){ap(I.noresponse)}}function h(at,ar){return at+(ar.rand?"r"+ar.rand:"")+(ar.ench?"e"+ar.ench:"")+(ar.gems?"g"+ar.gems.join(","):"")+(ar.sock?"s":"")}this.register=function(au,aw,av,at){var ar=u[au][0];o(au,aw,av);if(ar[aw].timer){clearTimeout(ar[aw].timer);ar[aw].timer=null}T.cO(ar[aw],at);if(ar[aw].status[av]==aa){if(ar[aw][ai(av)]){ar[aw].status[av]=Z}else{ar[aw].status[av]=z}}if(i==au&&aw==Y&&ac==av){ap(ar[aw][ai(av)],ar[aw].icon)}};this.registerNpc=function(au,at,ar){this.register(B,au,at,ar)};this.registerObject=function(au,at,ar){this.register(n,au,at,ar)};this.registerItem=function(au,at,ar){this.register(J,au,at,ar)};this.registerQuest=function(au,at,ar){this.register(P,au,at,ar)};this.registerSpell=function(au,at,ar){this.register(A,au,at,ar)};this.registerAchievement=function(au,at,ar){this.register(q,au,at,ar)};this.registerProfile=function(au,at,ar){this.register(m,au,at,ar)};this.request=function(ar,aw,au,av){if(!av){av={}}var at=h(aw,av);o(ar,at,au);c(ar,aw,au,1,av)};this.requestItem=function(at,ar){this.request(J,at,ad.id,ar)};this.requestSpell=function(ar){this.request(A,ar,ad.id)};this.getStatus=function(at,av,au){var ar=u[at][0];if(ar[av]!=null){return ar[av].status[au]}else{return ab}};this.getItemStatus=function(at,ar){this.getStatus(J,at,ar)};this.getSpellStatus=function(at,ar){this.getStatus(A,at,ar)};if(ag){this.set=function(ar){T.cO(D,ar)};this.showTooltip=function(au,ar,at){r(au);ap(ar,at)};this.hideTooltip=function(){R()};this.moveTooltip=function(ar){a(ar)};function e(){if(!w){var ax=T.ce("div"),aB=T.ce("table"),at=T.ce("tbody"),aw=T.ce("tr"),au=T.ce("tr"),ar=T.ce("td"),aA=T.ce("th"),az=T.ce("th"),ay=T.ce("th");ax.className="wowhead-tooltip";aA.style.backgroundPosition="top right";az.style.backgroundPosition="bottom left";ay.style.backgroundPosition="bottom right";T.ae(aw,ar);T.ae(aw,aA);T.ae(at,aw);T.ae(au,az);T.ae(au,ay);T.ae(at,au);T.ae(aB,at);E=T.ce("p");E.style.display="none";T.ae(E,T.ce("div"));T.ae(ax,E);T.ae(ax,aB);T.ae(document.body,ax);w=ax;C=aB;ao=ar;var av=T.ce("div");av.className="wowhead-tooltip-powered";T.ae(ax,av);ah=av;R()}}function R(){if(!w){return}w.style.display="none";w.style.visibility="hidden"}function d(){var at=ao.childNodes;if(at.length>=2&&at[0].nodeName=="TABLE"&&at[1].nodeName=="TABLE"){at[0].style.whiteSpace="nowrap";var ar;if(at[1].offsetWidth>300){ar=Math.max(300,at[0].offsetWidth)+20}else{ar=Math.max(at[0].offsetWidth,at[1].offsetWidth)+20}if(ar>20){w.style.width=ar+"px";at[0].style.width=at[1].style.width="100%"}}else{w.style.width=C.offsetWidth+"px"}}function N(){if(!w){return}if(V==null){return}var aB=T.getWindowSize(),aC=T.getScroll(),ay=aB.w,av=aB.h,ax=aC.x,au=aC.y,aw=C.offsetWidth,ar=C.offsetHeight,at=V+s,aA=S-ar-L;if(at+s+aw+4>=ax+ay){var az=V-aw-s;if(az>=0){at=az}else{at=ax+ay-aw-s-4}}if(aA<au){aA=S+L;if(aA+ar>au+av){aA=au+av-ar;if(aj){if(V>=at-48&&V<=at&&S>=aA-4&&S<=aA+48){aA-=48-(S-aA)}}}}w.style.left=at+"px";w.style.top=aA+"px"}}al()}};if(typeof $WowheadPower=="undefined"){var $WowheadPower=new function(){var ag=(typeof g_getIngameLink=="undefined");var T={};if(ag){T.ce=function(au,at){var ar=document.createElement(au);if(at){T.cO(ar,at)}return ar};T.ae=function(ar,at){return ar.appendChild(at)};T.aE=function(at,au,ar){if(window.attachEvent){at.attachEvent("on"+au,ar)}else{at.addEventListener(au,ar,false)}};T.cO=function(au,ar){for(var at in ar){if(typeof ar[at]=="object"){if(!au[at]){au[at]={}}T.cO(au[at],ar[at])}else{au[at]=ar[at]}}};T.$E=function(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};T.sprintf=function(at){var ar;for(ar=1,len=arguments.length;ar<len;++ar){at=at.replace("$"+ar,arguments[ar])}return at};T.getWindowSize=function(){var ar=0,at=0;if(typeof window.innerWidth=="number"){ar=window.innerWidth;at=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){ar=document.documentElement.clientWidth;at=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){ar=document.body.clientWidth;at=document.body.clientHeight}}}return{w:ar,h:at}};T.getScroll=function(){var ar=0,at=0;if(typeof(window.pageYOffset)=="number"){ar=window.pageXOffset;at=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){ar=document.body.scrollLeft;at=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){ar=document.documentElement.scrollLeft;at=document.documentElement.scrollTop}}}return{x:ar,y:at}};T.getCursorPos=function(au){var ar,av;if(window.innerHeight){ar=au.pageX;av=au.pageY}else{var at=T.getScroll();ar=au.clientX+at.x;av=au.clientY+at.y}return{x:ar,y:av}};T.createReverseLookupJson=function(at){var au={};for(var ar in at){au[at[ar]]=ar}return au};T.getLocaleFromDomain=function(ar){var au=T.getLocaleFromDomain.L;if(ar){var at=ar.indexOf(".");if(at!=-1){ar=ar.substring(0,at)}}return(au[ar]?au[ar]:0)};T.getLocaleFromDomain.L={fr:2,de:3,es:6,ru:7,ptr:25};T.getDomainFromLocale=function(ar){var at;if(T.getDomainFromLocale.L){at=T.getDomainFromLocale.L}else{at=T.getDomainFromLocale.L=T.createReverseLookupJson(T.getLocaleFromDomain.L)}return(at[ar]?at[ar]:"www")};T.getIdFromTypeName=function(ar){var at=T.getIdFromTypeName.L;return(at[ar]?at[ar]:-1)};T.getIdFromTypeName.L={npc:1,object:2,item:3,itemset:4,quest:5,spell:6,zone:7,faction:8,pet:9,achievement:10,profile:100};T.ajaxIshRequest=function(ar){T.ae(t,T.ce("script",{type:"text/javascript",src:ar}))};T.convertRatingToPercent=function(ax,at,aw){var av={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/1.1};if(ax<0){ax=1}else{if(ax>80){ax=80}}if((at==14||at==12||at==15)&&ax<34){ax=34}if(aw<0){aw=0}var ar;if(av[at]==null){ar=0}else{var au;if(ax>70){au=(82/52)*Math.pow((131/63),((ax-70)/10))}else{if(ax>60){au=(82/(262-3*ax))}else{if(ax>10){au=((ax-8)/52)}else{au=2/52}}}ar=aw/av[at]/au}return ar}}else{T.ae=ae;T.ce=ce;T.aE=aE;T.cO=cO;T.$E=$E;T.sprintf=sprintf;T.getWindowSize=g_getWindowSize;T.getScroll=g_getScroll;T.getCursorPos=g_getCursorPos;T.createReverseLookupJson=g_createReverseLookupJson;T.getLocaleFromDomain=g_getLocaleFromDomain;T.getDomainFromLocale=g_getDomainFromLocale;T.getIdFromTypeName=g_getIdFromTypeName;T.ajaxIshRequest=g_ajaxIshRequest;T.convertRatingToPercent=g_convertRatingToPercent}var D={applyto:3},t=document.getElementsByTagName("head")[0],M=false,i,Y,ac,Q,y,ak,V,S,k=0,X={},j={},F={},O={},af={},aq={},g={},w,C,ao,E,ah,aj=1,H=0,W=!!(window.attachEvent&&!window.opera),v=navigator.userAgent.indexOf("MSIE 7.0")!=-1,x=navigator.userAgent.indexOf("MSIE 6.0")!=-1&&!v,ab=0,aa=1,l=2,z=3,Z=4,B=1,n=2,J=3,P=5,A=6,q=10,m=100,s=15,L=15,I={loading:"Loading...",noresponse:"No response from server :(",achievementcomplete:"Achievement earned by $1 on $2/$3/$4"},u={1:[X,"npc","NPC"],2:[j,"object","Object"],3:[F,"item","Item"],5:[O,"quest","Quest"],6:[af,"spell","Spell"],10:[aq,"achievement","Achievement"],100:[g,"profile","Profile"]},f={0:"enus",2:"frfr",3:"dede",6:"eses",7:"ruru"},b={wotlk:"www"};if(ag){var ad={id:0,name:"enus"}}if(M){f[25]="ptr"}else{b.ptr="www"}function al(){if(ag){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power.css?3",rel:"stylesheet"}));if(W){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie.css?3",rel:"stylesheet"}));if(x){T.ae(t,T.ce("link",{type:"text/css",href:"http://static.wowhead.com/widgets/power/power_ie6.css?3",rel:"stylesheet"}))}}}T.aE(document,"mouseover",G)}function r(ar){var at=T.getCursorPos(ar);V=at.x;S=at.y}function an(aF,aA){if(aF.nodeName!="A"&&aF.nodeName!="AREA"){return -2323}if(!aF.href.length){return}if(aF.rel.indexOf("np")!=-1){return}var ax,aw,au,at,ay={};y=ay;var ar=function(aG,aI,aH){if(aI=="buff"||aI=="sock"){ay[aI]=true}else{if(aI=="rand"||aI=="ench"||aI=="lvl"||aI=="c"){ay[aI]=parseInt(aH)}else{if(aI=="gems"||aI=="pcs"){ay[aI]=aH.split(":")}else{if(aI=="who"||aI=="domain"){ay[aI]=aH}else{if(aI=="when"){ay[aI]=new Date(parseInt(aH))}}}}}};if(D.applyto&1){aw=2;au=3;if(aF.href.indexOf("http://")==0){ax=1;at=aF.href.match(/^http:\/\/(.+?)?\.?wowhead\.com\/\?(item|quest|spell|achievement|npc|object)=([0-9]+)/);if(at==null){at=aF.href.match(/^http:\/\/(.+?)?\.?wowhead\.com\/\?(profile)=([^&#]+)/)}H=0}else{at=aF.href.match(/()\?(item|quest|spell|achievement|npc|object)=([0-9]+)/);if(at==null){at=aF.href.match(/()\?(profile)=([^&#]+)/)}H=1}}if(at==null&&aF.rel&&(D.applyto&2)){ax=0;aw=1;au=2;at=aF.rel.match(/(item|quest|spell|achievement|npc|object).?([0-9]+)/);if(at==null){at=aF.rel.match(/(profile).?([^&#]+)/)}H=1}if(aF.rel){aF.rel.replace(/([a-zA-Z]+)=?([a-zA-Z0-9:-]*)/g,ar);if(ay.gems&&ay.gems.length>0){var az;for(az=Math.min(3,ay.gems.length-1);az>=0;--az){if(parseInt(ay.gems[az])){break}}++az;if(az==0){delete ay.gems}else{if(az<ay.gems.length){ay.gems=ay.gems.slice(0,az)}}}}if(at){var aD,av="www";ak=aF;if(ay.domain){av=ay.domain}else{if(ax&&at[ax]){av=at[ax]}}if(b[av]){av=b[av]}aD=T.getLocaleFromDomain(av);Q=av;if(aF.href.indexOf("#")!=-1&&document.location.href.indexOf(at[aw]+"="+at[au])!=-1){return}k=(aF.parentNode.className.indexOf("icon")==0?1:0);if(!aF.onmouseout){if(k==0){aF.onmousemove=a}aF.onmouseout=am}r(aA);var aC=T.getIdFromTypeName(at[aw]),aB=at[au];if(aC==m&&(typeof g_dev=="undefined"||!g_dev)){aD=0}K(aC,aB,aD,ay)}}function G(au){au=T.$E(au);var at=au._target;var ar=0;while(at!=null&&ar<5&&an(at,au)==-2323){at=at.parentNode;++ar}}function a(ar){ar=T.$E(ar);r(ar);if(ag){N()}else{Tooltip.move(V,S,0,0,s,L)}}function am(){i=null;ak=null;if(ag){R()}else{Tooltip.hide()}}function ai(ar){return(y&&y.buff?"buff_":"tooltip_")+f[ar]}function o(at,av,au){var ar=u[at][0];if(ar[av]==null){ar[av]={}}if(ar[av].status==null){ar[av].status={}}if(ar[av].status[au]==null){ar[av].status[au]=ab}}function K(at,ax,av,aw){if(!aw){aw={}}var au=h(ax,aw);i=at;Y=au;ac=av;y=aw;o(at,au,av);var ar=u[at][0];if(ar[au].status[av]==Z||ar[au].status[av]==z){ap(ar[au][ai(av)],ar[au].icon)}else{if(ar[au].status[av]==aa){ap(I.loading)}else{c(at,ax,av,null,aw)}}}function c(aB,aw,aC,au,ax){var ar=h(aw,ax);var az=u[aB][0];if(az[ar].status[aC]!=ab&&az[ar].status[aC]!=l){return}az[ar].status[aC]=aa;if(!au){az[ar].timer=setTimeout(function(){p.apply(this,[aB,ar,aC])},333)}var av="";for(var ay in ax){if(ay!="rand"&&ay!="ench"&&ay!="gems"&&ay!="sock"){continue}if(typeof ax[ay]=="object"){av+="&"+ay+"="+ax[ay].join(":")}else{if(ay=="sock"){av+="&sock"}else{av+="&"+ay+"="+ax[ay]}}}var at="";if(typeof g_dev=="undefined"||!g_dev){at+="http://"+T.getDomainFromLocale(aC)+".wowhead.com"}else{if(document.domain.indexOf("dev.wowhead.com")!=-1){var aA=T.getDomainFromLocale(aC);if(aA!="www"&&document.domain.indexOf(aA)!=0){at+="http://"+T.getDomainFromLocale(aC)+"."+document.domain}}}at+="/?"+u[aB][1]+"="+aw+"&power"+av;T.ajaxIshRequest(at)}function ap(av,aw){if(ak&&ak._fixTooltip){ak._fixTooltip(av,i,Y,ak)}var ax=false;if(ag&&!w){e()}if(!av){av=u[i][2]+" not found :(";aw="inv_misc_questionmark";ax=true}else{if(y!=null){if(y.pcs&&y.pcs.length){var ay=0;for(var au=0,at=y.pcs.length;au<at;++au){var ar;if(ar=av.match(new RegExp("<span><!--si([0-9]+:)*"+y.pcs[au]+"(:[0-9]+)*-->"))){av=av.replace(ar[0],'<span class="q8"><!--si'+y.pcs[au]+"-->");++ay}}if(ay>0){av=av.replace("(0/","("+ay+"/");av=av.replace(new RegExp("<span>\\(([0-"+ay+"])\\)","g"),'<span class="q2">($1)')}}if(y.c){av=av.replace(/<span class="c([0-9]+?)">(.+?)<\/span><br \/>/g,'<span class="c$1" style="display: none">$2</span>');av=av.replace(new RegExp('<span class="c('+y.c+')" style="display: none">(.+?)</span>',"g"),'<span class="c$1">$2</span><br />')}if(y.lvl){av=g_setTooltipItemLevel(av,y.lvl)}if(y.who&&y.when){av=av.replace("<table><tr><td><br />",'<table><tr><td><br /><span class="q2">'+T.sprintf(I.achievementcomplete,y.who,y.when.getMonth()+1,y.when.getDate(),y.when.getFullYear())+"</span><br /><br />");av=av.replace(/class="q0"/g,'class="r3"')}}}if(ag&&ah){ah.style.display=(H&&!ax?"":"none")}if(!ag){if(k==1){Tooltip.setIcon(null);Tooltip.show(ak,av)}else{Tooltip.setIcon(aw);Tooltip.showAtXY(av,V,S,s,L)}}else{if(aj&&aw){E.style.backgroundImage="url(http://static.wowhead.com/images/icons/medium/"+aw.toLowerCase()+".jpg)";E.style.display=""}else{E.style.backgroundImage="none";E.style.display="none"}w.style.display="";w.style.width="320px";ao.innerHTML=av;d();N();w.style.visibility="visible"}}function p(at,av,au){if(i==at&&Y==av&&ac==au){ap(I.loading);var ar=u[at][0];ar[av].timer=setTimeout(function(){U.apply(this,[at,av,au])},3850)}}function U(at,av,au){var ar=u[at][0];ar[av].status[au]=l;if(i==at&&Y==av&&ac==au){ap(I.noresponse)}}function h(at,ar){return at+(ar.rand?"r"+ar.rand:"")+(ar.ench?"e"+ar.ench:"")+(ar.gems?"g"+ar.gems.join(","):"")+(ar.sock?"s":"")}this.register=function(au,aw,av,at){var ar=u[au][0];o(au,aw,av);if(ar[aw].timer){clearTimeout(ar[aw].timer);ar[aw].timer=null}T.cO(ar[aw],at);if(ar[aw].status[av]==aa){if(ar[aw][ai(av)]){ar[aw].status[av]=Z}else{ar[aw].status[av]=z}}if(i==au&&aw==Y&&ac==av){ap(ar[aw][ai(av)],ar[aw].icon)}};this.registerNpc=function(au,at,ar){this.register(B,au,at,ar)};this.registerObject=function(au,at,ar){this.register(n,au,at,ar)};this.registerItem=function(au,at,ar){this.register(J,au,at,ar)};this.registerQuest=function(au,at,ar){this.register(P,au,at,ar)};this.registerSpell=function(au,at,ar){this.register(A,au,at,ar)};this.registerAchievement=function(au,at,ar){this.register(q,au,at,ar)};this.registerProfile=function(au,at,ar){this.register(m,au,at,ar)};this.request=function(ar,aw,au,av){if(!av){av={}}var at=h(aw,av);o(ar,at,au);c(ar,aw,au,1,av)};this.requestItem=function(at,ar){this.request(J,at,ad.id,ar)};this.requestSpell=function(ar){this.request(A,ar,ad.id)};this.getStatus=function(at,av,au){var ar=u[at][0];if(ar[av]!=null){return ar[av].status[au]}else{return ab}};this.getItemStatus=function(at,ar){this.getStatus(J,at,ar)};this.getSpellStatus=function(at,ar){this.getStatus(A,at,ar)};if(ag){this.set=function(ar){T.cO(D,ar)};this.showTooltip=function(au,ar,at){r(au);ap(ar,at)};this.hideTooltip=function(){R()};this.moveTooltip=function(ar){a(ar)};function e(){if(!w){var ax=T.ce("div"),aB=T.ce("table"),at=T.ce("tbody"),aw=T.ce("tr"),au=T.ce("tr"),ar=T.ce("td"),aA=T.ce("th"),az=T.ce("th"),ay=T.ce("th");ax.className="wowhead-tooltip";aA.style.backgroundPosition="top right";az.style.backgroundPosition="bottom left";ay.style.backgroundPosition="bottom right";T.ae(aw,ar);T.ae(aw,aA);T.ae(at,aw);T.ae(au,az);T.ae(au,ay);T.ae(at,au);T.ae(aB,at);E=T.ce("p");E.style.display="none";T.ae(E,T.ce("div"));T.ae(ax,E);T.ae(ax,aB);T.ae(document.body,ax);w=ax;C=aB;ao=ar;var av=T.ce("div");av.className="wowhead-tooltip-powered";T.ae(ax,av);ah=av;R()}}function R(){if(!w){return}w.style.display="none";w.style.visibility="hidden"}function d(){var at=ao.childNodes;if(at.length>=2&&at[0].nodeName=="TABLE"&&at[1].nodeName=="TABLE"){at[0].style.whiteSpace="nowrap";var ar;if(at[1].offsetWidth>300){ar=Math.max(300,at[0].offsetWidth)+20}else{ar=Math.max(at[0].offsetWidth,at[1].offsetWidth)+20}if(ar>20){w.style.width=ar+"px";at[0].style.width=at[1].style.width="100%"}}else{w.style.width=C.offsetWidth+"px"}}function N(){if(!w){return}if(V==null){return}var aB=T.getWindowSize(),aC=T.getScroll(),ay=aB.w,av=aB.h,ax=aC.x,au=aC.y,aw=C.offsetWidth,ar=C.offsetHeight,at=V+s,aA=S-ar-L;if(at+s+aw+4>=ax+ay){var az=V-aw-s;if(az>=0){at=az}else{at=ax+ay-aw-s-4}}if(aA<au){aA=S+L;if(aA+ar>au+av){aA=au+av-ar;if(aj){if(V>=at-48&&V<=at&&S>=aA-4&&S<=aA+48){aA-=48-(S-aA)}}}}w.style.left=at+"px";w.style.top=aA+"px"}}al()}};