function mycarousel_initCallback(carousel)
{
    // Disable autoscrolling if the user clicks the prev or next button.
    carousel.buttonNext.bind('click', function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });

    carousel.buttonPrev.bind('click', function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });

    // Pause autoscrolling if the user moves with the cursor over the clip.
    carousel.clip.hover(function() {
        carousel.stopAuto();
    }, function() {
        carousel.startAuto();
    });
    
		// using tab to navigate, stop carousel
		$(document).observe('keydown', function(k){if (k.keyCode == 9) carousel.stopAuto() /*alert('tab')*/;if (k.keyCode == 39) carousel.next()/*alert('right')*/;if (k.keyCode == 37) carousel.prev()/*alert('left')*/;});
		
 };

jQuery(document).ready(function() {
    jQuery('#uitgelichtcarousel').jcarousel({
        auto: 6,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
