
window.addEvent('domready', function(){ 
	  var totIncrement		= 0;
	  var increment			= 96;
	  document.getElementById('previous').style.visibility='hidden';
	  var maxRightIncrement	= increment*(-3);
	  var fx = new Fx.Style('slider-list', 'margin-left', {
				duration:300,
				transition: Fx.Transitions.Back.easeInOut,
				wait: true
});
	   
	   //-------------------------------------
	  // EVENTS for the button "previous"
	  $('previous').addEvents({ 
          'click' : function(event){ 
		  if(totIncrement<0){
					totIncrement = totIncrement+increment;
					fx.stop()
					fx.start(totIncrement);
					document.getElementById('next').style.visibility='visible';
				} else {
					document.getElementById('previous').style.visibility='hidden';	
				}
			}			  	  
      }); 
	 
       //-------------------------------------
	  // EVENTS for the button "next"
  	  $('next').addEvents({ 
          'click' : function(event){ 
			document.getElementById('previous').style.visibility='visible';		  
			 if(totIncrement>maxRightIncrement){
				totIncrement = totIncrement-increment;
		    	fx.stop()
				fx.start(totIncrement);
			} else {
				totIncrement = totIncrement-increment;
		    	fx.stop()
				fx.start(totIncrement);
				document.getElementById('next').style.visibility='hidden';
				}
          }		  		  
      })

	 
});
