jQuery(document).ready(function() {

	// Onglet Fiche produit

  	$(function () {  
	
	DisplayTabContent(0);
	            $(".tab_box ul.menu li a" ).click(function(){
                    if ($('div.tab_box > div.tab_box_content:animated').size() == 0)
				  {
                        $(".tab_box ul.menu li").removeClass('active');
                        var $listItem = $(this).parent().addClass('active'); 
                        var index = $(".tab_box ul li").index($listItem); 
                        if( index > -1 ){
                        DisplayTabContent(index);
                        }
                    }
	            });
	             return false;   
	     });

	function DisplayTabContent(index) {
	    $("div.tab_box > div.tab_box_content").hide().filter(":nth("+index+")").show();
        return false;
	}
 
// Box promo
 		$('.produit_tab_promo_box').hide();
 		$('.produit_tab_promo_box:first').show();
 		$('.produit_tab_promo ul li:first').addClass('active');
			
			
		var tabBoxContainersPromo = $('.produit_tab_promo_box');
				
		$('.produit_tab_promo ul a').hover(function () {
			$(this).parent().addClass('active').siblings().removeClass('active');
			tabBoxContainersPromo.hide();
			tabBoxContainersPromo.filter(this.hash).show();
			return false;
	   }) 

// Box new
 		$('.produit_tab_new_box').hide();
 		$('.produit_tab_new_box:first').show();
 		$('.produit_tab_new ul li:first').addClass('active');
			
			
		var tabBoxContainersNew = $('.produit_tab_new_box');
				
		$('.produit_tab_new ul a').hover(function () {
			$(this).parent().addClass('active').siblings().removeClass('active');
			tabBoxContainersNew.hide();
			tabBoxContainersNew.filter(this.hash).show();
			return false;
	   }) 
		

// Box bestsell
 		$('.produit_tab_bestsell_box').hide();
 		$('.produit_tab_bestsell_box:first').show();
 		$('.produit_tab_bestsell ul li:first').addClass('active');
			
			
		var tabBoxContainersBestsell = $('.produit_tab_bestsell_box');
				
		$('.produit_tab_bestsell ul a').hover(function () {
			$(this).parent().addClass('active').siblings().removeClass('active');
			tabBoxContainersBestsell.hide();
			tabBoxContainersBestsell.filter(this.hash).show();
			return false;
	   }) 
 
});





