/* * jQuery mmenu v5.4.0 * @requires jQuery 1.7.0 or later * * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen * www.frebsite.nl * * Licensed under the MIT license: * http://en.wikipedia.org/wiki/MIT_License */ ! function(e) { function t() { e[n].glbl || (l = { $wndw: e(window), $html: e("html"), $body: e("body") }, a = {}, i = {}, r = {}, e.each([a, i, r], function(e, t) { t.add = function(e) { e = e.split(" "); for (var n = 0, s = e.length; s > n; n++) t[e[n]] = t.mm(e[n]) } }), a.mm = function(e) { return "mm-" + e }, a.add("wrapper menu panel nopanel current highest opened subopened navbar hasnavbar title btn prev next listview nolistview inset vertical selected divider spacer hidden fullsubopen"), a.umm = function(e) { return "mm-" == e.slice(0, 3) && (e = e.slice(3)), e }, i.mm = function(e) { return "mm-" + e }, i.add("parent sub"), r.mm = function(e) { return e + ".mm" }, r.add("transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend click keydown"), e[n]._c = a, e[n]._d = i, e[n]._e = r, e[n].glbl = l) } var n = "mmenu", s = "5.4.0"; if (!e[n]) { e[n] = function(e, t, n) { this.$menu = e, this._api = ["bind", "init", "update", "setSelected", "getInstance", "openPanel", "closePanel", "closeAllPanels"], this.opts = t, this.conf = n, this.vars = {}, this.cbck = {}, "function" == typeof this.___deprecated && this.___deprecated(), this._initMenu(), this._initAnchors(); var s = this.$menu.children(this.conf.panelNodetype); return this._initAddons(), this.init(s), "function" == typeof this.___debug && this.___debug(), this }, e[n].version = s, e[n].addons = {}, e[n].uniqueId = 0, e[n].defaults = { extensions: [], navbar: { add: !0, title: "Menu", titleLink: "panel" }, onClick: { setSelected: !0 }, slidingSubmenus: !0 }, e[n].configuration = { classNames: { divider: "Divider", inset: "Inset", panel: "Panel", selected: "Selected", spacer: "Spacer", vertical: "Vertical" }, clone: !1, openingInterval: 25, panelNodetype: "ul, ol, div", transitionDuration: 400 }, e[n].prototype = { init: function(e) { e = e.not("." + a.nopanel), e = this._initPanels(e), this.trigger("init", e), this.trigger("update") }, update: function() { this.trigger("update") }, setSelected: function(e) { this.$menu.find("." + a.listview).children().removeClass(a.selected), e.addClass(a.selected), this.trigger("setSelected", e) }, openPanel: function(t) { var s = t.parent(); if (s.hasClass(a.vertical)) { var i = s.parents("." + a.subopened); if (i.length) return this.openPanel(i.first()); s.addClass(a.opened) } else { if (t.hasClass(a.current)) return; var r = this.$menu.children("." + a.panel), l = r.filter("." + a.current); r.removeClass(a.highest).removeClass(a.current).not(t).not(l).not("." + a.vertical).addClass(a.hidden), e[n].support.csstransitions || l.addClass(a.hidden), t.hasClass(a.opened) ? t.nextAll("." + a.opened).addClass(a.highest).removeClass(a.opened).removeClass(a.subopened) : (t.addClass(a.highest), l.addClass(a.subopened)), t.removeClass(a.hidden).addClass(a.current), setTimeout(function() { t.removeClass(a.subopened).addClass(a.opened) }, this.conf.openingInterval) } this.trigger("openPanel", t) }, closePanel: function(e) { var t = e.parent(); t.hasClass(a.vertical) && (t.removeClass(a.opened), this.trigger("closePanel", e)) }, closeAllPanels: function() { this.$menu.find("." + a.listview).children().removeClass(a.selected).filter("." + a.vertical).removeClass(a.opened); var e = this.$menu.children("." + a.panel), t = e.first(); this.$menu.children("." + a.panel).not(t).removeClass(a.subopened).removeClass(a.opened).removeClass(a.current).removeClass(a.highest).addClass(a.hidden), this.openPanel(t) }, togglePanel: function(e) { var t = e.parent(); t.hasClass(a.vertical) && this[t.hasClass(a.opened) ? "closePanel" : "openPanel"](e) }, getInstance: function() { return this }, bind: function(e, t) { this.cbck[e] = this.cbck[e] || [], this.cbck[e].push(t) }, trigger: function() { var e = this, t = Array.prototype.slice.call(arguments), n = t.shift(); if (this.cbck[n]) for (var s = 0, a = this.cbck[n].length; a > s; s++) this.cbck[n][s].apply(e, t) }, _initMenu: function() { this.opts.offCanvas && this.conf.clone && (this.$menu = this.$menu.clone(!0), this.$menu.add(this.$menu.find("[id]")).filter("[id]").each(function() { e(this).attr("id", a.mm(e(this).attr("id"))) })), this.$menu.contents().each(function() { 3 == e(this)[0].nodeType && e(this).remove() }), this.$menu.parent().addClass(a.wrapper); var t = [a.menu]; this.opts.slidingSubmenus || t.push(a.vertical), this.opts.extensions = this.opts.extensions.length ? "mm-" + this.opts.extensions.join(" mm-") : "", this.opts.extensions && t.push(this.opts.extensions), this.$menu.addClass(t.join(" ")) }, _initPanels: function(t) { var n = this, s = this.__findAddBack(t, "ul, ol"); this.__refactorClass(s, this.conf.classNames.inset, "inset").addClass(a.nolistview + " " + a.nopanel), s.not("." + a.nolistview).addClass(a.listview); var r = this.__findAddBack(t, "." + a.listview).children(); this.__refactorClass(r, this.conf.classNames.selected, "selected"), this.__refactorClass(r, this.conf.classNames.divider, "divider"), this.__refactorClass(r, this.conf.classNames.spacer, "spacer"), this.__refactorClass(this.__findAddBack(t, "." + this.conf.classNames.panel), this.conf.classNames.panel, "panel"); var l = e(), d = t.add(t.find("." + a.panel)).add(this.__findAddBack(t, "." + a.listview).children().children(this.conf.panelNodetype)).not("." + a.nopanel); this.__refactorClass(d, this.conf.classNames.vertical, "vertical"), this.opts.slidingSubmenus || d.addClass(a.vertical), d.each(function() { var t = e(this), s = t; t.is("ul, ol") ? (t.wrap('
'), s = t.parent()) : s.addClass(a.panel); var i = t.attr("id"); t.removeAttr("id"), s.attr("id", i || n.__getUniqueId()), t.hasClass(a.vertical) && (t.removeClass(n.conf.classNames.vertical), s.add(s.parent()).addClass(a.vertical)), l = l.add(s) }); var o = e("." + a.panel, this.$menu); l.each(function() { var t = e(this), s = t.parent(), r = s.children("a, span").first(); if (s.is("." + a.menu) || (s.data(i.sub, t), t.data(i.parent, s)), !s.children("." + a.next).length && s.parent().is("." + a.listview)) { var l = t.attr("id"), d = e('').insertBefore(r); r.is("span") && d.addClass(a.fullsubopen) } if (!t.children("." + a.navbar).length && !s.hasClass(a.vertical)) { if (s.parent().is("." + a.listview)) var s = s.closest("." + a.panel); else var r = s.closest("." + a.panel).find('a[href="#' + t.attr("id") + '"]').first(), s = r.closest("." + a.panel); var o = e(''); if (s.length) { var l = s.attr("id"); switch (n.opts.navbar.titleLink) { case "anchor": _url = r.attr("href"); break; case "panel": case "parent": _url = "#" + l; break; case "none": default: _url = !1 } o.append('').append(e('").text(r.text())).prependTo(t), n.opts.navbar.add && t.addClass(a.hasnavbar) } else n.opts.navbar.title && (o.append('' + n.opts.navbar.title + "").prependTo(t), n.opts.navbar.add && t.addClass(a.hasnavbar)) } }); var c = this.__findAddBack(t, "." + a.listview).children("." + a.selected).removeClass(a.selected).last().addClass(a.selected); c.add(c.parentsUntil("." + a.menu, "li")).filter("." + a.vertical).addClass(a.opened).end().not("." + a.vertical).each(function() { e(this).parentsUntil("." + a.menu, "." + a.panel).not("." + a.vertical).first().addClass(a.opened).parentsUntil("." + a.menu, "." + a.panel).not("." + a.vertical).first().addClass(a.opened).addClass(a.subopened) }), c.children("." + a.panel).not("." + a.vertical).addClass(a.opened).parentsUntil("." + a.menu, "." + a.panel).not("." + a.vertical).first().addClass(a.opened).addClass(a.subopened); var u = o.filter("." + a.opened); return u.length || (u = l.first()), u.addClass(a.opened).last().addClass(a.current), l.not("." + a.vertical).not(u.last()).addClass(a.hidden).end().appendTo(this.$menu), l }, _initAnchors: function() { var t = this; l.$body.on(r.click + "-oncanvas", "a[href]", function(s) { var i = e(this), r = !1, d = t.$menu.find(i).length; for (var o in e[n].addons) if (r = e[n].addons[o].clickAnchor.call(t, i, d)) break; if (!r && d) { var c = i.attr("href"); if (c.length > 1 && "#" == c.slice(0, 1)) try { var u = e(c, t.$menu); u.is("." + a.panel) && (r = !0, t[i.parent().hasClass(a.vertical) ? "togglePanel" : "openPanel"](u)) } catch (h) {} } if (r && s.preventDefault(), !r && d && i.is("." + a.listview + " > li > a") && !i.is('[rel="external"]') && !i.is('[target="_blank"]')) { t.__valueOrFn(t.opts.onClick.setSelected, i) && t.setSelected(e(s.target).parent()); var p = t.__valueOrFn(t.opts.onClick.preventDefault, i, "#" == c.slice(0, 1)); p && s.preventDefault(), t.__valueOrFn(t.opts.onClick.blockUI, i, !p) && l.$html.addClass(a.blocking), t.__valueOrFn(t.opts.onClick.close, i, p) && t.close() } }) }, _initAddons: function() { for (var t in e[n].addons) e[n].addons[t].add.call(this), e[n].addons[t].add = function() {}; for (var t in e[n].addons) e[n].addons[t].setup.call(this) }, __api: function() { var t = this, n = {}; return e.each(this._api, function() { var e = this; n[e] = function() { var s = t[e].apply(t, arguments); return "undefined" == typeof s ? n : s } }), n }, __valueOrFn: function(e, t, n) { return "function" == typeof e ? e.call(t[0]) : "undefined" == typeof e && "undefined" != typeof n ? n : e }, __refactorClass: function(e, t, n) { return e.filter("." + t).removeClass(t).addClass(a[n]) }, __findAddBack: function(e, t) { return e.find(t).add(e.filter(t)) }, __filterListItems: function(e) { return e.not("." + a.divider).not("." + a.hidden) }, __transitionend: function(e, t, n) { var s = !1, a = function() { s || t.call(e[0]), s = !0 }; e.one(r.transitionend, a), e.one(r.webkitTransitionEnd, a), setTimeout(a, 1.1 * n) }, __getUniqueId: function() { return a.mm(e[n].uniqueId++) } }, e.fn[n] = function(s, a) { return t(), s = e.extend(!0, {}, e[n].defaults, s), a = e.extend(!0, {}, e[n].configuration, a), this.each(function() { var t = e(this); if (!t.data(n)) { var i = new e[n](t, s, a); t.data(n, i.__api()) } }) }, e[n].support = { touch: "ontouchstart" in window || navigator.msMaxTouchPoints, csstransitions: function() { if ("undefined" != typeof Modernizr) return Modernizr.csstransitions; var e = document.body || document.documentElement, t = e.style, n = "transition"; if ("string" == typeof t[n]) return !0; var s = ["Moz", "webkit", "Webkit", "Khtml", "O", "ms"]; n = n.charAt(0).toUpperCase() + n.substr(1); for (var a = 0; a < s.length; a++) if ("string" == typeof t[s[a] + n]) return !0; return !1 }() }; var a, i, r, l } }(jQuery); /* * jQuery mmenu offCanvas addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ ! function(t) { var e = "mmenu", o = "offCanvas"; t[e].addons[o] = { setup: function() { if (this.opts[o]) { var n = this.opts[o], i = this.conf[o]; a = t[e].glbl, this._api = t.merge(this._api, ["open", "close", "setPage"]), ("top" == n.position || "bottom" == n.position) && (n.zposition = "front"), "string" != typeof i.pageSelector && (i.pageSelector = "> " + i.pageNodetype), a.$allMenus = (a.$allMenus || t()).add(this.$menu), this.vars.opened = !1; var r = [s.offcanvas]; "left" != n.position && r.push(s.mm(n.position)), "back" != n.zposition && r.push(s.mm(n.zposition)), this.$menu.addClass(r.join(" ")).parent().removeClass(s.wrapper), this.setPage(a.$page), this._initBlocker(), this["_initWindow_" + o](), this.$menu[i.menuInjectMethod + "To"](i.menuWrapperSelector) } }, add: function() { s = t[e]._c, n = t[e]._d, i = t[e]._e, s.add("offcanvas slideout modal background opening blocker page"), n.add("style"), i.add("resize") }, clickAnchor: function(t) { if (!this.opts[o]) return !1; var e = this.$menu.attr("id"); if (e && e.length && (this.conf.clone && (e = s.umm(e)), t.is('[href="#' + e + '"]'))) return this.open(), !0; if (a.$page) { var e = a.$page.first().attr("id"); return e && e.length && t.is('[href="#' + e + '"]') ? (this.close(), !0) : !1 } } }, t[e].defaults[o] = { position: "left", zposition: "back", modal: !1, moveBackground: !0 }, t[e].configuration[o] = { pageNodetype: "div", pageSelector: null, wrapPageIfNeeded: !0, menuWrapperSelector: "body", menuInjectMethod: "prepend" }, t[e].prototype.open = function() { if (!this.vars.opened) { var t = this; this._openSetup(), setTimeout(function() { t._openFinish() }, this.conf.openingInterval), this.trigger("open") } }, t[e].prototype._openSetup = function() { var e = this; this.closeAllOthers(), a.$page.each(function() { t(this).data(n.style, t(this).attr("style") || "") }), a.$wndw.trigger(i.resize + "-offcanvas", [!0]); var r = [s.opened]; this.opts[o].modal && r.push(s.modal), this.opts[o].moveBackground && r.push(s.background), "left" != this.opts[o].position && r.push(s.mm(this.opts[o].position)), "back" != this.opts[o].zposition && r.push(s.mm(this.opts[o].zposition)), this.opts.extensions && r.push(this.opts.extensions), a.$html.addClass(r.join(" ")), setTimeout(function() { e.vars.opened = !0 }, this.conf.openingInterval), this.$menu.addClass(s.current + " " + s.opened) }, t[e].prototype._openFinish = function() { var t = this; this.__transitionend(a.$page.first(), function() { t.trigger("opened") }, this.conf.transitionDuration), a.$html.addClass(s.opening), this.trigger("opening") }, t[e].prototype.close = function() { if (this.vars.opened) { var e = this; this.__transitionend(a.$page.first(), function() { e.$menu.removeClass(s.current).removeClass(s.opened), a.$html.removeClass(s.opened).removeClass(s.modal).removeClass(s.background).removeClass(s.mm(e.opts[o].position)).removeClass(s.mm(e.opts[o].zposition)), e.opts.extensions && a.$html.removeClass(e.opts.extensions), a.$page.each(function() { t(this).attr("style", t(this).data(n.style)) }), e.vars.opened = !1, e.trigger("closed") }, this.conf.transitionDuration), a.$html.removeClass(s.opening), this.trigger("close"), this.trigger("closing") } }, t[e].prototype.closeAllOthers = function() { a.$allMenus.not(this.$menu).each(function() { var o = t(this).data(e); o && o.close && o.close() }) }, t[e].prototype.setPage = function(e) { var n = this, i = this.conf[o]; e && e.length || (e = a.$body.find(i.pageSelector), e.length > 1 && i.wrapPageIfNeeded && (e = e.wrapAll("<" + this.conf[o].pageNodetype + " />").parent())), e.each(function() { t(this).attr("id", t(this).attr("id") || n.__getUniqueId()) }), e.addClass(s.page + " " + s.slideout), a.$page = e, this.trigger("setPage", e) }, t[e].prototype["_initWindow_" + o] = function() { a.$wndw.off(i.keydown + "-offcanvas").on(i.keydown + "-offcanvas", function(t) { return a.$html.hasClass(s.opened) && 9 == t.keyCode ? (t.preventDefault(), !1) : void 0 }); var t = 0; a.$wndw.off(i.resize + "-offcanvas").on(i.resize + "-offcanvas", function(e, o) { if (1 == a.$page.length && (o || a.$html.hasClass(s.opened))) { var n = a.$wndw.height(); (o || n != t) && (t = n, a.$page.css("minHeight", n)) } }) }, t[e].prototype._initBlocker = function() { var e = this; a.$blck || (a.$blck = t('')), a.$blck.appendTo(a.$body).off(i.touchstart + "-offcanvas " + i.touchmove + "-offcanvas").on(i.touchstart + "-offcanvas " + i.touchmove + "-offcanvas", function(t) { t.preventDefault(), t.stopPropagation(), a.$blck.trigger(i.mousedown + "-offcanvas") }).off(i.mousedown + "-offcanvas").on(i.mousedown + "-offcanvas", function(t) { t.preventDefault(), a.$html.hasClass(s.modal) || (e.closeAllOthers(), e.close()) }) }; var s, n, i, a }(jQuery); /* * jQuery mmenu autoHeight addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ ! function(t) { var e = "mmenu", i = "autoHeight"; t[e].addons[i] = { setup: function() { if (this.opts.offCanvas) { switch (this.opts.offCanvas.position) { case "left": case "right": return } var n = this, o = this.opts[i]; if (this.conf[i], h = t[e].glbl, "boolean" == typeof o && o && (o = { height: "auto" }), "object" != typeof o && (o = {}), o = this.opts[i] = t.extend(!0, {}, t[e].defaults[i], o), "auto" == o.height) { this.$menu.addClass(s.autoheight); var u = function(t) { var e = this.$menu.children("." + s.current); _top = parseInt(e.css("top"), 10) || 0, _bot = parseInt(e.css("bottom"), 10) || 0, this.$menu.addClass(s.measureheight), t = t || this.$menu.children("." + s.current), t.is("." + s.vertical) && (t = t.parents("." + s.panel).not("." + s.vertical).first()), this.$menu.height(t.outerHeight() + _top + _bot).removeClass(s.measureheight) }; this.bind("update", u), this.bind("openPanel", u), this.bind("closePanel", u), this.bind("open", u), h.$wndw.off(a.resize + "-autoheight").on(a.resize + "-autoheight", function() { u.call(n) }) } } }, add: function() { s = t[e]._c, n = t[e]._d, a = t[e]._e, s.add("autoheight measureheight"), a.add("resize") }, clickAnchor: function() {} }, t[e].defaults[i] = { height: "default" }; var s, n, a, h }(jQuery); /* * jQuery mmenu backButton addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ ! function(o) { var t = "mmenu", n = "backButton"; o[t].addons[n] = { setup: function() { if (this.opts.offCanvas) { var i = this, e = this.opts[n]; if (this.conf[n], a = o[t].glbl, "boolean" == typeof e && (e = { close: e }), "object" != typeof e && (e = {}), e = o.extend(!0, {}, o[t].defaults[n], e), e.close) { var c = "#" + i.$menu.attr("id"); this.bind("opened", function() { location.hash != c && history.pushState(null, document.title, c) }), o(window).on("popstate", function(o) { a.$html.hasClass(s.opened) ? (o.stopPropagation(), i.close()) : location.hash == c && (o.stopPropagation(), i.open()) }) } } }, add: function() { return window.history && window.history.pushState ? (s = o[t]._c, i = o[t]._d, e = o[t]._e, void 0) : (o[t].addons[n].setup = function() {}, void 0) }, clickAnchor: function() {} }, o[t].defaults[n] = { close: !1 }; var s, i, e, a }(jQuery); /* * jQuery mmenu counters addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ ! function(t) { var n = "mmenu", e = "counters"; t[n].addons[e] = { setup: function() { var c = this, o = this.opts[e]; this.conf[e], s = t[n].glbl, "boolean" == typeof o && (o = { add: o, update: o }), "object" != typeof o && (o = {}), o = this.opts[e] = t.extend(!0, {}, t[n].defaults[e], o), this.bind("init", function(n) { this.__refactorClass(t("em", n), this.conf.classNames[e].counter, "counter") }), o.add && this.bind("init", function(n) { n.each(function() { var n = t(this).data(a.parent); n && (n.children("em." + i.counter).length || n.prepend(t(''))) }) }), o.update && this.bind("update", function() { this.$menu.find("." + i.panel).each(function() { var n = t(this), e = n.data(a.parent); if (e) { var s = e.children("em." + i.counter); s.length && (n = n.children("." + i.listview), n.length && s.html(c.__filterListItems(n.children()).length)) } }) }) }, add: function() { i = t[n]._c, a = t[n]._d, c = t[n]._e, i.add("counter search noresultsmsg") }, clickAnchor: function() {} }, t[n].defaults[e] = { add: !1, update: !1 }, t[n].configuration.classNames[e] = { counter: "Counter" }; var i, a, c, s }(jQuery); /* * jQuery mmenu dividers addon * mmenu.frebsite.nl * * Copyright (c) Fred Heusschen */ ! function(i) { var e = "mmenu", s = "dividers"; i[e].addons[s] = { setup: function() { var n = this, a = this.opts[s]; if (this.conf[s], l = i[e].glbl, "boolean" == typeof a && (a = { add: a, fixed: a }), "object" != typeof a && (a = {}), a = this.opts[s] = i.extend(!0, {}, i[e].defaults[s], a), this.bind("init", function() { this.__refactorClass(i("li", this.$menu), this.conf.classNames[s].collapsed, "collapsed") }), a.add && this.bind("init", function(e) { switch (a.addTo) { case "panels": var s = e; break; default: var s = i(a.addTo, this.$menu).filter("." + d.panel) } i("." + d.divider, s).remove(), s.find("." + d.listview).not("." + d.vertical).each(function() { var e = ""; n.__filterListItems(i(this).children()).each(function() { var s = i.trim(i(this).children("a, span").text()).slice(0, 1).toLowerCase(); s != e && s.length && (e = s, i('