var clrzMachinegun=new Class({Implements:[Options,Events],options:{elt:"",fps:24,length:600},initialize:function(a){this.setOptions(a);this.element=$(this.options.elt);this.width=this.element.getStyle("width").toInt();this.speed=(1000/this.options.fps);this.pos=0;this.frame=1;this.lastFrame=(this.options.length/this.width);this.direction=0},setDirection:function(a){if(a){this.direction=a}return this},Play:function(){this.moove();this.timer=this.moove.periodical(this.speed,this);this.fireEvent("Play");return this},Stop:function(){$clear(this.timer);this.fireEvent("Stop");return this},rewind:function(){this.pos=0;this.element.setStyle("background-position","0px 0");return this},end:function(){this.Stop();this.fireEvent("end");new Fx.Morph($("loader"),{duration:1000,wait:false,transition:Fx.Transitions.Expo.easeOut}).start({opacity:0});$(document.body).setStyle("overflow","auto");return this},moove:function(){this.pos=this.pos+this.width;this.frame=(this.pos/this.width);if(this.frame==(this.lastFrame)){this.end();return}var a=(this.direction==0)?"-":"";this.element.setStyle("background-position",a+this.pos+"px 0")}});