/*! * fst-mmenu.js * http://fanseethemes.com/ * * Copyright (c) fanseethemes * * License: GPL * https://www.gnu.org/licenses/gpl-3.0.html */ !function(t){t.fn.fstMmenu=function(n){var e=this;if(0===t(this).length)return console.error("Provide element not found on DOM put the code on Ready function or check the element on fst-mmenu plugin"),this;var s,o="fst-mmenu",i="fst-mmenu-open",c="fst-submenu-toggler",a="fst-mmenu-overlay",l="fst-submenu-open",r="fst-mmenu-first-tabindex",u="fst-mmenu-last-tabindex",d="fst-mmenu-btn-close",f=(s={position:"right",width:350,menuToggler:"fst-mmenu-toggler",closeIcon:'',arrowDownIcon:'',overlay:!0},t.extend({},s,n));function h(){return t("body").hasClass(i)}function p(){h()&&(g(),t("."+f.menuToggler).focus())}function h(){return t("body").hasClass(i)}function m(n){var e=v();n&&jQuery("."+o+" ."+d).focus(),t("."+o).css({[e]:n?"calc( 100% - "+f.width+"px)":"100%"})}function g(n){var e=t("body"),s=h();return m(!s),e.toggleClass(i),s?t("."+a).fadeOut():t("."+a).fadeIn(),!1}function v(){switch(f.position){case"right":return"left";case"left":return"right";case"top":return"bottom";case"bottom":return"top"}}return function(){var n=t(e).clone();!function(n){n.find("ul, li").each(function(n,e){!function(n,e){var s=e.attributes.length?e.attributes:[];s.length&&t.each(s,function(){t(e).removeAttr(this.name)})}(0,e);var s=t(this).has("ul").length;"LI"==e.tagName&&s&&t(">a",this).after('")})}(n);var s,i,a,l='