/**
* jQuery meanMenu v2.0.2
* Copyright (C) 2012-2013 Chris Wharton (themes@meanthemes.com)
*
* 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){e.fn.meanmenu=function(n){var a={meanMenuTarget:jQuery(this),meanMenuContainer:".menu-wrapper",meanMenuCloseSize:"18px",meanRevealPosition:"right",meanRevealPositionDistance:"0",meanRevealColour:"",meanRevealHoverColour:"",meanScreenWidth:"991",meanNavPush:"",meanShowChildren:!0,meanExpandableChildren:!0,meanExpand:"",meanContract:"",meanRemoveAttrs:!1};n=e.extend(a,n);return currentWidth=window.innerWidth||document.documentElement.clientWidth,this.each(function(){var e=n.meanMenuTarget,a=n.meanMenuContainer,t=(n.meanReveal,n.meanMenuClose),r=n.meanMenuCloseSize,i=n.meanMenuOpen,u=n.meanRevealPosition,m=n.meanRevealPositionDistance,l=n.meanRevealColour,o=(n.meanRevealHoverColour,n.meanScreenWidth),s=n.meanNavPush,v=".meanmenu-reveal";meanShowChildren=n.meanShowChildren,meanExpandableChildren=n.meanExpandableChildren;var c=n.meanExpand,h=n.meanContract,d=n.meanRemoveAttrs;if(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))var y=!0;function j(){if("center"==u){var e=(window.innerWidth||document.documentElement.clientWidth)/2-22+"px";meanRevealPos="left:"+e+";right:auto;",y?jQuery(".meanmenu-reveal").animate({left:e}):jQuery(".meanmenu-reveal").css("left",e)}}function Q(){jQuery(".mean-bar,.mean-push").remove(),jQuery(a).removeClass("mean-container"),jQuery(e).show(),menuOn=!1,meanMenuExist=!1}function f(){if(currentWidth<=o){meanMenuExist=!0,jQuery(a).addClass("mean-container"),jQuery(".mean-container").prepend('
');var n=jQuery(e).html();jQuery(".mean-nav").html(n),d&&jQuery("nav.mean-nav *").each(function(){jQuery(this).removeAttr("class"),jQuery(this).removeAttr("id")}),jQuery(e).before(''),jQuery(".mean-push").css("margin-top",s),jQuery(e).hide(),jQuery(".meanmenu-reveal").show(),jQuery(v).html(i),$navreveal=jQuery(v),jQuery(".mean-nav ul").hide(),meanShowChildren?meanExpandableChildren?(jQuery(".mean-nav ul ul").each(function(){jQuery(this).children().length&&jQuery(this,"li:first").parent().append(''+c+"")}),jQuery(".mean-expand").on("click",function(e){e.preventDefault(),jQuery(this).hasClass("mean-clicked")?(jQuery(this).text(c),jQuery(this).prev("ul").slideUp(300,function(){})):(jQuery(this).text(h),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"),$navreveal.removeClass("meanclose"),jQuery($navreveal).click(function(e){e.preventDefault(),0==menuOn?($navreveal.css("text-align","center"),$navreveal.css("text-indent","0"),$navreveal.css("font-size",r),jQuery(".mean-nav ul:first").slideDown(),menuOn=!0):(jQuery(".mean-nav ul:first").slideUp(),menuOn=!1),$navreveal.toggleClass("meanclose"),jQuery($navreveal).is(".meanmenu-reveal.meanclose")?$navreveal.html(t):$navreveal.html(i)})}else Q()}(navigator.userAgent.match(/MSIE 8/i)||navigator.userAgent.match(/MSIE 7/i))&&jQuery("html").css("overflow-y","scroll"),menuOn=!1,meanMenuExist=!1,"right"==u&&(meanRevealPos="right:"+m+";left:auto;"),"left"==u&&(meanRevealPos="left:"+m+";right:auto;"),j(),meanStyles="background:"+l+";color:"+l+";"+meanRevealPos,y||jQuery(window).resize(function(){currentWidth=window.innerWidth||document.documentElement.clientWidth,currentWidth,Q(),currentWidth<=o?(f(),j()):Q()}),window.onorientationchange=function(){j(),currentWidth=window.innerWidth||document.documentElement.clientWidth,currentWidth>=o&&Q(),currentWidth<=o&&0==meanMenuExist&&f()},f()})}}(jQuery);