if (location.href.match("/sitecore/shell/") == null) {
    /**
    * @author Cedric Michaux (Lbi) :: cedric.michaux@lbigroup.be
    */

    jQuery.noConflict();
    var idExpr = /([-a-z0-9_]+)_container/i;

    (function($) {

        $(function() {


			adjustmosaic();
            $(".topContent .mainMenu li:not(.sublevel) a span").customFont({
                'textAlgVert': 10
            });
            $(".topContent .mainMenu li.sublevel a span").customFont({
                'textAlgVert': 10,
                'styleContainer': {
                    "paddingRight": 38
                }
            });

            $("select.styled, .styled select").selectbox();

	        

            $("div:not(.hide) > .jcarousel.horizontal").jcarousel({
                vertical: false,
                scroll: 1
            });

            $("div:not(.hide) > .jcarousel.vertical").jcarousel({
                vertical: true,
                scroll: 1
            });

            $(".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/allia/images/zoomIn/zoomin_zoomIcon.gif",
                        print: "/design/allia/images/zoomIn/zoomin_printIcon.gif"
                    }
                });
	
			
	
	
			// JS for Tooltip	(zoomin)	
			$('.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
			$('.tooltipinfo').hide();
			$('.tooltip')
				.bind("mouseenter", function(e) {
					$(this).parent().css("z-index",60)			 
					$(this).parent().children('.tooltipinfo').show();
					var haut = ("-"+($(this).parent().children('.tooltipinfo').height()-8));
					$(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)
				});
			// End Tooltip
			
			adjustHeight();
	        $(window).resize(function() {
	            adjustHeight();
	        });
			
        })


    })(jQuery);


}
