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();
    });
};

$(document).ready(function() {
	$("#up").localScroll();

	$("#clients").jcarousel({
        auto: 3,
		scroll: 1,
		animation: "slow",
        wrap: "both",
        initCallback: mycarousel_initCallback
	});

	$("#offer").cycle({
		timeout: 4000
	});

	$("#the-reference").cycle({
		delay: 2000
	});
	$("#the-current-occupation").cycle({
		delay: 1000
	});

	$("a.fancybox").fancybox({
		hideOnContentClick : true,
		titlePosition : "inside"
	});

});