$(document).ready(
	function(){ 
		$("ul#menu").hide();
		$("#content h3").hide();
		
		$("ul#menu").fadeIn("slow");
		
		$("#carousel-prev").hide();
		$(".cartouche2").hide();


		window.setTimeout(function(){$("#content h3").slideToggle(1000);}, 1000);	
		
		jQuery('#carousel').jcarousel({
        auto: 0,
		itemFirstInCallback:  carousel_itemFirstInCallback,
        wrap: 'last',
		scroll: 1,
		visible: 1, 
		animation: 1000,
		initCallback: mycarousel_initCallback,
        buttonNextHTML: null,
        buttonPrevHTML: null
		});
		
	}
	
	
);


function carousel_itemFirstInCallback(carousel, item, idx, state) {
	

	if (idx == 1) {
	    $("#carousel-prev").fadeOut(200);
	}
		
	else if (idx == 2) {
	    $("#carousel-prev").fadeIn(200);
		$("#carousel-next").fadeIn(200);
	}
		
	else if (idx == 3)
		$("#carousel-next").fadeOut(200);
		
	$("#cartouche2_"+idx).fadeIn("slow");


};



function mycarousel_initCallback(carousel)
{
    jQuery('#carousel-next').bind('click', function() {
		$(".cartouche2").fadeOut("slow");
        $("#cartouche1").fadeOut("slow");
		carousel.next();
		$("#cartouche1").fadeIn("slow");
        return false;
    });

    jQuery('#carousel-prev').bind('click', function() {
		$(".cartouche2").fadeOut("slow");
		$("#cartouche1").fadeOut("slow");
        carousel.prev();
		$("#cartouche1").fadeIn("slow");
        return false;
    });
};
