var PBScriptPreloader=Class.create({pbType:"PBScriptPreloader",initialize:function(A){this.delay=2000;this.fetchedScripts=new Array();for(var B in A){this[B]=A[B]}this.onLoaded=this.onLoadHandler.bindAsEventListener(this);Event.observe(window,"load",this.onLoaded);this.currentScriptIndex=-1},onLoadHandler:function(D){try{var A=this;var B=this.fetch;if(!B&&D.request.options.custom){A=D.request.options.custom;B=A.fetch}setTimeout(B.bind(A),A.delay)}catch(C){}},add:function(B,A){A=A||this.evalJSON;this.fetchedScripts[this.fetchedScripts.length]=B},fetch:function(){if(++this.currentScriptIndex<this.fetchedScripts.length){this.loadScript(this.fetchedScripts[this.currentScriptIndex])}},loadScript:function(A){new Ajax.Request(A,{method:"get",evalJSON:false,evalJS:false,onSuccess:this.onLoadHandler,custom:this})}});var HomePageController;(function(){var A={initialize:function(){var B=$("usernameemail");if(B){B.focus()}if(location.search.indexOf("whatsnew")>0){location.hash="tabs"}}};Controller.create("HomePageController",A,{})})();var CollapseableHeaderPromo=Class.create({initialize:function(){var B=$$(".collapseableHeaderPromo .closebox"),A;for(A=0;A<B.length;A++){Event.observe(B[A],"click",this.handleCloseClick.bindAsEventListener(this),false)}},handleCloseClick:function(C){var B=Event.element(C);var A=Element.up(B,".collapseableHeaderPromo");if(typeof (A)!="undefined"&&A){Effect.toggle(A,"blind")}return false}});