  var wcs_scroller = new Class({
   moveleft: function(e) {
    var marginleft = this.container.getStyle('margin-left').toInt();
    if (marginleft > (0 - this.container.getStyle('width').toInt())) {
     var len = (0 - this.container.getStyle('width').toInt() + this.mainwidth + this.step);
     if ((len - marginleft) * - 1 < this.step) this.eff.start(marginleft, parseInt(len - this.step)); else this.eff.start(marginleft, parseInt(marginleft - this.step));
    };
    return wu.stop(e);
   },
   moveright: function(e) {
    var marginleft = this.container.getStyle('margin-left').toInt();
    if (marginleft < 0) this.eff.start(marginleft, Math.min(0, parseInt(marginleft + this.step)));
    return wu.stop(e);
   },
   initialize: function(mainobj) {
    this.ul = mainobj.getElements('.videolist')[0];
    this.container = mainobj.getElements('.scroll')[0];
    this.mainwidth = mainobj.getStyle('width').toInt();
    this.step = this.mainwidth / 2;
    var width = parseInt(parseInt(this.ul.getElementsByTagName('li').length) * 114);
    this.container.setStyle('width', width + 'px');
    if (width > this.mainwidth) {
     this.eff = new Fx.Style(this.container, 'margin-left', {duration: 100});
     mainobj
      .adopt(new Element('a').addClass('fleft').setProperties({'href': '#', 'tabindex': '0'}).appendText('jobbra').addEvent('click', this.moveright.bind(this)))
      .adopt(new Element('a').addClass('fright').setProperties({'href': '#', 'tabindex': '0'}).appendText('balra').addEvent('click', this.moveleft.bind(this)))
     ;
    };
   }
  });

