﻿var EICIndex = {

	start: function(){
    if( $('actu_scroller')) {
      var scro = new Fx.Scroll( $('actu_scroller'), { transition : Fx.Transitions['linear'], 'wait': false, wheelStops: false,
          onComplete: function(){
            if( this.options.duration==0) {
    	        this.options.duration = this.element.scrollHeight * 15;
        	    this.toBottom();
            } else {
              this.options.duration = 0;
	            this.toTop();
	          }
	        }
      });
      
      scro.element.addEvent( 'mouseover', function(e){
        scro.pause();
      });
      
      scro.element.addEvent( 'mouseout', function(e){
        scro.resume();
      });
      
      scro.options.duration = scro.element.scrollHeight * 15;
      scro.toBottom();
    }
  }
};

window.addEvent('domready', EICIndex.start);
