(function(a,b){function d(){var d={textboxes:b('input.textbox[title], div#gform_wrapper_5 input[type="text"][value]'),tweetList:a("tweet-list"),upload:{selection:b('div#html-upload-ui input[type="file"]'),button:b('div#html-upload-ui input[type="submit"]'),notification:b("div.video-upload p.upload-notice")},refresh:a("refresh-countdown")},e=null;d.textboxes.each(function(a){a.get("title")?(new OverText(a)).startPolling():a.get("value")&&((new OverText(a,{textOverride:a.get("value")})).startPolling(),a.erase("value"))}),d.tweetList&&(new c({parent:d.tweetList,children:d.tweetList.getChildren(),delay:7e3})).start(),d.refresh&&(e=d.refresh.get("text").toInt(),setInterval(function(){e>0&&(e-=1),d.refresh.set("text",e)},1e3),setTimeout(function(){location.reload()},e*1e3)),d.upload.selection.length>0&&(d.upload.selection[0].addEvent("change",function(){d.upload.button[0].setStyle("display","block")}),d.upload.button[0].addEvent("click",function(){setTimeout(function(){d.upload.notification[0].setStyle("visibility","visible")},500)}))}"use strict";var c=new Class({options:{parent:null,children:null,delay:4e3,transition:1e3},Implements:[Options,Events],initialize:function(a){var b=null,c=null,d=null;this.setOptions(a),this.options.children||(this.options.children=this.options.parent.getChildren()),this.options.children.each(function(a){d=a.getSize().y,d>c&&(c=d)}),this.currentIndex=0,this.indexCount=this.options.children.length-2,this.timeoutReference=!1,this.running=!1,this.options.parent.setStyles({position:"relative",height:c}),this.options.children.setStyles({position:"absolute",left:0,top:0,opacity:0,"z-index":0}),this.options.children[0].setStyles({opacity:1,"z-index":10})},start:function(a){return this.running||(this.running=!0,typeof a!="undefined"&&(this.currentIndex=a),this.timeoutReference=setTimeout(this.step.bind(this),this.options.delay),this.fireEvent("start")),this},step:function(){var a=null;return this.currentIndex+=1,this.currentIndex===0?a=this.indexCount:a=this.currentIndex-1,this.options.children[a].setStyle("z-index",0),this.options.children[a].fade("out"),this.options.children[this.currentIndex].setStyle("z-index",10),this.options.children[this.currentIndex].fade("in"),this.fireEvent("step",this.currentIndex),this.currentIndex===this.indexCount&&(this.currentIndex=-1),this.running&&(this.timeoutReference=setTimeout(this.step.bind(this),this.options.delay)),this}});document.addEvent("domready",d)})(document.id,document.getElements);
