var SOUTHPARK=window.SOUTHPARK||{},SP=SOUTHPARK;var mtvnSetCoad=function(adObject){var url=adObject.url;var width=adObject.width;var height=adObject.height;var clickTag=adObject.clickUrl;var parent=document.getById("flashcontent");var iframe=document.getById("mtvnCoAd");if(parent&&!iframe){if((width==120)&&(height==60)){parent.setInnerHTML('<iframe id="'+((width==120)?"mtvBugAd":"mtvnCoAd")+'" src="'+url+'" frameborder="0" scrolling="no"></iframe>',"append");}}};var MTVi=window.MTVi||{};MTVi.Ads=function(){var that;return{init:function(){that=MTVi.Ads;var ads=$(".ad");ads.filter(function(index){return(/sz_/).test(ads[index].className);});var document_write=document.write;var document_writeln=document.writeln;var promocount=0;var firstad=true;ads.each(function(index,ad){var size=(/sz_([0-9]+)x([0-9]+)/).exec(ad.className);if(size==null)
return;var expandable=false;document.writeln=document.write=function(str){ad.innerHTML+=str;};var flags=["site_region=se","log=0","mpu=1","sky=0","overlay=0"];if(firstad&&size[2]=="90")
flags.push("slot=leaderboard_top");if(ad.className.indexOf("_promo")>0)
flags.push("promo="+(++promocount));if(document.location.toString().indexOf("testmode")>=0)
flags.push("testmode="+that.gup('testmode'));com.mtvi.ads.AdManager.placeAd({size:size[1]+'x'+size[2],keyValues:flags.join(";"),contentType:(expandable?'adj':'adi')});firstad=false;});},gup:function(name)
{name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null)return"";else if(results[1]==undefined)return"";else return results[1];}};}();$(document).ready(MTVi.Ads.init);SP.enhanceNav=function(){var that;var nodes;return{init:function()
{that=SP.enhanceNav;var nav=$("#navigation");if(nav.length!=1)
return;that.speed=.1;that.nodes=nav.find('.topLevel');that.nodes.bind('mouseover',that.mouseover);that.nodes.bind('mouseout',that.mouseout);},mouseover:function(event)
{var parent=this.parentNode,node=this;var nodes=that.nodes.filter(function(index){return this!=node;});$(nodes).find('a').stop();$(nodes).each(function(){if(this!=node)
$(this).find('a').fadeTo(that.speed*1000,0.4);});},mouseout:function(event)
{var parent=this.parentNode,node=this;var nodes=that.nodes;$(that.nodes).find('a').stop();$(that.nodes).find('a').fadeTo(that.speed*1000,1);}};}();$(document).ready(SP.enhanceNav.init);SP.searchBar=function(){var that;return{init:function()
{that=SP.searchBar;var searchBar=$("#searchtext");searchBar.bind("focus",that.searchInputFocus);searchBar.bind("blur",that.searchInputBlur);},searchInputFocus:function(event)
{var searchInput=event.target;if(searchInput.value==searchInput.defaultValue)
{searchInput.value="";}},searchInputBlur:function(event)
{var searchInput=event.target;if(searchInput.value==searchInput.defaultValue||searchInput.value=="")
{searchInput.value=searchInput.defaultValue;}}};}();$(document).ready(SP.searchBar.init);SPAccount=function()
{var that;var timer;return{openPopupWithURL:function(url)
{if(timer)
clearTimeout(timer);$("body:first").append('<div style="background: url(/layout/common/img/geoblock/background.png) 0 0 repeat; position: fixed; top: 0px; left:0px; width:100%; height:100%; z-index:10010; " id="account-dialog-container">'+'<div style="position: relative; width: 780px; height: 400px; margin: 200px auto; border: 5px solid #ffcc00; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px;">'+'<iframe src="'+url+'" width="780" height="400" id="account-dialog" />'+'<a href="javascript:SPAccount.close();" id="account-dialog-close" style="display: block; position: absolute; top: -21px; right: -21px; width: 32px; height: 32px; color: #ffcc00; font-size: 20px; line-height: 32px; background-color: black; border: 5px solid #ffcc00; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px;">X</a>'+'</div></div>');timer=setTimeout(SPAccount._check,1000);},openPopup:function(name,parameters)
{that.openPopupWithURL("/iframes/account/"+name);},close:function(url)
{if(timer)
clearTimeout(timer);var iframe=document.getElementById('account-dialog');if(iframe){var currentUrl=that._getURL();if(currentUrl.indexOf("#refresh=close")>0||currentUrl=="")
window.location.reload(true);}
$("#account-dialog-container").remove();},_check:function()
{var iframe=document.getElementById('account-dialog');if(iframe){var currentUrl=that._getURL();if(currentUrl.indexOf("#refresh=now")>0)
window.location.reload(true);}
timer=setTimeout(SPAccount._check,1000);},_getURL:function()
{try{var iframe=document.getElementById('account-dialog');var result=iframe.contentWindow.location.href;if(result!=window.undefined)
return result;}catch(err){}
return"";},init:function()
{that=SPAccount;}};}();SPAccount.init();SP.userStatus=function(){var that;var userStatusBox;return{init:function(){that=SP.userStatus;$("#userstatus #register").bind("click",that.openRegister);$("#userstatus #login").bind("click",that.openLogin);},openRegister:function(e)
{SPAccount.openPopup("register");e.preventDefault();},openLogin:function(e)
{SPAccount.openPopup("login");e.preventDefault();}}}();$(document).ready(SP.userStatus.init);
/* 2012-02-23 02:16:59 - cached for 31392 seconds */
