	// affichage bloc listing produit
	var montimer;
	var affiche_zoom = false;
	var current_elem = false;

	function affiche_r()
	{
		if (current_elem != false)
		{
			$(".cont_une_gondol_prix").css('z-index','1');
			current_elem.children(".cont_une_gondol_prix").css('z-index','10');
			current_elem.children(".gondol_prix").css('z-index','13');

			current_elem.children(".mask").show();
			current_elem.children(".mask").children(".une_gondol_zoom").show();
			current_elem.children(".mask").children(".une_gondol_zoom").animate({left:0+"px"}, 400);
			current_elem.children(".mask").children(".une_gondol_zoom").css('z-index','2');
			current_elem.css('z-index','5');
		}
	}

	function affiche_l(){

			if (current_elem != false) {
				$(".cont_une_gondol_prix").css('z-index','1');
				current_elem.children(".cont_une_gondol_prix").css('z-index','10');
				current_elem.children(".gondol_prix").css('z-index','13');

				current_elem.children(".mask").show();
				current_elem.children(".mask").children(".une_gondol_zoom").show();
				current_elem.children(".mask").children(".une_gondol_zoom").animate({
						left:0+"px"
					 }, 400);

				current_elem.children(".mask").children(".une_gondol_zoom").css('z-index','2');
				current_elem.css('z-index','5');
			}

	}
	// rotation des marques
	var time_rotate = 3000;
	var do_rotate = true;
	var nb_li = 0;
	var max_li = 4;

	function init_rotate_marque() {
		// récup le nb li :
		$( "#liste_marque li" ).each( function(){ nb_li++;} );
		// active la marque courante :
		active_marque($('#logo_'+id_current_marque));

		// active la rotation :
		if (nb_li >= max_li) {

			setTimeout('rotate_marque()',time_rotate);
			$('#encart_marques').hover(function() {do_rotate = false;}, function() {do_rotate = true;});

			$(".btn_up").click(function() {do_rotate_marque('up');});
			$(".btn_down").click(function() {do_rotate_marque('down');});

		} else {
			do_rotate = false;
		}
	}

	function active_marque(img_logo) {
		if (img_logo.attr('style').indexOf('-snb') > 0) {
			new_src = img_logo.attr('style').replace('-snb-fff','-fff');
			img_logo.attr('style', new_src);
		}
	}

	function desactive_marque(img_logo) {

		if (img_logo.attr('style').indexOf('-snb') < 1) {
			new_src = img_logo.attr('style').replace('-fff', '-snb-fff');
			img_logo.attr('style', new_src);
		}
	}

	function rotate_marque() {
		if (do_rotate) do_rotate_marque();
		setTimeout('rotate_marque(\'up\')',time_rotate);
	}

	function do_rotate_marque(sens) {

		_height = ($('#liste_marque ul li:eq(0)').height()) * -1;

		if (sens == 'down') {

			i_logo_depl = (nb_li-1);

			$('#liste_marque ul').prepend($('#liste_marque ul li:eq('+i_logo_depl+')'));
			$('#liste_marque ul li:eq(0)').css('marginTop',_height);
			$('#liste_marque ul li:eq(0)').animate({marginTop:0},'normal');

			traite_affiche_img();

		} else {
			$('#liste_marque ul li:eq(0)').animate(
				{marginTop:_height},
				'normal',
				function() {	// callback après anim
					// déplace le li
					$('#liste_marque ul').append($(this));
					$(this).css('marginTop',0);
					traite_affiche_img();
				}
			);
		}
	}

	function traite_affiche_img() {

		cpt = 0;
		$('#liste_marque a').each(function() {
			if (cpt == 0) {
				// active la marque qui vient en tête:
				id_img = $(this).attr('id');
				id_current_marque = id_img.replace('logo_','');
				active_marque($(this));

				// chargement du swf :
				new_swf = affiche_swf_marque(
					id_current_marque+'_hf',
					current_arbo,
					eval('url_f_'+id_current_marque),
					eval('url_h_'+id_current_marque),
					true
				);
				$('#x_swf_marque').html(new_swf);
			} else {
				// désactive les autres marques :
				desactive_marque($(this));
			}
			cpt++;
		});

	}


	$(document).ready(function(){ //qd la page est chargée

		//$(".ul_type").hide();

		/*$(".une_gondol_zoom").hide();
		$(".une_gondol_zoom_hover").hide();*/


		/*$(".main_menu li ul").hide();
		$(".ul_nv1_show").children("ul").show();
		$(".ul_nv1_show").show();*/

		// encart marques
		$("#liste_marque li a").click(function(event)
		{
			event.preventDefault();
			id_img = $(this).attr('id');
			id_current_marque = id_img.replace('logo_','');

			// chargement du swf :
			new_swf = affiche_swf_marque(
				id_current_marque+'_hf',
				current_arbo,
				eval('url_f_'+id_current_marque),
				eval('url_h_'+id_current_marque),
				true
			);
			$('#x_swf_marque').html(new_swf);
		});

		$("#liste_marque li a").hover(function()
		{
			$("#liste_marque li a").each(function()
			{
				desactive_marque($(this));
			});
			active_marque($(this));
		});

		// bloc listing produit
		$(".une_gondol_photo_l").children(".cont_une_gondol_photo").mouseover(
			function(event){

				if ($(this).parents(".une_gondol_photo_l").children(".mask").css('display')=='none'){


					current_elem = $(this).parents(".une_gondol_photo_l");
					montimer=setTimeout("affiche_r()",500);



				}
			}
		);

		$(".une_gondol_photo_l").mouseleave(
			function(event){
				current_elem=false;
				clearTimeout(montimer);

				$(this).children(".mask").children(".une_gondol_zoom").animate({
							left:-168+"px"
						 }, 400, function(){
							$(this).parents(".une_gondol_photo").css('z-index','2');
							$(this).parent().hide();
						 });



			}
		);

		$(".une_gondol_photo_r").children(".cont_une_gondol_photo").mouseover(
			function(event){
				if ($(this).parents(".une_gondol_photo_r").children(".mask").css('display')=='none'){
					current_elem = $(this).parents(".une_gondol_photo_r");
					montimer=setTimeout("affiche_r()",500);
				}
			}
		);

		$(".une_gondol_photo_r").mouseleave(
			function(event){
				current_elem=false;
				clearTimeout(montimer);

				$(this).children(".mask").children(".une_gondol_zoom").animate({
							left:160+"px"
						 }, 300, function(){
							$(this).parents(".une_gondol_photo").css('z-index','2');
							$(this).parent().hide();
						 });
			}
		);
/*
		function hide_ul_nv2(obj)
		{
			if (obj.is('ul'))
			{
				obj.hide();
				
				obj_a = obj.prev();

				if(obj_a.is('a'))
				{
					html_a = obj_a.html().replace(':', '');
					obj_a.html(html_a);
				}
			}
		}

		function show_ul_nv2(obj)
		{
			
			if (obj.is('ul'))
			{
				obj.show();
				
				obj_a = obj.prev();
				
				if(obj_a.is('a'))
				{
					html_a = obj_a.html().replace(':', '')+':';
					obj_a.html(html_a);
				}
			}
			
		}
*/
		// menu principal
		/**/
		$("a.collec").hover(
			function(event){
				//////////////////////////////////////////////////////////
				// niveau 1

				// déselection de la collection courante
				collec_c = $(".collec_select");
				collec_c.addClass("_collec_c_ collec");
				collec_c.removeClass("collec_select");
				/*
				// cacher le sous menu de la collection courante
				$('.main_menu li ul.ul_nv1_show').hide();
				// montrer le sous menu de la collection surlignée
				$(this).prev('.main_menu_nv1').show();*/
				// highlight temporaire de la collection surlignée
				$(this).addClass('collec_select _collec_hl_');
				$(this).removeClass('collec');
			}
		);
		
		//affichage du menu selectionné avant le hover
		
		$(".main_menu>li").mouseleave(
			function(event)
			{
				//////////////////////////////////////////////////////////
				// niveau 1

				// restauration de la collection courante
				collec_c = $("._collec_c_");
				collec_c.addClass("collec_select");
				collec_c.removeClass("_collec_c_ collec");
				// enlever highlight de la collection surlignée
				collec_h = $('._collec_hl_');
				collec_h.addClass('collec');
				collec_h.removeClass('_collec_hl_ collec_select');
				// cacher le sous menu de la collection surlignée
				$(".main_menu li ul.main_menu_nv1").hide();
				// restaurer le sous menu de la collection courante
				$('.main_menu li ul.ul_nv1_show').show();

				//////////////////////////////////////////////////////////
				// niveau 2
				/*
				// cacher tous les sous-menus
				$('.main_menu li ul.main_menu_nv1 ul').each(function() { hide_ul_nv2($(this)); });
				// montrer les sous-menus qui doivent être affichés
				$('.main_menu li ul.ul_nv2_show').each(function() { show_ul_nv2($(this)); });*/
			}
		);
		
		// affichage du bon sous menu
		/*
		$(".jquery_lien_ss_menu").click
		(
			function(event)
			{
				ul_next = $(this).next();

				if (ul_next.is("ul"))
				{
					event.preventDefault();

					//////////////////////////////////////////////////////////
					// niveau 2

					$(".jquery_lien_ss_menu").next().each(function() { hide_ul_nv2($(this)); });

					show_ul_nv2(ul_next);
				}
			}
		);
		*/
		// tetes de gondole
		var menu_gondol_show=1;

		$(".menu_gondol_btn,.menu_gondol_btn_2").click(
				function(event){
						event.preventDefault();
						if(menu_gondol_show==1){
							$("#menu_gondol_menu").fadeOut("fast",function(){


								$("#menu_gondol").animate({
									width: "20px"
								}, 400	,function() {
										$(".menu_gondol_btn,.menu_gondol_btn_2").addClass("menu_gondol_btn");
										$(".menu_gondol_btn,.menu_gondol_btn_2").removeClass("menu_gondol_btn_2");
									}
								);

								$(".cont_gondol_white").animate({
									width: "10px"
								}, 400	);

							 });

							menu_gondol_show=0;
						}
						else{
							$("#menu_gondol").animate({
								width: "168px"
							 }, 400	,function() {
									$("#menu_gondol_menu").fadeIn("fast");
									$(".menu_gondol_btn,.menu_gondol_btn_2").addClass("menu_gondol_btn_2");
									$(".menu_gondol_btn,.menu_gondol_btn_2").removeClass("menu_gondol_btn");
								}
							);

							 $(".cont_gondol_white").animate({
									width: "158px"
								}, 400	);

							menu_gondol_show=1;
						}
				}
		);
	})