   /**
    * @author Cedric Michaux (Lbi) :: cedric.michaux@lbigroup.be
    */
		
	


    var idExpr = /([-a-z0-9_]+)_container/i;

    (function($) {

        $(function() {
				   
		 
			/*
            jQuery("div:not(.hide) > .jcarousel.horizontal").jcarousel({
                vertical: false,
                scroll: 1
            });

            jQuery("div:not(.hide) > .jcarousel.vertical").jcarousel({
                vertical: true,
                scroll: 1
            });
			
            jQuery(".trigger.toggleBox").each(function() {
                $(this).bind("click", toggleBox)
            })
*/
            /*$(".slider.range").slider({
                range: true,
                min: 0,
                max: 10000,
                values: [2000, 5000],
                slide: slideEvent
            });*/

			
			/*
            $(".trigger.overlay").overlay();
*/
            $(".trigger[rel=#associatedProducts]").bind("click", function() {
                setTimeout(function(){
					$("#associatedProducts > .jcarousel.horizontal").jcarousel({
	                    vertical: false,
	                    scroll: 1
	                });
				}, 20);
				
            });

            if ($(".zoomin").length > 0)
                $(".zoomin").zoomin({
                    images: {
                        zoom: "/design/twyford/images/zoomIn/zoomin_zoomIcon.gif",
                        print: "/design/twyford/images/zoomIn/zoomin_printIcon.gif"
                    }
                });
	
			
	
	
			// JS for Tooltip	(zoomin)	TRANSFERE DANS L'HTML (QUGY)
			/* $('.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();
			});
			*/
			
			// non zoomin
			/* Affichage du tooltip - paramètres d'affichage */
			jQuery('.tooltipinfo').hide();
			
			jQuery('.tooltip').bind("mouseenter", function(e) {
					$(this).parent().css("z-index",60);		
					$(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()+10));
					}		
					
					$(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");
					}
				})
				.bind("mouseout",function(){
					$('.tooltipinfo').hide();
					$(this).parent().css("z-index",50)
				});
				
				jQuery('.tooltip_link').bind("mouseenter", function(e) {
						$(this).parent().css("z-index",60);		
						$(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");
						}
					})
					.bind("mouseout",function(){
						$('.tooltipinfo').hide();
						$(this).parent().css("z-index",50)
					});				
				
        })


    })(jQuery);


