/*! * jQuery meanMenu v2.0.8 * @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu) * */ /* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT * HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR * FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE * OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.COPYRIGHT HOLDERS WILL NOT * BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL * DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Find more information at http://www.meanthemes.com/plugins/meanmenu/ * */ ! function(e) { "use strict"; e.fn.meanmenu = function(n) { var a = { meanMenuTarget: jQuery(this), meanMenuContainer: ".mobile-menu-area", meanMenuClose: "X", meanMenuCloseSize: "18px", meanMenuOpen: "", meanRevealPosition: "right", meanRevealPositionDistance: "0", meanRevealColour: "", meanScreenWidth: "992", meanNavPush: "", meanShowChildren: !0, meanExpandableChildren: !0, meanExpand: "+", meanContract: "-", meanRemoveAttrs: !1, onePage: !1, meanDisplay: "block", removeElements: "" }; n = e.extend(a, n); var t = window.innerWidth || document.documentElement.clientWidth; return this.each(function() { var e = n.meanMenuTarget, a = n.meanMenuContainer, r = n.meanMenuClose, i = n.meanMenuCloseSize, u = n.meanMenuOpen, m = n.meanRevealPosition, s = n.meanRevealPositionDistance, l = n.meanRevealColour, o = n.meanScreenWidth, c = n.meanNavPush, h = ".meanmenu-reveal", v = n.meanShowChildren, d = n.meanExpandableChildren, y = n.meanExpand, j = n.meanContract, Q = n.meanRemoveAttrs, f = n.onePage, g = n.meanDisplay, p = n.removeElements, C = !1; (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/Blackberry/i) || navigator.userAgent.match(/Windows Phone/i)) && (C = !0), (navigator.userAgent.match(/MSIE 8/i) || navigator.userAgent.match(/MSIE 7/i)) && jQuery("html").css("overflow-y", "scroll"); var w = "", x = function() { if ("center" === m) { var e = window.innerWidth || document.documentElement.clientWidth, n = e / 2 - 22 + "px"; w = "left:" + n + ";right:auto;", C ? jQuery(".meanmenu-reveal").animate({ left: n }) : jQuery(".meanmenu-reveal").css("left", n) } }, A = !1, E = !1; "right" === m && (w = "right:" + s + ";left:auto;"), "left" === m && (w = "left:" + s + ";right:auto;"), x(); var M = "", P = function() { jQuery(M).is(".meanmenu-reveal.meanclose") ? M.html(r) : M.html(u) }, W = function() { jQuery(".mean-bar,.mean-push").remove(), jQuery(a).removeClass("mean-container"), jQuery(e).css("display", g), A = !1, E = !1, jQuery(p).removeClass("mean-remove") }, b = function() { var n = "background:" + l + ";color:" + l + ";" + w; if (o >= t) { jQuery(p).addClass("mean-remove"), E = !0, jQuery(a).addClass("mean-container"), jQuery(".mean-container").prepend(''); var r = jQuery(e).html(); jQuery(".mean-nav").html(r), Q && jQuery("nav.mean-nav ul, nav.mean-nav ul *").each(function() { jQuery(this).is(".mean-remove") ? jQuery(this).attr("class", "mean-remove") : jQuery(this).removeAttr("class"), jQuery(this).removeAttr("id") }), jQuery(e).before('
'), jQuery(".mean-push").css("margin-top", c), jQuery(e).hide(), jQuery(".meanmenu-reveal").show(), jQuery(h).html(u), M = jQuery(h), jQuery(".mean-nav ul").hide(), v ? d ? (jQuery(".mean-nav ul ul").each(function() { jQuery(this).children().length && jQuery(this, "li:first").parent().append('' + y + "") }), jQuery(".mean-expand").on("click", function(e) { e.preventDefault(), jQuery(this).hasClass("mean-clicked") ? (jQuery(this).text(y), jQuery(this).prev("ul").slideUp(300, function() {})) : (jQuery(this).text(j), jQuery(this).prev("ul").slideDown(300, function() {})), jQuery(this).toggleClass("mean-clicked") })) : jQuery(".mean-nav ul ul").show() : jQuery(".mean-nav ul ul").hide(), jQuery(".mean-nav ul li").last().addClass("mean-last"), M.removeClass("meanclose"), jQuery(M).click(function(e) { e.preventDefault(), A === !1 ? (M.css("text-align", "center"), M.css("text-indent", "0"), M.css("font-size", i), jQuery(".mean-nav ul:first").slideDown(), A = !0) : (jQuery(".mean-nav ul:first").slideUp(), A = !1), M.toggleClass("meanclose"), P(), jQuery(p).addClass("mean-remove") }), f && jQuery(".mean-nav ul > li > a:first-child").on("click", function() { jQuery(".mean-nav ul:first").slideUp(), A = !1, jQuery(M).toggleClass("meanclose").html(u) }) } else W() }; C || jQuery(window).resize(function() { t = window.innerWidth || document.documentElement.clientWidth, t > o, W(), o >= t ? (b(), x()) : W() }), jQuery(window).resize(function() { t = window.innerWidth || document.documentElement.clientWidth, C ? (x(), o >= t ? E === !1 && b() : W()) : (W(), o >= t && (b(), x())) }), b() }) } }(jQuery);