document.addEvent("domready",function()
{
    var options = {
	    id:	'uitgelichtCarousel',
		itemClass: '.uitgelichtItem',
		buttonPrev: 'carouselButtonLeft',
		buttonNext:	'carouselButtonRight',
		minimalItems: 2,
		duration: 'long',
		fadeIn: false,
		onFocus: function(link) {
		    location.href = link.href;
		}
	};
	var uitgelichtCarousel = new Carrousel(options);
  
  var autoScroll = true;
  
  document.id('carousel').addEvents({
    mouseenter:function()
    {
      autoScroll = false;
    },
    
    mouseleave:function()
    {
      autoScroll = true;
    }
    
  });
  
  (function()
  {
    if(autoScroll && uitgelichtCarousel.items.length > 1)
    {
      uitgelichtCarousel.next();
    }
  }).periodical(($(document.body).hasClass('home') ? 20000 : 7000))
});

