function GlobalNav(){this.slideDur=200,this.desktop=$("#global-nav"),this.touch=$(".small-device"),this.drawerContent=$(".subnav-links-container, .suggested-container"),this.margin=30,this.isExpanded=!1,this.device=null,this.viewportWidth=$(window).width(),this.init()}mindtools="undefined"==typeof mindtools?{}:mindtools,mindtools.global=void 0===mindtools.global?{}:mindtools.global,"undefined"==typeof $&&"undefined"!=typeof jQuery&&($=jQuery),GlobalNav.prototype=function(n){var t={init:function(){for(var t=this,e=n("#global-nav ul li").has(".subnav-container"),i=n(".small-device ul li").has(".subnav-container"),a=[],s=0,o=e.length;s<o;s++)a.push(e[s]);for(s=0,o=i.length;s<o;s++)a.push(i[s]);for(s=0,o=a.length;s<o;s++)e.find("> a").on("click",function(n){n.preventDefault()}),n(a[s]).unbind("click").on("click",function(e){var i,a,s=n(this),o=(e.target.id,n(e.target)),d=s.find("ul"),r=(s.find("span.mt-arrow-down"),d.outerHeight());a=Modernizr.mq("only screen and (max-width: 61.250em)")?r:t.margin+r,t.disableCurrent(s),s.hasClass("expanded")?(o.is("a")||o.parent().is("a"))&&(s.removeClass("expanded"),Modernizr.mq("only screen and (min-width:61.313em)")&&t.indicatorIconChangeState(s),t.pullContentUp(d),t.isExpanded=!1):(i=n("ul .expanded"),s.siblings().hasClass("expanded")?(i.removeClass("expanded"),i.find("ul").fadeOut("fast"),t.animation="switch",s.addClass("expanded"),Modernizr.mq("only screen and (min-width:61.313em)")&&t.indicatorIconChangeState(s),d.show(),t.isExpanded=!0,t.pushContentDown(s,r,a)):(t.animation="slide",s.addClass("expanded"),Modernizr.mq("only screen and (min-width:61.313em)")&&t.indicatorIconChangeState(s),d.slideDown(t.slideDur),t.isExpanded=!0,t.pushContentDown(s,r,a)))})},onResize:function(){Modernizr.mq("screen and (min-width: 61.313em)")&&"desktop"!=this.device&&(this.device="desktop"),Modernizr.mq("screen and (max-width:61.250em)")&&"smartphone"!=this.device&&(this.device="smartphone"),n(window).width()!=this.viewportWidth&&1==this.isExpanded&&"smartphone"!=this.device&&this.closeDrawer(n("li.expanded ul"))},pushContentDown:function(n,t,e){var i=this,a=i.slideDur,s=(n=n).closest("nav");return s.stop().animate({marginBottom:e+1},a,function(){"global-nav"==s.attr("id")&&i.drawerContent.stop().animate({opacity:"100"},1500)}),!0},pullContentUp:function(n){var t=this,e=t.slideDur,i=n;return Modernizr.mq("screen and (max-width: 61.250em)")?t.drawerContent.stop().animate({opacity:"0"},e,function(){i.slideUp(e),t.touch.stop().animate({marginBottom:0},e)}):t.drawerContent.stop().animate({opacity:"0"},e,function(){i.slideUp(e),t.desktop.stop().animate({marginBottom:t.margin},e),t.touch.stop().animate({marginBottom:0},e)}),!0},resetAllMargins:function(){var n=this;setTimeout(function(){n.touch.stop().css("margin-bottom","0"),n.desktop.stop().css("margin-bottom",n.margin)},100)},closeDrawer:function(t){var e=n(".expanded");e.removeClass("expanded"),e.find("ul").slideUp(this.slideDur),this.indicatorIconChangeState(e),this.pullContentUp(t),this.resetAllMargins(),this.disableCurrent(n("li.current")),this.isExpanded=!1,width=n(window).width()},disableCurrent:function(n){var t=n.siblings("li.current"),e="disabled";n.hasClass("current")||t.hasClass(e)?n.removeClass(e):t.addClass(e);n.hasClass("expanded")&&n.parent().children().removeClass(e)},indicatorIconChangeState:function(t){var e=n((t=t).find("> a span"));"global-nav"==t.closest("nav").attr("id")&&(e.hasClass("mt-arrow-down")?e.removeClass("mt-arrow-down").addClass("mt-arrow-up"):e.removeClass("mt-arrow-up").addClass("mt-arrow-down"),t.siblings().find("> a span").attr("class","mt-arrow-down"))}};return t}($||jQuery),mindtools.global.nav=new GlobalNav;