if(typeof(mobile)=="undefined"){var mobile={}
}mobile.AbstractScroller=Class.create({_element:null,SCROLL_STEP:100,USE_EFFECTS:true,ANIMATION_DURATION:0.5,_offsetProperty:"xxx",_offsetMaxProperty:"xxx",_scrollMaxProperty:"xxx",initialize:function(a){this._element=$(a);
this._setScroll(0)
},_scroll:function(a){if(this.USE_EFFECTS){this._animateScroll(a)
}else{this._setScroll(a)
}},scrollForward:function(){var b=this._element[this._scrollMaxProperty]-this._element[this._offsetMaxProperty];
var a=(this._element[this._offsetProperty]+this.SCROLL_STEP)>b?b:this._element[this._offsetProperty]+this.SCROLL_STEP;
this._scroll(a)
},scrollBackward:function(){var a=this._element[this._offsetProperty]<this.SCROLL_STEP?0:this._element[this._offsetProperty]-this.SCROLL_STEP;
this._scroll(a)
},_animateScroll:function(a){new Effect.Tween(this._element,this._element[this._offsetProperty],a,{duration:this.ANIMATION_DURATION},this._offsetProperty)
},_setScroll:function(a){this._element[this._offsetProperty]=a
}});
mobile.HorizontalScroller=Class.create(mobile.AbstractScroller,{_offsetProperty:"scrollLeft",_offsetMaxProperty:"offsetWidth",_scrollMaxProperty:"scrollWidth"});
mobile.VerticalScroller=Class.create(mobile.AbstractScroller,{_offsetProperty:"scrollTop",_offsetMaxProperty:"offsetHeight",_scrollMaxProperty:"scrollHeight"});