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 addHover(elm)
{
  elm.style.behavior = " "; //reecriture du style behavior
  elm.hoverClassName = "hover";
  elm.onmouseenter = function() {
    this.className += ' ' + this.hoverClassName;
  }
  elm.onmouseleave = function() {
    this.className = this.className.replace(new RegExp("\\b" + this.hoverClassName + "\\b", "g"),"");
  }
}


$(document).ready(function() {
	
	// header
	$('#frise-catalogue').css("visibility","visible");
	
	// http://sorgalla.com/projects/jcarousel/examples/special_circular.html
	$('#frise-catalogue > ul').jcarousel({
		auto: 2,
		animation: 3000,
		auto: 10,
		easing: 'linear',
        wrap: 'last',
        initCallback: mycarousel_initCallback
	});
	
	// accueil animation de la section nouveautés
	$("#main #nouveautes > ul").tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 7000);
});