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();
    });
    jQuery('.carousel-nav a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        return false;
    });
    
    jQuery('.next-arrow').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('.prev-arrow').bind('click', function() {
        carousel.prev();
        return false;
    });
};

		
function mycarousel_itemVisibleInCallbackAfterAnimation(carousel, item, idx, state) {
	jQuery(".carousel-nav a").removeClass('active-carousel');
	jQuery("#carousel-"+idx).addClass('active-carousel');
};
