var lang = "", arrLangTxt = ""; $(function () { initMaster(); $("#hdrNav").superfish({ hoverClass: "over", autoArrows: !1, dropShadows: !1, disableHI: !0, delay: 300, animation: { height: "show" }, speed: 0 }) }); function initMaster() { var a = $("body"); a.removeClass("no-js"); lang = a.attr("class"); arrLangTxt = lang == "fr" ? ["Pr\u00e9c\u00e9dent", "Suivant", "Fermer cette fen\u00eatre"] : ["Previous", "Next", "Close this window"] } function bindHomeGallery() { $("ul.thumbs li span").opacityrollover({ mouseOutOpacity: 0, mouseOverOpacity: 1, fadeSpeed: "fast", exemptionSelector: ".selected" }); gallery = $("#accGalThumbs").galleriffic({ onSlideChange: function (a, b) { this.find("ul.thumbs li span").eq(a).fadeTo("fast", 0).end().eq(b).fadeTo("fast", 1) } }) } function bindPhotos(a) { $(function () { $(a).colorbox({ rel: "gallery", prev: arrLangTxt[0], next: arrLangTxt[1], close: arrLangTxt[2], onLoad: function () { if (!$("#cboxMainTtl").hasClass("loaded")) { var a = $("#prdTtl").html(); $("#cboxContent").append('<h3 id="cboxMainTtl">' + a + "</h3>"); $("#cboxMainTtl").addClass("loaded") } } }) }) } (function (a) { a.fn.superfish = function (d) { var c = a.fn.superfish, b = c.c, j = a(['<span class="', b.arrowClass, '"> &#187;</span>'].join("")), g = function () { var b = a(this), c = h(b); clearTimeout(c.sfTimer); b.showSuperfishUl().siblings().hideSuperfishUl() }, i = function () { var b = a(this), d = h(b), e = c.op; clearTimeout(d.sfTimer); d.sfTimer = setTimeout(function () { e.retainPath = a.inArray(b[0], e.$path) > -1; b.hideSuperfishUl(); e.$path.length && b.parents(["li.", e.hoverClass].join("")).length < 1 && g.call(e.$path) }, e.delay) }, h = function (a) { a = a.parents(["ul.", b.menuClass, ":first"].join(""))[0]; c.op = c.o[a.serial]; return a }; return this.each(function () { var k = this.serial = c.o.length, f = a.extend({}, c.defaults, d); f.$path = a("li." + f.pathClass, this).slice(0, f.pathLevels).each(function () { a(this).addClass([f.hoverClass, b.bcClass].join(" ")).filter("li:has(ul)").removeClass(f.pathClass) }); c.o[k] = c.op = f; a("li", this)[a.fn.hoverIntent && !f.disableHI ? "hoverIntent" : "hover"](g, i).each(function () { f.autoArrows && a(">a:first-child", this).addClass(b.anchorClass).append(j.clone()) }).not("." + b.bcClass).hideSuperfishUl(); var e = a("a", this); e.each(function (a) { var b = e.eq(a).parents("li"); e.eq(a).focus(function () { g.call(b) }).blur(function () { i.call(b) }) }); f.onInit.call(this) }).each(function () { var d = [b.menuClass]; c.op.dropShadows && !(a.browser.msie && a.browser.version < 7) && d.push(b.shadowClass); a(this).addClass(d.join(" ")) }) }; var b = a.fn.superfish; b.o = []; b.op = {}; b.IE7fix = function () { var d = b.op; a.browser.msie && a.browser.version > 6 && d.dropShadows && d.animation.opacity != void 0 && this.toggleClass(b.c.shadowClass + "-off") }; b.c = { bcClass: "sf-breadcrumb", menuClass: "sf-js-enabled", anchorClass: "sf-with-ul", arrowClass: "sf-sub-indicator", shadowClass: "sf-shadow" }; b.defaults = { hoverClass: "sfHover", pathClass: "overideThisToUse", pathLevels: 1, delay: 800, animation: { opacity: "show" }, speed: "normal", autoArrows: !0, dropShadows: !0, disableHI: !1, onInit: function () { }, onBeforeShow: function () { }, onShow: function () { }, onHide: function () { } }; a.fn.extend({ hideSuperfishUl: function () { var d = b.op, c = d.retainPath === !0 ? d.$path : ""; d.retainPath = !1; c = a(["li.", d.hoverClass].join(""), this).add(this).not(c).removeClass(d.hoverClass).find(">ul").hide().css("visibility", "hidden"); d.onHide.call(c); return this }, showSuperfishUl: function () { var a = b.op, c = this.addClass(a.hoverClass).find(">ul:hidden").css("visibility", "visible"); b.IE7fix.call(c); a.onBeforeShow.call(c); c.animate(a.animation, a.speed, function () { b.IE7fix.call(c); a.onShow.call(c) }); return this } }) })(jQuery);
