(function(A){A.fn.addOption=function(){var C=arguments;if(C.length==0){return this}var G=true;var B=false;if(typeof C[0]=="object"){B=true;var E=C[0]}if(C.length>=2){if(typeof C[1]=="boolean"){G=C[1]}else{if(typeof C[2]=="boolean"){G=C[2]}}if(!B){var D=C[0];var F=C[1]}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return }if(B){for(var I in E){A(this).addOption(I,E[I],G)}}else{var J=document.createElement("option");J.value=D;J.text=F;var I;var K=false;var L=this.options;var H=L.length;for(I=0;I<H;I++){if(L[I].value==J.value){K=true;break}}if(I<H&&!K){I=H}this.options[I]=J;if(G){L[I].selected=true}}});return this};A.fn.ajaxAddOption=function(C,D,B){if(typeof C!="string"){return this}if(typeof D!="object"){D={}}if(typeof B!="boolean"){B=true}this.each(function(){var E=this;A.getJSON(C,D,function(F){A(E).addOption(F,B)})});return this};A.fn.removeOption=function(){var B=arguments;if(B.length==0){return this}var D=typeof B[0];if(D=="string"){var C=B[0]}else{if(D=="object"||D=="function"){var C=B[0]}else{if(D=="number"){var E=B[0]}else{return this}}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return }if(C){var H=this.options;var F=H.length;for(var G=F-1;G>=0;G--){if(C.constructor==RegExp){if(H[G].value.match(C)){H[G]=null}}else{if(H[G].value==C){H[G]=null}}}}else{this.remove(G)}});return this};A.fn.sortOptions=function(C){var B=typeof C=="undefined"?true:C;this.each(function(){if(this.nodeName.toLowerCase()!="select"){return }var F=this.options;var D=F.length;var G=[];for(var E=0;E<D;E++){G[E]={v:F[E].value,t:F[E].text}}G.sort(function(I,H){o1t=I.t.toLowerCase();o2t=H.t.toLowerCase();if(o1t==o2t){return 0}if(B){return o1t<o2t?-1:1}else{return o1t>o2t?-1:1}});for(var E=0;E<D;E++){F[E].text=G[E].t;F[E].value=G[E].v}});return this};A.fn.selectOptions=function(D,B){var C=D;var E=typeof D;var F=B||false;if(E!="string"&&E!="function"&&E!="object"){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var I=this.options;var G=I.length;for(var H=0;H<G;H++){if(C.constructor==RegExp){if(I[H].value.match(C)){I[H].selected=true}else{if(F){I[H].selected=false}}}else{if(I[H].value==C){I[H].selected=true}else{if(F){I[H].selected=false}}}}});return this};A.fn.copyOptions=function(D,C){var B=C||"selected";if(A(D).size()==0){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var G=this.options;var E=G.length;for(var F=0;F<E;F++){if(B=="all"||(B=="selected"&&G[F].selected)){A(D).addOption(G[F].value,G[F].text)}}});return this}});function bind(B){var A=[];for(var C=1;C<arguments.length;C++){A.push(arguments[C])}return function(D){return B.apply(this,[D].concat(A))}}function TabSet(B){if(B.tabs.length!=B.data.length){return }this.tabs=new Array();this.names=new Array();this.sorts=new Array();this.data=new Object();this.columns=new Object();this.parent=B.parent;this.callback=B.callback||false;this.templates=B.templates;if(!this.callback){for(var A=0;A<B.tabs.length;A++){if(this.templates[B.tabs[A]]){for(x in B.data[A]){this.names.push(B.names[A]);this.sorts.push(B.sorts[A]);this.tabs.push(B.tabs[A]);this.data[B.names[A]]=B.data[A];this.columns[B.names[A]]=B.columns[A];break}}}}else{}if(this.tabs.length){this.show_counts=B.show_counts!==undefined?B.show_counts:true;this.results_per_page=B.results_per_page||50;this.id="tset_"+Math.floor(Math.random(1,9)*1000000);this.render()}else{}}TabSet.prototype.tabset;TabSet.prototype.id;TabSet.prototype.active;TabSet.prototype.parent;TabSet.prototype.data;TabSet.prototype.columns;TabSet.prototype.names;TabSet.prototype.sorts;TabSet.prototype.tabs;TabSet.prototype.results_per_page;TabSet.prototype.show_counts;TabSet.prototype._fetch_in_progress;TabSet.prototype.render=function(){$(this.parent).append(this.generate());this.show(0)};TabSet.prototype.generate=function(){this.tabset=$('<div><ul class="tabs stabs"></ul><div class="box"></div></div>');var E;var A;var C;var D;E=$("ul",this.tabset);for(var B=0;B<this.tabs.length;B++){C=this.names[B];if(this.names[B]==""){D=_r(this.templates[C].label)}else{D=_r(this.names[B])}if(this.show_counts){D+=" ("+this.data[C].length+")"}A=$('<li tabname="tab_'+B+'"><a href="javascript:void(0);"><span>'+D+"</span></a></li>");A.click(bind(this.event_show,this)).css("cursor","pointer");E.append(A)}return this.tabset};TabSet.prototype.event_show=function(D,B){if(!D){var D=window.event}var C=D.target?D.target:D.srcElement;while(C){var A=C.getAttribute("tabname");if(A){B.show(A.replace("tab_",""));break}C=C.parentNode}D.preventDefault()};TabSet.prototype.callback_success=function(B){this._fetch_in_progress=false;this.data[B.tab]=B.results;if(B.tab==this.active){var A=$("div.box",this.tabset);new TableView({template:this.templates[this.active].template,results_per_page:this.results_per_page,sorts:this.sorts,data:this.data[this.active],columns:this.columns[this.active],parent:A})}};TabSet.prototype.callback_failure=function(B){this._fetch_in_progress=false;var A=$("div.box",this.tabset);this.error()};TabSet.prototype.error=function(A){if(!A){var A="An unknown error occurred."}$("div.box",this.tabset).html($('<div class="error">'+A+"</div>").append($('<a href="javascript:void(0);" style="padding-left: 10px;">Retry</a>').click(bind(this.event_reload,this))))};TabSet.prototype.event_reload=function(B,A){A.show(1);B.preventDefault()};TabSet.prototype.show=function(C,D){if(C==this.active&&!D){return }this.active=C;this.num=this.active;this.active=this.names[this.active];var A=$("div.box",this.tabset);$(".tabs li",this.tabset).removeClass("selected");$(".tabs li[@tabname=tab_"+this.num+"]",this.tabset).addClass("selected");if(!this.data[this.active].length&&this.callback){this._fetch_in_progress=true;try{this.callback(this,C)}catch(B){this._fetch_in_progress=false;this.error()}}else{new TableView({template:this.templates[this.tabs[this.num]].template,results_per_page:this.results_per_page,data:this.data[this.active],sorts:this.sorts,columns:this.columns[this.active],parent:A})}};function TableView(A){if(!A.data){return }this.template=A.template;if(!A.data.length){$(A.parent).html('<div class="information">No results were found.</div>');return }this.data=A.data;this.sorts=A.sorts;this.columns=A.columns;this.parent=A.parent;this.id="rset_"+Math.floor(Math.random(1,9)*1000000);this.has_pagination=this.template.has_pagination!==undefined?this.template.has_pagination:true;this.results_per_page=A.results_per_page||25;this.render()}TableView.prototype.id;TableView.prototype.sort_by;TableView.prototype.order_by;TableView.prototype.template;TableView.prototype.data;TableView.prototype.columns;TableView.prototype.sorts;TableView.prototype.page;TableView.prototype.has_pagination;TableView.prototype.total_pages;TableView.prototype.tableview;TableView.prototype.row_links;TableView.prototype.draw_headers;TableView.prototype.results_per_page;TableView.prototype.render=function(){if(this.sorts==""){sort_by=this.template.defaultSort}else{sort_by=this.sorts}order_by=this.template.defaultOrder;this.draw_headers=this.template.draw_headers!==undefined?this.template.draw_headers:true;this.row_links=this.template.row_links!==undefined?this.template.row_links:true;this.tableview=this.generate();$(this.parent).empty();$(this.parent).append(this.tableview);if(sort_by===undefined){sort_by=this.template.defaultColumns[0]}if(order_by===undefined){order_by="asc"}this.resort(1,sort_by,order_by)};TableView.prototype.sort_by_string=function(B,A,C){if(B[C]===undefined&&A[C]===undefined){return 0}else{if(B[C]===undefined){return -1}else{if(A[C]===undefined){return 1}}}B=B[C].toLowerCase();A=A[C].toLowerCase();return B<A?-1:(B>A?1:0)};TableView.prototype.sort_by_integer=function(B,A,C){if(B[C]===undefined&&A[C]===undefined){return 0}else{if(B[C]===undefined){return -1}else{if(A[C]===undefined){return 1}}}return parseFloat(B[C])-parseFloat(A[C])};TableView.prototype.resort=function(G,I,C){if(G>this.total_pages){return }if(G==this.page&&this.sort_by==I&&this.order_by==C){return }if(G=="next"){G=this.page+1}else{if(G=="prev"){G=this.page-1}}G=parseInt(G);if(this.has_pagination){if(this.page){$("div.paging strong[@page="+this.page+"]",this.tableview).before('<a href="javascript:void(0);" page="'+this.page+'">'+this.page+"</a>").remove();$("div.paging a[@page="+this.page+"]",this.tableview).click(bind(this.event_page,this))}$("div.paging a[@page="+G+"]",this.tableview).before('<strong page="'+G+'">'+G+"</strong>").remove();this.page=G;var B=$("div.paging a[@page=next]",this.tableview);if(B.length&&this.page==this.total_pages){B.before('<strong page="next">'+_r("Next")+"</strong>").remove()}var B=$("div.paging strong[@page=next]",this.tableview);if(B.length&&this.page!=this.total_pages){B.before('<a href="javascript:void(0);" page="next">'+_r("Next")+"</a>").remove();$("div.paging a[@page=next]").click(bind(this.event_page,this))}var B=$("div.paging a[@page=prev]",this.tableview);if(B.length&&this.page==1){B.before('<strong page="prev">'+_r("Previous")+"</strong>").remove()}var B=$("div.paging strong[@page=prev]",this.tableview);if(B.length&&this.page!=1){B.before('<a href="javascript:void(0);" page="prev">'+_r("Previous")+"</a>").remove();$("div.paging a[@page=prev]").click(bind(this.event_page,this))}$("div.paging .info .curpage").html(1+(this.page-1)*this.results_per_page);$("div.paging .info .totpage").html((this.page)*this.results_per_page)}else{this.page=G}if(I&&I in this.template.columns){if(I!=this.sort_by){var F=(this.template.columns[I].sortField?this.template.columns[I].sortField:I);var J=typeof (this.data[0][F]);if(J=="float"||J=="number"||parseInt(this.data[0])){sort_func=this.sort_by_integer}else{sort_func=this.sort_by_string}this.data=this.data.sort(function(L,K){return sort_func(L,K,F)});this.sort_by=I;if(C=="desc"){this.data=this.data.reverse()}this.order_by=C}else{this.data=this.data.reverse();this.order_by=(this.order_by=="asc"?"desc":"asc")}}$("table th",this.tableview).removeClass("sortdesc").removeClass("sortasc");$("table th[@colname="+this.sort_by+"]",this.tableview).addClass("sort"+this.order_by);var E=$("tbody",this.tableview).empty();var A=((this.page-1)*this.results_per_page);for(var H=A;H<(this.results_per_page*this.page);H++){if(this.data[H]===undefined){break}cur=document.createElement("tr");cur.className=(H-A)%2==1?"r2":"r1";if(this.data[H].className){cur.className+=" "+this.data[H].className}klmn=this.columns;for(var D=0;D<klmn.length;D++){col=klmn[D];cell=document.createElement("td");if(this.template.columns[col].value){cell.innerHTML=this.template.columns[col].value(this.data[H])}else{cell.innerHTML=this.data[H][col]?this.data[H][col]:"&ndash;"}if(this.template.columns[col].className){cell.className=this.template.columns[col].className}cur.appendChild(cell)}E.append(cur)}$("tr",E).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")})};TableView.prototype.event_page=function(C,A){if(!C){var C=window.event}var B=C.target?C.target:C.srcElement;C.preventDefault();A.resort($(B).attr("page"))};TableView.prototype.event_sort=function(D,A){if(!D){var D=window.event}var C=D.target?D.target:D.srcElement;D.preventDefault();var B=$(C).attr("colname");if(!B){B=$(C.parentNode).attr("colname")}A.resort(1,B,A.sort_by==B?(A.order_by=="desc"?"asc":"desc"):"asc")};TableView.prototype.event_check=function(C,A){if(!C){var C=window.event}var B=C.target?C.target:C.srcElement;C.preventDefault();toggleCB($("tbody",A.tableview),B.checked)};TableView.prototype.generate=function(){var C=$('<div><table cellspacing="0" border="0" class="data-table"><thead></thead><tbody></tbody></table></div>');var E;var B;var A;this.total_pages=Math.ceil(this.data.length/this.results_per_page);if(this.total_pages==1){this.has_pagination=false}if(this.has_pagination){E=$('<div class="paging"></div>');E.append('<span class="info"><strong class="curpage">1</strong> - <strong class="totpage">'+this.results_per_page+"</strong> "+_r("out of")+' <strong class="totpage1">'+this.total_pages*this.results_per_page+" &nbsp;&nbsp;</strong>");E.append('<strong page="prev">'+_r("Previous")+"</strong> | ");for(var D=1;D<=this.total_pages;D++){E=E.append('<a href="javascript:void(0);" page="'+D+'">'+D+"</a> ")}E.append('| <a href="javascript:void(0);" page="next">'+_r("Next")+"</a>");C.append(E);C.prepend(E.clone());$("div.paging a",C).click(bind(this.event_page,this))}if(this.draw_headers){E=$('<tr class="head"></tr>');klmn=this.columns;for(var D=0;D<klmn.length;D++){B=klmn[D];A=$('<th colname="'+B+'"><span>'+_r(this.template.columns[B].label?this.template.columns[B].label:"&nbsp;")+"</span></th>");if(this.template.columns[B].width){A.css("width",this.template.columns[B].width+"px")}if(this.template.columns[B].className){A.addClass(this.template.columns[B].className)}if(this.template.columns[B].checkboxColumn){A.html($('<input type="checkbox" />').change(bind(this.event_check,this)))}else{if(this.template.columns[B].sortField!=false){A.click(bind(this.event_sort,this)).css("cursor","pointer")}}E=E.append(A)}$("th",E).hover(function(){$(this).addClass("hover")},function(){$(this).removeClass("hover")});$("thead",C).append(E)}return C};wow_tableviews={items:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'"><img border = "0" style="margin-top:3px;" src="'+gp(0)+"icons-small/"+A.icon+'.png" name="'+A.id+'" onMouseOver="ksn(this);" onMouseOut="nd();"></a><span style="position:relative;top:-10px;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'" class="rarity'+A.q1+'">'+A.name+"</a></span>"}},armor:{label:"Armor",width:70,className:"tc"},slots:{label:"Slots",width:70,className:"tc"},slot:{label:"Slot",width:70,className:"tc"},skill:{label:"Skill",width:70,className:"tc"},dps:{label:"DPS",width:70,className:"tc"},damage:{label:"Damage",sortField:"d2",width:70,className:"tc"},speed:{label:"Speed",width:70,className:"tc"},haste:{label:"Haste",width:70,className:"tc",value:function(A){return A.haste+"%"}},type:{label:"Type",width:130,className:"tc"},quality:{label:"Quality",width:110,sortField:"quality_id",className:"tc",value:function(A){return'<span class="q'+A.q1+'"><b>'+A.quality+"</b></span>"}},price:{label:"Cost",width:70,className:"tc",value:function(A){_="";if(A.price[0]){_="<span>"+A.price[0].replace("g|","</span><span class='moneygold'>").replace("c|","</span><span class='moneycopper'>").replace("s|","</span><span class='moneysilver'>")+"</span>"}if(A.price[1]){_="<span class='moneyalliance'>"+A.price[1]+"</span>"}if(A.price[2]){_="<span class='moneyarena'>"+A.price[2]+"</span>"}if(A.price[29434]){_+="&nbsp;<span class='money_29434'>"+A.price[29434]+"</span>"}if(A.price[20559]){_+="&nbsp;<span class='money_20559'>"+A.price[20559]+"</span>"}if(A.price[29024]){_+="&nbsp;<span class='money_29024'>"+A.price[29024]+"</span>"}if(A.price[20558]){_+="&nbsp;<span class='money_20558'>"+A.price[20558]+"</span>"}if(A.price[20560]){_+="&nbsp;<span class='money_20560'>"+A.price[20560]+"</span>"}return _}},drop:{label:"Drop",width:90,className:"tc",value:function(A){return A.dr?A.dr+"%<br /><small>["+A.dc+" "+_r("out of")+" "+A.kc+"]</small>":"&ndash;"}},level:{label:"Level",width:90,sortField:"level",className:"tc",value:function(A){a="<span>"+A.level+"</span>";if(A.reqlevel>0){a=a+"<br /><small>"+_r("Req")+". "+A.reqlevel+"</small>"}return a}},level2:{label:"Level",width:90,className:"tc",value:function(A){return"<span>"+A.level+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},itemsets:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a></span>"}},tag:{label:"Tag",width:70,className:"tc"},classes:{label:"Classes",width:70,className:"tc"},pieces:{label:"Pieces",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},level2:{label:"Level",width:90,className:"tc",value:function(A){return"<span>"+A.level+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},npcs:{columns:{name:{label:"Name",className:"tk",value:function(A){if(A.tag>""){ttag="<br><small>&lt;"+A.tag+"&gt;</small>"}else{ttag=""}return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a>"+ttag+"</span>"}},classification:{label:"Classification",width:70,className:"tc"},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},price:{label:"Cost",width:70,className:"tc",value:function(A){_="";if(A.price[0]){_="<span>"+A.price[0].replace("g|","</span><span class='moneygold'>").replace("c|","</span><span class='moneycopper'>").replace("s|","</span><span class='moneysilver'>")+"</span>"}if(A.price[1]){_="<span class='moneyalliance'>"+A.price[1]+"</span>"}if(A.price[2]){_="<span class='moneyarena'>"+A.price[2]+"</span>"}if(A.price[29434]){_+="&nbsp;<span class='money_29434'>"+A.price[29434]+"</span>"}if(A.price[20559]){_+="&nbsp;<span class='money_20559'>"+A.price[20559]+"</span>"}if(A.price[29024]){_+="&nbsp;<span class='money_29024'>"+A.price[29024]+"</span>"}if(A.price[20558]){_+="&nbsp;<span class='money_20558'>"+A.price[20558]+"</span>"}if(A.price[20560]){_+="&nbsp;<span class='money_20560'>"+A.price[20560]+"</span>"}return _}},drop:{label:"Drop",width:90,className:"tc",value:function(A){return A.dr?A.dr+"%<br /><small>["+A.dc+" "+_r("out of")+" "+A.kc+"]</small>":"&ndash;"}},level3:{label:"Level",width:90,sortField:"d3",className:"tc",value:function(A){return"<span>"+A.level3+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},objects:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a></span>"}},skill:{label:"Skill",width:70,className:"tc"},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},quests:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a></span>"}},side:{label:"Side",width:70,className:"tc"},rewards:{label:"Rewards",width:70,className:"tcrew",value:function(D){var B=D.rewards;var A=B.split("$1$");while(A[1]!=null){B=B.replace("$1$",'<img border = "0" width="18px" height="18px" style="margin-top:3px;" src="'+gp(0)+"icons-small/").replace("$2$",'.png" name="').replace("$3$",'" onMouseOver="ksn(this);" onMouseOut="nd();">');A=B.split("$1$")}var E='<span class="rew2">'+D.rew2+"</span> "+B;var C="";if(D.rew_xp!=null){C=C+'<br><span class="rew3">+ '+D.rew_xp+"</span>"}return E+C}},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},level2:{label:"Level",sortField:"level",width:90,className:"tc",value:function(A){return"<span>"+A.level+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},zones:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a></span>"}},territory:{label:"Territory",width:70,className:"tc"},instance_type:{label:"Instance type",width:100,className:"tc"},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},level3:{label:"Level",width:90,sortField:"d3",className:"tc",value:function(A){return"<span>"+A.level3+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},factions:{columns:{name:{label:"Name",className:"tk",value:function(A){return'<span style="position:relative;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+A.url+"/lan/"+gV(2)+'">'+A.name+"</a></span>"}},xgroup:{label:"Group",width:70,className:"tc"},side:{label:"Side",width:70,className:"tc"},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},level3:{label:"Level",width:90,sortField:"level",className:"tc",value:function(A){return"<span>"+A.level3+"</span>"}}},defaultSort:"name",defaultColumns:["name","type","quality","level"],label:"Items"},spells:{columns:{name:{label:"Name",className:"tk",value:function(C){var B='<a  href="'+gp(1)+"/x/show/s/"+C.url+"/lan/"+gV(2)+'"><img border = "0" style="margin-top:3px;" src="'+gp(0)+"icons-small/"+C.icon+'.png" name="'+C.id+'" onMouseOver="ksn(this);" onMouseOut="nd();"></a>';if(C.rank!=null){var A='<div class="rew4">'+B+'<a  href="'+gp(1)+"/x/show/s/"+C.url+'" class="rew4">'+C.name+'</a><div class="spell_rank" align="left">'+C.rank+"</div></div>"}else{var A=B+'<span style="position:relative;top:-10px;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+C.url+'" class="rarity'+C.q1+'">'+C.name+"</a></span>"}return A}},name2:{label:"Name",className:"tk",value:function(C){if(C.i_id){ic=C.i_id}else{ic=C.id}var B='<a  href="'+gp(1)+"/x/show/s/"+C.i_url+"/lan/"+gV(2)+'"><img border = "0" style="margin-top:3px;" src="'+gp(0)+"icons-small/"+C.icon+'.png" name="'+ic+'" onMouseOver="ksn(this);" onMouseOut="nd();"></a>';if(C.rank!=null){var A='<div class="rew4">'+B+'<a  href="'+gp(1)+"/x/show/s/"+C.url+'">'+C.name+'</a><div class="spell_rank" align="left">'+C.rank+"</div></div>"}else{var A=B+'<span style="position:relative;top:-10px;left:5px;text-align:left !important;"><a  href="'+gp(1)+"/x/show/s/"+C.url+'" class="rarity'+C.q1+'">'+C.name+"</a></span>"}return A}},reagents:{label:"Reagents",width:70,className:"tc",value:function(C){var B=C.reagents;var A=B.split("$1$");while(A[1]!=null){B=B.replace("$0$",'<a  href="'+gp(1)+"/x/show/lan/"+gV("lan")+"/s/item/id/").replace("$1$",'"><img border = "0" width="32px" height="32px" style="margin-top:3px;" src="'+gp(0)+"icons-small/").replace("$2$",'.png" name="').replace("$3$",'" onMouseOver="ksn(this);" onMouseOut="nd();"></a>&nbsp;').replace("$4$",'<span class="rew6">').replace("$5$","</span>");A=B.split("$1$")}return B}},xgroup:{label:"Group",width:70,className:"tc"},side:{label:"Side",width:70,className:"tc"},location:{label:"Location",width:70,className:"tc"},type:{label:"Type",width:130,className:"tc"},type2:{label:"Type",width:130,sortField:"skill",className:"tc",value:function(A){if(A.skill>900){A.skill="??"}return'<span class="rew3">'+A.skill+"<br>"+A.type+"</span>"}},level3:{label:"Level",width:90,sortField:"level",className:"tc",value:function(A){return"<span>"+A.level3+"</span>"}},level:{label:"Level",width:90,sortField:"level",className:"tc",value:function(A){a="<span>"+A.level+"</span>";if(A.reqlevel>0){a=a+"<br /><small>"+_r("Req")+". "+A.reqlevel+"</small>"}return a}},level2:{label:"Level",width:90,className:"tc",value:function(A){return"<span>"+A.level+"</span>"}}},defaultSort:"level",defaultColumns:["name","type","quality","level"],label:"Items"}};wow_tabsets={drops:{label:"Drops",template:wow_tableviews.drops},quest_requirements:{label:"Quest Requirements",template:wow_tableviews.quests},quest_rewards:{label:"Quest Rewards",template:wow_tableviews.quests},similar:{label:"Similar",template:wow_tableviews.items},loot:{label:"Loot",template:wow_tableviews.loot},buyable_with:{label:"Buyable With",template:wow_tableviews.tems},item:{label:"Items",template:wow_tableviews.items},itemset:{label:"Item Sets",template:wow_tableviews.itemsets},npc:{label:"NPCs",template:wow_tableviews.npcs},object:{label:"Objects",template:wow_tableviews.objects},quest:{label:"Quests",template:wow_tableviews.quests},zone:{label:"Locations",template:wow_tableviews.zones},faction:{label:"Locations",template:wow_tableviews.factions},spell:{label:"Spells",template:wow_tableviews.spells}};