/*! * jQuery meanMenu v2.0.8 * @Copyright (C) 2012-2014 Chris Wharton @ MeanThemes (https://github.com/meanthemes/meanMenu) * */ !function(a){"use strict";a.fn.meanmenu=function(b){var c={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:""};b=a.extend(c,b);var d=window.innerWidth||document.documentElement.clientWidth;return this.each(function(){var i=b.meanMenuTarget,j=b.meanMenuContainer,k=b.meanMenuClose,l=b.meanMenuCloseSize,m=b.meanMenuOpen,a=b.meanRevealPosition,c=b.meanRevealPositionDistance,n=b.meanRevealColour,o=b.meanScreenWidth,p=b.meanNavPush,q=".meanmenu-reveal",r=b.meanShowChildren,s=b.meanExpandableChildren,t=b.meanExpand,u=b.meanContract,v=b.meanRemoveAttrs,w=b.onePage,x=b.meanDisplay,y=b.removeElements,e=!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))&&(e=!0),(navigator.userAgent.match(/MSIE 8/i)||navigator.userAgent.match(/MSIE 7/i))&&jQuery("html").css("overflow-y","scroll");var f="",g=function(){if("center"===a){var b=(window.innerWidth||document.documentElement.clientWidth)/2-22+"px";f="left:"+b+";right:auto;",e?jQuery(".meanmenu-reveal").animate({left:b}):jQuery(".meanmenu-reveal").css("left",b)}},z=!1,A=!1;"right"===a&&(f="right:"+c+";left:auto;"),"left"===a&&(f="left:"+c+";right:auto;"),g();var B="",C=function(){jQuery(B).is(".meanmenu-reveal.meanclose")?B.html(k):B.html(m)},D=function(){jQuery(".mean-bar,.mean-push").remove(),jQuery(j).removeClass("mean-container"),jQuery(i).css("display",x),z=!1,A=!1,jQuery(y).removeClass("mean-remove")},h=function(){if(o>=d){jQuery(y).addClass("mean-remove"),A=!0,jQuery(j).addClass("mean-container"),jQuery(".mean-container").prepend('
');var a=jQuery(i).html();jQuery(".mean-nav").html(a),v&&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(i).before(''),jQuery(".mean-push").css("margin-top",p),jQuery(i).hide(),jQuery(".meanmenu-reveal").show(),jQuery(q).html(m),B=jQuery(q),jQuery(".mean-nav ul").hide(),r?s?(jQuery(".mean-nav ul ul").each(function(){jQuery(this).children().length&&jQuery(this,"li:first").parent().append(''+t+"")}),jQuery(".mean-expand").on("click",function(a){a.preventDefault(),jQuery(this).hasClass("mean-clicked")?(jQuery(this).text(t),jQuery(this).prev("ul").slideUp(300,function(){})):(jQuery(this).text(u),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"),B.removeClass("meanclose"),jQuery(B).click(function(a){a.preventDefault(),!1===z?(B.css("text-align","center"),B.css("text-indent","0"),B.css("font-size",l),jQuery(".mean-nav ul:first").slideDown(),z=!0):(jQuery(".mean-nav ul:first").slideUp(),z=!1),B.toggleClass("meanclose"),C(),jQuery(y).addClass("mean-remove")}),w&&jQuery(".mean-nav ul > li > a:first-child").on("click",function(){jQuery(".mean-nav ul:first").slideUp(),z=!1,jQuery(B).toggleClass("meanclose").html(m)})}else D()};e||jQuery(window).resize(function(){d=window.innerWidth||document.documentElement.clientWidth,D(),o>=d?(h(),g()):D()}),jQuery(window).resize(function(){d=window.innerWidth||document.documentElement.clientWidth,e?(g(),o>=d?!1===A&&h():D()):(D(),o>=d&&(h(),g()))}),h()})}}(jQuery)