
	// jquery scripts
	$(document).ready(function () {

		// lightbox laten werken
		$('a.lightbox').lightBox();
		
		// slideshow
		$('#slideshow').cycle({ 
		    fx:    'fade', 
		    speed:  3000,
		    pause: 	1 
		 });		
  
	});	
	
	// voor het gebruik van exotische font gebruiken we Cufon
	// Cufon('h1')('h2')('#mainmenu ul li a')('#submenu ul li a');	
	
	
	function mycarousel_initCallback(carousel)
	{
   	// Disable autoscrolling if the user clicks the prev or next button.
    	carousel.buttonNext.bind('click', function() {
        	carousel.startAuto(0);
    	});

    	carousel.buttonPrev.bind('click', function() {
       	 carousel.startAuto(0);
    	});

    // Pause autoscrolling if the user moves with the cursor over the clip.
    	carousel.clip.hover(function() {
     	   carousel.stopAuto();
   		}, function() {
        	carousel.startAuto();
    	});
	};
	
   function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
   {
   // The index() method calculates the index from a
   // given index who is out of the actual item range.
   var idx = carousel.index(i, mycarousel_itemList.length);
   carousel.add(i, mycarousel_getItemHTML(mycarousel_itemList[idx - 1]));
   };
  
   function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
   {
    carousel.remove(i);
   }; 

	function mycarousel_getItemHTML(item)
  {
   return '<img src="' + item.url + '" width="75" height="75" alt="' + item.title + '" />';
  }; 

	jQuery(document).ready(function() {
    	jQuery('#mycarousel').jcarousel({
       		auto: 0.01,
        	wrap: 'circular',
        	visible: 4,
        	scroll: 1,
        	animation: 6000,
        	itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback},
			itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback}, 
        	initCallback: mycarousel_initCallback
    	});
	});

