
function adapttooltip() {
	/* Affichage du tooltip au survol de l'icône de zoom sur la MEDIUM/BIG image */			
	jQuery('.zoomin-zoomicon').hover(function(){
		$('<span class="tooltipinfo"><span class="top"></span><span class="content">Zoom</span><span class="bottom"></span></span>').appendTo('.zoomin-zoomlink');
	}, function() {
		$('.zoomin-zoomlink .tooltipinfo').remove();
	});
	
	/* Affichage du tooltip - paramètres d'affichage */
	jQuery('.tooltipinfo').hide();
	
	jQuery('.tooltip').bind("mouseenter", function(e) {
			// QUGY Pour tooltip dans carousel
			if ( $(".associatedProducts").length ) {
				if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
					var ieversion=new Number(RegExp.$1) 
						var stillheight = $("#associatedProducts").height();
						$(".associatedProducts .jcarousel-container").css("height",(stillheight-10)+"px");
				}
				$(".associatedProducts").addClass('hover');
			}
			//
			$(this).parent().css("z-index",2500);
			$(this).parent().parent().css("z-index",2500);
			$(this).parent().children('.tooltipinfo').show();
			
			
			if($(this).hasClass("color")){
				var haut = ("-"+($(this).parent().children('.tooltipinfo').height()-20));
			}
			else
			{
				var haut = ("-"+($(this).parent().children('.tooltipinfo').height()));
			}		
			
			$(this).parent().children('.tooltipinfo').css("top",(haut)+"px");
			
			if($(this).parent().hasClass("tooltipContainer")){
				pWidth = $(this).parent().width()
				tWidth = $(this).parent().children('.tooltipinfo').width()
				$(this).parent().children('.tooltipinfo').css("left", -((tWidth - pWidth)/2)+"px");
				if ($(this).parent().parent().attr('tagName')=="TH")
					{$(this).parent().children('.tooltipinfo').css("left", "0px");}
			}
		})
		.bind("mouseout",function(){
			// QUGY Pour tooltip dans carousel
			if ( $(".associatedProducts").length ) {
			$(".associatedProducts").removeClass('hover');
			}
			//END
			$('.tooltipinfo').hide();
			$(this).parent().css("z-index",0)
			$(this).parent().parent().css("z-index",0);
		});
    }





	
jQuery(document).ready(function() {
	adapttooltip()	
});
