function updatetimer(i){var now=new Date();var then=timers[i].eventdate;var diff=count=Math.floor((then.getTime()-now.getTime())/1000);if(isNaN(diff)){timers[i].firstChild.nodeValue='** '+timers[i].eventdate+' **';return;}if(diff<0){diff=-diff;var tpm=' ';}else{var tpm=' ';}var left=(diff%60)+' seconds';diff=Math.floor(diff/60);if(diff>0)left=(diff%60)+' minutes '+left;diff=Math.floor(diff/60);if(diff>0)left=(diff%24)+' hours '+left;diff=Math.floor(diff/24);if(diff>0)left=diff+' days '+left
timers[i].firstChild.nodeValue=tpm+left;timeouts[i]=setTimeout('updatetimer('+i+')',1000);}function checktimers(){var nocountdowns=getElementsByClassName(document,'span','nocountdown');for(var i in nocountdowns)nocountdowns[i].style.display='none'
var countdowns=getElementsByClassName(document,'span','countdown');for(var i in countdowns)countdowns[i].style.display='inline'
timers=getElementsByClassName(document,'span','countdowndate');timeouts=new Array();if(timers.length==0)return;for(var i in timers){timers[i].eventdate=new Date(timers[i].firstChild.nodeValue);updatetimer(i);}}addOnloadHook(checktimers);if(typeof WikiaScriptLoader==='undefined'){var WikiaScriptLoader=WikiaScriptLoader?WikiaScriptLoader:function(){var b=navigator.userAgent.toLowerCase();this.useDOMInjection=b.indexOf("opera")!=-1||b.indexOf("firefox")!=-1&&b.indexOf("/4.0b")==-1;this.isIE=b.indexOf("opera")==-1&&b.indexOf("msie")!=-1;this.headNode=document.getElementsByTagName("HEAD")[0]};WikiaScriptLoader.prototype={loadScript:function(b,c){this.useDOMInjection?this.loadScriptDOMInjection(b,c):this.loadScriptDocumentWrite(b,c)},loadScriptDOMInjection:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;var d=function(){a.onloadDone=true;typeof c=="function"&&c()};a.onloadDone=false;a.onload=d;a.onreadystatechange=function(){a.readyState=="loaded"&&!a.
onloadDone&&d()};this.headNode.appendChild(a)},loadScriptDocumentWrite:function(b,c){document.write('<script src="'+b+'" type="text/javascript"><\/script>');var a=function(){typeof c=="function"&&c()};typeof c=="function"&&this.addHandler(window,"load",a)},loadScriptAjax:function(b,c){var a=this,d=this.getXHRObject();d.onreadystatechange=function(){if(d.readyState==4){var e=d.responseText;if(a.isIE)eval(e);else{var f=document.createElement("script");f.type="text/javascript";f.text=e;a.headNode.appendChild(f)}typeof c=="function"&&c()}};d.open("GET",b,true);d.send("")},loadCSS:function(b,c){var a=document.createElement("link");a.rel="stylesheet";a.type="text/css";a.media=c||"";a.href=b;this.headNode.appendChild(a)},addHandler:function(b,c,a){if(window.addEventListener)window.addEventListener(c,a,false);else window.attachEvent&&window.attachEvent("on"+c,a)},getXHRObject:function(){var b=false;try{b=new XMLHttpRequest}catch(c){for(var a=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0",
"Msxml2.XMLHTTP","Microsoft.XMLHTTP"],d=a.length,e=0;e<d;e++){try{b=new ActiveXObject(a[e])}catch(f){continue}break}}return b}};window.wsl=new WikiaScriptLoader;}function $A(a){var r=[];for(var i=0,len=a.length;i<len;++i)r.push(a[i]);return r;}Function.prototype.bind=function(){var __method=this,args=$A(arguments),object=args.shift();return function(){return __method.apply(object,args.concat($A(arguments)))};}
var hasClass=(function(){var reCache={};return function(element,className){return(reCache[className]?reCache[className]:(reCache[className]=new RegExp("(?:\\s|^)"+className+"(?:\\s|$)"))).test(element.className);};})();var autoCollapse=2;var collapseCaption="hide";var expandCaption="show";function collapseTable(tableIndex){var Button=document.getElementById("collapseButton"+tableIndex);var Table=document.getElementById("collapsibleTable"+tableIndex);if(!Table||!Button){return false;}var Rows=Table.rows;if(Button.firstChild.data==collapseCaption){for(var i=1;i<Rows.length;i++){Rows[i].style.display="none";}Button.firstChild.data=expandCaption;}else{for(var i=1;i<Rows.length;i++){Rows[i].style.display=Rows[0].style.display;}Button.firstChild.data=collapseCaption;}}function createCollapseButtons(){var tableIndex=0;var NavigationBoxes=new Object();var Tables=document.getElementsByTagName("table");for(var i=0;i<Tables.length;i++){if(hasClass(Tables[i],"collapsible")){var HeaderRow=Tables[i]
.getElementsByTagName("tr")[0];if(!HeaderRow)continue;var Header=HeaderRow.getElementsByTagName("th")[0];if(!Header)continue;NavigationBoxes[tableIndex]=Tables[i];Tables[i].setAttribute("id","collapsibleTable"+tableIndex);var Button=document.createElement("span");var ButtonLink=document.createElement("a");var ButtonText=document.createTextNode(collapseCaption);Button.className="collapseButton";ButtonLink.style.color=Header.style.color;ButtonLink.setAttribute("id","collapseButton"+tableIndex);ButtonLink.setAttribute("href","javascript:collapseTable("+tableIndex+");");ButtonLink.appendChild(ButtonText);Button.appendChild(document.createTextNode("["));Button.appendChild(ButtonLink);Button.appendChild(document.createTextNode("]"));Header.insertBefore(Button,Header.childNodes[0]);tableIndex++;}}for(var i=0;i<tableIndex;i++){if(hasClass(NavigationBoxes[i],"collapsed")||(tableIndex>=autoCollapse&&hasClass(NavigationBoxes[i],"autocollapse"))){collapseTable(i);}else if(hasClass(NavigationBoxes[
i],"innercollapse")){var element=NavigationBoxes[i];while(element=element.parentNode){if(hasClass(element,"outercollapse")){collapseTable(i);break;}}}}}addOnloadHook(createCollapseButtons);function addEditIntro(name){var el=document.getElementById('control_edit');if(!el)return;el=el.getElementsByTagName('a')[0];if(el)el.href+='&editintro='+name;}if(wgNamespaceNumber==0){addOnloadHook(function(){if(document.getElementById('disambigbox'))addEditIntro('Template:Disambig_editintro');});}$(function(){$('a[href*="http://dragonage.wikia.com/wiki/Special:Chat"]').click(function(event){window.open($(this).attr('href'),'wikiachat','width=600,height=600,menubar=no,status=no,location=no,toolbar=no,scrollbars=no,resizable=yes');event.preventDefault();});});mw.loader.using(['jquery.ui.tabs'],function(){$(function(){var $tabs=$("#portal_slider").tabs({fx:{opacity:'toggle',duration:100}});$("[class^=portal_sliderlink]").click(function(){$tabs.tabs('select',this.className.replace("portal_sliderlink_",
""));return false;});$('#portal_next').click(function(){$tabs.tabs('select',($tabs.tabs('option','selected')==($tabs.tabs('length'))-1)?0:$tabs.tabs('option','selected')+1);return false;});$('#portal_prev').click(function(){$tabs.tabs('select',($tabs.tabs('option','selected')==0)?($tabs.tabs('length')-1):$tabs.tabs('option','selected')-1);return false;});});});var showSpoiler=new Array();function showSpoilers(splrType){var Divs=document.getElementsByTagName("div");for(i=0;i<Divs.length;i++){if(hasClass(Divs[i],'splr')&&hasClass(Divs[i].childNodes[0],'splr_'+splrType)){var warning=Divs[i].childNodes[0].childNodes[1];warning.className=warning.className.replace('show_warning','hide_warning');var spoiler=Divs[i].childNodes[1];spoiler.className=spoiler.className.replace('hide_spoiler','show_spoiler');}}document.cookie='showspoiler_'+splrType+'=1; path=/';}function hideSpoilers(splrType){var Divs=document.getElementsByTagName("div");for(i=0;i<Divs.length;i++){if(hasClass(Divs[i],'splr')&&
hasClass(Divs[i].childNodes[0],'splr_'+splrType)){var warning=Divs[i].childNodes[0].childNodes[1];warning.className=warning.className.replace('hide_warning','show_warning');var spoiler=Divs[i].childNodes[1];spoiler.className=spoiler.className.replace('show_spoiler','hide_spoiler');}}document.cookie='showspoiler_'+splrType+'=0; path=/';}function toggleSpoilers(ev){var splrType=this.className.split('_')[1];showSpoiler[splrType]=showSpoiler[splrType]?0:1;if(showSpoiler[splrType])showSpoilers(splrType);else hideSpoilers(splrType);}function initSpoilers(){var Divs=document.getElementsByTagName("div");for(i=0;i<Divs.length;i++){if(hasClass(Divs[i],'splr')){Divs[i].childNodes[0].onclick=toggleSpoilers;var warning=Divs[i].childNodes[0].childNodes[1];warning.className=warning.className.replace('hide_warning','show_warning');var spoiler=Divs[i].childNodes[1];spoiler.className=spoiler.className.replace('show_spoiler','hide_spoiler');}}var cookies=document.cookie.split("; ");for(var i=0;i<cookies.
length;i++){if(cookies[i].indexOf('showspoiler')!=-1){var crumbs=cookies[i].split("=");var splrType=crumbs[0].split('_')[1];var splrValue=parseInt(crumbs[1]);showSpoiler[splrType]=splrValue;if(splrValue)showSpoilers(splrType);else hideSpoilers(splrType);}}}var spoilers=true;function loadSpoilers(){if(spoilers)initSpoilers();}addOnloadHook(loadSpoilers);var ttBgStyle="background-color:transparent;";var ttHTMLStart='<div style="font-size:1em; width: auto; max-width:20em; '+ttBgStyle+'">';var mousePos=null;var winSize=null;function mouseMove(ev){if(ev){if(ev.clientX)var mouseX=ev.clientX;if(ev.clientY)var mouseY=ev.clientY;}else if(typeof(window.event)!="undefined"){var mouseX=window.event.clientX;var mouseY=window.event.clientY;}mousePos={x:mouseX,y:mouseY};}function getDBC(){dbc=new Array();docBase=document.documentElement||document.body;dbc[0]=docBase.clientWidth||0;dbc[1]=docBase.clientHeight||0;return dbc;}function getDBS(){dbs=new Array();docBase=document.documentElement||document.
body;dbs[0]=docBase.scrollLeft||0;dbs[1]=docBase.scrollTop||0;return dbs;}function windowResize(){dbC=getDBC();winSize={x:(dbC[0])?dbC[0]:window.innerWidth,y:(dbC[1])?dbC[1]:window.innerHeight}}windowResize();document.onmousemove=mouseMove;window.onresize=windowResize;function displayTip(){var tip=document.getElementById("simpletfb");tip.style.position="absolute";tip.style.visibility="hidden";tip.style.display="block";tip.style.zIndex="999";moveTip();tip.style.visibility="visible";}function moveTip(){skinAdjust=new Array();dbS=getDBS();tip=document.getElementById("simpletfb");var showTTAtTop=mousePos.y>(winSize.y/2);var showTTAtLeft=mousePos.x>(winSize.x/2);var newTop=mousePos.y+(showTTAtTop?-(tip.clientHeight+20):20);var newLeft=mousePos.x+(showTTAtLeft?-(tip.clientWidth+20):20);tip.style.position='fixed';tip.style.top=newTop+"px";tip.style.left=newLeft+"px";}function hideTip(){var tip=document.getElementById("simpletfb");if(typeof(tip.style)=="undefined")return false;$(tip).html("");
tip.style.display="none";}function showTemplateTip(i){var Tip=document.getElementById("tttc"+i);tooltip=ttHTMLStart+Tip.innerHTML+'</div>';document.getElementById("simpletfb").innerHTML=tooltip;displayTip();}function performTooltips(){var contentstart=document.getElementById("bodyContent")?document.getElementById("bodyContent"):document.getElementById("WikiaArticle");qttfdiv=document.createElement("div");qttfdiv.setAttribute("id","simpletfb");contentstart.insertBefore(qttfdiv,contentstart.childNodes[0]);var Spans=document.getElementsByTagName("span");for(i=0;i<Spans.length;i++){if(hasClass(Spans[i],"ttlink")){Spans[i].nextSibling.setAttribute("id","tttc"+i);Spans[i].firstChild.setAttribute("title","");Spans[i].onmouseover=showTemplateTip.bind(Spans[i],i);Spans[i].onmouseout=hideTip;Spans[i].onmousemove=moveTip;}}}var tooltips=true;function loadTooltips(){if(tooltips)performTooltips();}addOnloadHook(loadTooltips);if(wgNamespaceNumber==110){function disableOldForumEdit(){if(typeof(
enableOldForumEdit)!='undefined'&&enableOldForumEdit){return;}if(!document.getElementById('old-forum-warning')){return;}if(skin=='oasis'){$("#WikiaPageHeader .wikia-menu-button li a:first").html('Archived').removeAttr('href');$('#WikiaPageHeader .wikia-button').html('Archived').removeAttr('href');return;}if(!document.getElementById('ca-edit')){return;}var editLink=null;if(skin=='monaco'){editLink=document.getElementById('ca-edit');}else if(skin=='monobook'){editLink=document.getElementById('ca-edit').firstChild;}else{return;}editLink.removeAttribute('href',0);editLink.removeAttribute('title',0);editLink.style.color='gray';editLink.innerHTML='Archived';$('span.editsection-upper').remove();}addOnloadHook(disableOldForumEdit);}function ChangeRedirectImage(){$('.redirectMsg img').attr('src','http://images3.wikia.nocookie.net/__cb20100902033555/dragonage/images/b/b5/Redirectltr.png');}addOnloadHook(ChangeRedirectImage);importScriptPage('ShowHide/code.js','dev');importScriptPage(
'EditIntroButton/code.js','dev');importScriptPage('DisplayClock/code.js','dev');importScriptPage('PurgeButton/code.js','dev');importScriptPage('DupImageList/code.js','dev');var ArchiveToolConfig={archiveListTemplate:'ArchCat',archivePageTemplate:'ArchPage',archiveSubpage:'Archive',userLang:true};importScriptPage('ArchiveTool/code.js','dev');function rewriteTitle(){if(typeof(window.SKIP_TITLE_REWRITE)!='undefined'&&window.SKIP_TITLE_REWRITE){return;}if($('#title-meta').length==0){return;}var newTitle=$('#title-meta').html();if(skin=="oasis"){$('header.WikiaPageHeader > h1').html('<div id="title-meta" style="display: inline;">'+newTitle+'</div>');$('header.WikiaPageHeader > h1').attr('style','text-align:'+$('#title-align').html()+';');}else{$('.firstHeading').html('<div id="title-meta" style="display: inline;">'+newTitle+'</div>');$('.firstHeading').attr('style','text-align:'+$('#title-align').html()+';');}}importScript('MediaWiki:Common.js/mosbox.js');addOnloadHook(rewriteTitle);;
importScriptPage('AjaxRC/code.js','dev');;;mw.loader.state({"site":"ready"});

/* cache key: bakugan:resourceloader:filter:minify-js:7:90a3a2c6bd53a13e69d9311b1a3e9966 */