/* * jquery mmenu v5.3.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 n(){e[t].glbl||(r={$wndw:e(window),$html:e("html"),$body:e("body")},a={},i={},l={},e.each([a,i,l],function(e,n){n.add=function(e){e=e.split(" ");for(var t=0,s=e.length;s>t;t++)n[e[t]]=n.mm(e[t])}}),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"),l.mm=function(e){return e+".mm"},l.add("transitionend webkittransitionend mousedown mouseup touchstart touchmove touchend click keydown"),e[t]._c=a,e[t]._d=i,e[t]._e=l,e[t].glbl=r)}var t="mmenu",s="5.3.0";if(!e[t]){e[t]=function(e,n,t){this.$menu=e,this._api=["bind","init","update","setselected","getinstance","openpanel","closepanel","closeallpanels"],this.opts=n,this.conf=t,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[t].version=s,e[t].addons={},e[t].uniqueid=0,e[t].defaults={extensions:[],navbar:{title:"menu",titlelink:"panel"},onclick:{setselected:!0},slidingsubmenus:!0},e[t].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[t].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(e){var n=e.parent();if(n.hasclass(a.vertical)){var t=n.parents("."+a.subopened);if(t.length)return this.openpanel(t.first());n.addclass(a.opened)}else{if(e.hasclass(a.current))return;var s=this.$menu.children("."+a.panel),i=s.filter("."+a.current);s.removeclass(a.highest).removeclass(a.current).not(e).not(i).not("."+a.vertical).addclass(a.hidden),e.hasclass(a.opened)?e.nextall("."+a.opened).addclass(a.highest).removeclass(a.opened).removeclass(a.subopened):(e.addclass(a.highest),i.addclass(a.subopened)),e.removeclass(a.hidden).addclass(a.current),settimeout(function(){e.removeclass(a.subopened).addclass(a.opened)},this.conf.openinginterval)}this.trigger("openpanel",e)},closepanel:function(e){var n=e.parent();n.hasclass(a.vertical)&&(n.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),n=e.first();this.$menu.children("."+a.panel).not(n).removeclass(a.subopened).removeclass(a.opened).removeclass(a.current).removeclass(a.highest).addclass(a.hidden),this.openpanel(n)},togglepanel:function(e){var n=e.parent();n.hasclass(a.vertical)&&this[n.hasclass(a.opened)?"closepanel":"openpanel"](e)},getinstance:function(){return this},bind:function(e,n){this.cbck[e]=this.cbck[e]||[],this.cbck[e].push(n)},trigger:function(){var e=this,n=array.prototype.slice.call(arguments),t=n.shift();if(this.cbck[t])for(var s=0,a=this.cbck[t].length;a>s;s++)this.cbck[t][s].apply(e,n)},_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 n=[a.menu];this.opts.slidingsubmenus||n.push(a.vertical),this.opts.extensions=this.opts.extensions.length?"mm-"+this.opts.extensions.join(" mm-"):"",this.opts.extensions&&n.push(this.opts.extensions),this.$menu.addclass(n.join(" "))},_initpanels:function(n){var t=this,s=this.__findaddback(n,"ul, ol");this.__refactorclass(s,this.conf.classnames.inset,"inset").addclass(a.nolistview+" "+a.nopanel),s.not("."+a.nolistview).addclass(a.listview);var l=this.__findaddback(n,"."+a.listview).children();this.__refactorclass(l,this.conf.classnames.selected,"selected"),this.__refactorclass(l,this.conf.classnames.divider,"divider"),this.__refactorclass(l,this.conf.classnames.spacer,"spacer"),this.__refactorclass(this.__findaddback(n,"."+this.conf.classnames.panel),this.conf.classnames.panel,"panel");var r=e(),d=n.add(n.find("."+a.panel)).add(this.__findaddback(n,"."+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 n=e(this),s=n;n.is("ul, ol")?(n.wrap('
'),s=n.parent()):s.addclass(a.panel);var i=n.attr("id");n.removeattr("id"),s.attr("id",i||t.__getuniqueid()),n.hasclass(a.vertical)&&(n.removeclass(t.conf.classnames.vertical),s.add(s.parent()).addclass(a.vertical)),r=r.add(s)});var o=e("."+a.panel,this.$menu);r.each(function(){var n=e(this),s=n.parent(),l=s.children("a, span").first();if(s.is("."+a.menu)||(s.data(i.sub,n),n.data(i.parent,s)),!s.children("."+a.next).length&&s.parent().is("."+a.listview)){var r=n.attr("id"),d=e('').insertbefore(l);l.is("span")&&d.addclass(a.fullsubopen)}if(!n.children("."+a.navbar).length&&!s.hasclass(a.vertical)){if(s.parent().is("."+a.listview))var s=s.closest("."+a.panel);else var l=s.closest("."+a.panel).find('a[href="#'+n.attr("id")+'"]').first(),s=l.closest("."+a.panel);var o=e('');if(s.length){var r=s.attr("id");switch(t.opts.navbar.titlelink){case"anchor":_url=l.attr("href");break;case"panel":case"parent":_url="#"+r;break;case"none":default:_url=!1}o.append('').append('"+l.text()+"").prependto(n),n.addclass(a.hasnavbar)}else t.opts.navbar.title&&(o.append(''+t.opts.navbar.title+"").prependto(n),n.addclass(a.hasnavbar))}});var c=this.__findaddback(n,"."+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 h=o.filter("."+a.opened);return h.length||(h=r.first()),h.addclass(a.opened).last().addclass(a.current),r.not("."+a.vertical).not(h.last()).addclass(a.hidden).end().appendto(this.$menu),r},_initanchors:function(){var n=this;r.$body.on(l.click+"-oncanvas","a[href]",function(s){var i=e(this),l=!1,d=n.$menu.find(i).length;for(var o in e[t].addons)if(l=e[t].addons[o].clickanchor.call(n,i,d))break;if(!l&&d){var c=i.attr("href");if(c.length>1&&"#"==c.slice(0,1)){var h=e(c,n.$menu);h.is("."+a.panel)&&(l=!0,n[i.parent().hasclass(a.vertical)?"togglepanel":"openpanel"](h))}}if(l&&s.preventdefault(),!l&&d&&i.is("."+a.listview+" > li > a")&&!i.is('[rel="external"]')&&!i.is('[target="_blank"]')){n.__valueorfn(n.opts.onclick.setselected,i)&&n.setselected(e(s.target).parent());var u=n.__valueorfn(n.opts.onclick.preventdefault,i,"#"==c.slice(0,1));u&&s.preventdefault(),n.__valueorfn(n.opts.onclick.blockui,i,!u)&&r.$html.addclass(a.blocking),n.__valueorfn(n.opts.onclick.close,i,u)&&n.close()}})},_initaddons:function(){for(var n in e[t].addons)e[t].addons[n].add.call(this),e[t].addons[n].add=function(){};for(var n in e[t].addons)e[t].addons[n].setup.call(this)},__api:function(){var n=this,t={};return e.each(this._api,function(){var e=this;t[e]=function(){var s=n[e].apply(n,arguments);return"undefined"==typeof s?t:s}}),t},__valueorfn:function(e,n,t){return"function"==typeof e?e.call(n[0]):"undefined"==typeof e&&"undefined"!=typeof t?t:e},__refactorclass:function(e,n,t){return e.filter("."+n).removeclass(n).addclass(a[t])},__findaddback:function(e,n){return e.find(n).add(e.filter(n))},__filterlistitems:function(e){return e.not("."+a.divider).not("."+a.hidden)},__transitionend:function(e,n,t){var s=!1,a=function(){s||n.call(e[0]),s=!0};e.one(l.transitionend,a),e.one(l.webkittransitionend,a),settimeout(a,1.1*t)},__getuniqueid:function(){return a.mm(e[t].uniqueid++)}},e.fn[t]=function(s,a){return n(),s=e.extend(!0,{},e[t].defaults,s),a=e.extend(!0,{},e[t].configuration,a),this.each(function(){var n=e(this);if(!n.data(t)){var i=new e[t](n,s,a);n.data(t,i.__api())}})},e[t].support={touch:"ontouchstart"in window||navigator.msmaxtouchpoints};var a,i,l,r}}(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('