/* USWT build v3.2.0 - glider.js - 2011-06-08 12:01:08 EST - !!! DO NOT MODIFY !!! */
var version="v3.2.0 Distributable Release - 10/12/2010";var Glider=new Class({initialize:function(b,a){this.wrapper=$(b);this.scroller=this.wrapper.getElement("div.scroller");this.sections=this.wrapper.getElements("div.section");this.options=Object.append({duration:1,frequency:3},a||{});this.sections.each(function(d,c){d._index=c});this.myFx=new Fx.Scroll(this.scroller);this.events={};if(this.options.initialSection){if(this.options.initialSection=="random"){this.moveTo(this.sections.getRandom(),this.scroller)}else{this.moveTo(this.options.initialSection,this.scroller)}}if(this.options.autoGlide){this.start()}},moveTo:function(b,c){var a=b.getPosition(c);this.myFx.cancel();this.myFx=new Fx.Scroll(c).toElement(b);this.current=$(b);return false},moveNext:function(c){if(c!=null){this.periodicallyUpdate(true)}if(this.current){var b=this.current._index;var a=(this.sections.length-1==b)?0:b+1}else{var a=1}this.moveTo(this.sections[a],this.scroller)},movePrevious:function(b){if(b!=null){this.periodicallyUpdate(true)}if(this.current){var a=this.current._index;var c=(a==0)?this.sections.length-1:a-1}else{var c=this.sections.length-1}this.moveTo(this.sections[c],this.scroller)},next:function(){this.moveNext(true)},previous:function(){this.movePrevious(true)},stop:function(){clearTimeout(this.timer)},start:function(){this.periodicallyUpdate()},periodicallyUpdate:function(a){if(this.timer!=null){clearTimeout(this.timer);if(a!=true){this.moveNext()}}this.timer=setTimeout(this.periodicallyUpdate.bind(this),this.options.frequency*1000)}});
