/* generated javascript */
if (!window.skin) {
	var skin = 'monaco';
	var stylepath = 'http://images.wikia.com/common/releases_200911.3/skins';
}

/* MediaWiki:Common.js */
/* Any JavaScript here will be loaded for all users on every page load. */
/* <pre> */

/* Test if an element has a certain class **************************************
  *
  * Description: Uses regular expressions and caching for better performance.
  * Taken from Wikipedia's Common.js.
  */
 
 var hasClass = (function () {
     var reCache = {};
     return function (element, className) {
         return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
     };
 })();
 
importScriptPage('ShowHide/code.js', 'dev'); 
importScriptPage('AjaxRC/code.js', 'dev'); 

//********************************************************************************
// Start "Articletype positioning" script; by [[User:Bp]]
//********************************************************************************
function moveArticletypeDiv() {
  var fooel = document.getElementById('article-type');
  var artel = document.getElementById('article');
  var titel = document.getElementById('top');
  fooel = fooel.parentNode.removeChild(fooel);
  if (artel!=null) {
    artel.parentNode.insertBefore(fooel,artel);
  } else {
    //fall back to a position before H1 - useful for monobook skin
    titel.parentNode.insertBefore(fooel,titel);
  }
}

hookEvent("load", moveArticletypeDiv);
// End "Articletype positioning" script

//**************************************************
//Twitter Widget by LordTBT 2009
//**************************************************
//Licensed under GNU
/*
<div class="Twitter" style="width:290px; height:350px;">
[http://www.twitter.com/ Twitter]
</div>

You can modify the width, height and href to fit the width, height and location of the movie.
 */
function playTwitter(){
	var divs = document.getElementById('bodyContent').getElementsByTagName('div');
	var twobjcode = '';
	if (window.ActiveXObject){ // IE
		twobjcode += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="{width}" height="{height}" id="TwitterWidget" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" align="middle">';
	}else{
		twobjcode += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="{width}" height="{height}" id="TwitterWidget" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" align="middle">';
	}
	twobjcode += '<param name="movie" value="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" /><param value="always" name="allowScriptAccess"><param value="false" name="allowFullScreen"><param value="high" name="quality"><param value="#000000" name="bgcolor"><param value="userID=44999424&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml" name="flashvars"><embed src="http://static.twitter.com/flash/widgets/profile/TwitterWidget.swf" quality="high" bgcolor="#000000" width="{width}" height="{height}" name="TwitterWidget" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="userID=44999424&styleURL=http://static.twitter.com/flash/widgets/profile/smooth.xml"/></object>';
	for (var i = 0; i < divs.length; i++){
		if ((' Twitter ').indexOf(' '+divs[i].className+' ') != -1){
			try{
				var twdiv = divs[i];
				var width = twdiv.style.width.replace('px','');
				var height = twdiv.style.width.replace('px','');
				var src = twdiv.getElementsByTagName('a')[0].href;
                                var movie = twobjcode.replace(/\{width\}/g,width).replace(/\{height\}/g,height).replace(/\{src\}/g,src);
				twdiv.innerHTML = movie;
			}catch(e){};
		}
	}
}

addOnloadHook(playTwitter);

///////////////////////////////////
var archiveListTemplate = 'ArchiveList';
var archivePageTemplate = 'ArchivePage';
importScriptPage('ArchiveTool/code.js', 'dev');
//////////////////////////////////

/* </pre> */

/* MediaWiki:Monaco.js */
function ShoutboxNotice () {
$('<div>Also try <a href="/wiki/SW:IRC">the IRC channel</a></div>').prependTo('#widget_302_content');
}

addOnloadHook( ShoutboxNotice );