(function(n){"use strict";n.fn.meanmenu=function(t){var r={meanMenuTarget:jQuery(this),meanMenuContainer:".responsiveNav",meanMenuClose:"X",meanMenuCloseSize:"24px",meanMenuOpen:"<span /><span /><span />",meanRevealPosition:"right",meanRevealPositionDistance:"0",meanRevealColour:"",meanRevealHoverColour:"",meanScreenWidth:"640",meanNavPush:"",meanShowChildren:!0,meanExpandableChildren:!0,meanExpand:"+",meanContract:"-",meanRemoveAttrs:!1,onePage:!1,removeElements:""},t=n.extend(r,t),i=window.innerWidth||document.documentElement.clientWidth;return this.each(function(){function v(){if(c=="center"){var t=window.innerWidth||document.documentElement.clientWidth,n=t/2-22+"px";s="left:"+n+";right:auto;",a?jQuery(".meanmenu-reveal").animate({left:n}):jQuery(".meanmenu-reveal").css("left",n)}}function st(){jQuery(n).is(".meanmenu-reveal.meanclose")?n.html(tt):n.html(h)}function f(){jQuery(".mean-bar,.mean-push").remove(),jQuery(p).removeClass("mean-container"),jQuery(e).show(),r=!1,o=!1,jQuery(l).removeClass("mean-remove")}function y(){if(i<=u){jQuery(l).addClass("mean-remove"),o=!0,jQuery(p).addClass("mean-container"),jQuery(".mean-container").prepend('<div class="mean-bar"><a href="#nav" class="meanmenu-reveal" style="'+nt+'">Show Navigation<\/a><nav class="mean-nav"><\/nav><\/div>');var t=jQuery(e).html();if(jQuery(".mean-nav").html(t),et&&jQuery("nav.mean-nav ul, nav.mean-nav ul *").each(function(){jQuery(this).removeAttr("class"),jQuery(this).removeAttr("id")}),jQuery(e).before('<div class="mean-push" />'),jQuery(".mean-push").css("margin-top",it),jQuery(e).hide(),jQuery(".meanmenu-reveal").show(),jQuery(d).html(h),n=jQuery(d),jQuery(".mean-nav ul").hide(),rt)if(ut){jQuery(".mean-nav ul ul").each(function(){jQuery(this).children().length&&jQuery(this,"li:first").parent().append('<a class="mean-expand" href="#" style="font-size: '+w+'">'+g+"<\/a>")});jQuery(".mean-expand").on("click",function(n){n.preventDefault(),jQuery(this).hasClass("mean-clicked")?(jQuery(this).text(g),jQuery(this).prev("ul").slideUp(300,function(){})):(jQuery(this).text(ft),jQuery(this).prev("ul").slideDown(300,function(){})),jQuery(this).toggleClass("mean-clicked")})}else jQuery(".mean-nav ul ul").show();else jQuery(".mean-nav ul ul").hide();if(jQuery(".mean-nav ul li").last().addClass("mean-last"),n.removeClass("meanclose"),jQuery(n).click(function(t){t.preventDefault(),r==!1?(n.css("text-align","center"),n.css("text-indent","0"),n.css("font-size",w),jQuery(".mean-nav ul:first").slideDown(),r=!0):(jQuery(".mean-nav ul:first").slideUp(),r=!1),n.toggleClass("meanclose"),st(),jQuery(l).addClass("mean-remove")}),ot)jQuery(".mean-nav ul > li > a:first-child").on("click",function(){jQuery(".mean-nav ul:first").slideUp(),r=!1,jQuery(n).toggleClass("meanclose").html(h)})}else f()}var e=t.meanMenuTarget,p=t.meanMenuContainer,ht=t.meanReveal,tt=t.meanMenuClose,w=t.meanMenuCloseSize,h=t.meanMenuOpen,c=t.meanRevealPosition,b=t.meanRevealPositionDistance,k=t.meanRevealColour,ct=t.meanRevealHoverColour,u=t.meanScreenWidth,it=t.meanNavPush,d=".meanmenu-reveal",rt=t.meanShowChildren,ut=t.meanExpandableChildren,g=t.meanExpand,ft=t.meanContract,et=t.meanRemoveAttrs,ot=t.onePage,l=t.removeElements,a,r,o,s,nt,n;(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))&&(a=!0),(navigator.userAgent.match(/MSIE 8/i)||navigator.userAgent.match(/MSIE 7/i))&&jQuery("html").css("overflow-y","scroll"),r=!1,o=!1,c=="right"&&(s="right:"+b+";left:auto;"),c=="left"&&(s="left:"+b+";right:auto;"),v(),nt="background:"+k+";color:"+k+";"+s,n="",a||jQuery(window).resize(function(){i=window.innerWidth||document.documentElement.clientWidth,i>u?f():f(),i<=u?(y(),v()):f()}),window.onorientationchange=function(){v(),i=window.innerWidth||document.documentElement.clientWidth,i>=u&&f(),i<=u&&o==!1&&y()},y()})}})(jQuery)