').appendTo(document.body),l=n.clone().appendTo(c),d=e("#ddsearchcontainer"),r=e("#search-terms"),u=e("#search-label"),e(window).on("scroll",function(){clearTimeout(t),t=setTimeout(function(){var t=e(this).scrollTop();0===t&&p.hasClass("collapseheader")?p.removeClass("collapseheader"):p.hasClass("collapseheader")||p.addClass("collapseheader")},20)}),s.each(function(){var t=e(this),a=t.parent();a.data("$subul",t),x=x.add(a);var o=a.find("a:eq(0)");a.data("measures",{offsetx:a.offset().left,width:a.outerWidth(),subwidth:t.outerWidth()}),a.on(v,function(){var a=e(this);t.css("zIndex",b++);var o=a.data("measures");o.offsetx+o.subwidth>e(window).width()?t.css("left",-o.subwidth+o.width):t.css("left",0)}),o.on("click",function(e){e.preventDefault()})}),e(window).on("resize",function(){clearTimeout(a),a=setTimeout(function(){T.getmeasures()},50)}),i.on(g,function(e){c.css("top",o.outerHeight()+"px"),p.toggleClass("openddmobilemenu"),p.hasClass("openddmobilemenu")&&c.css("zIndex",w++),e.stopPropagation()}),c.on("touchstart",function(e){e.stopPropagation()}),c.on("click",function(e){p.removeClass("openddmobilemenu"),e.stopPropagation()}),l=c.find(">ul"),h=l.find("ul"),l.on("click",function(){h.css("display","none"),P.removeClass("active")}),h.each(function(){var t=e(this),a=t.parent().find("a:eq(0)");a.data("$subul",t).addClass("header"),a.append(y),a.on(g,function(a){var o=e(this),n=t.css("display");P&&P.get(0)!=o.get(0)&&(P.removeClass("active"),P.data("$subul").slideUp()),t.slideToggle(),"none"==n?(o.addClass("active"),P=o):o.removeClass("active"),a.stopPropagation(),a.preventDefault()})}),u.on(g,function(e){d.css("top",o.outerHeight()+"px"),p.toggleClass("opensearch"),p.hasClass("opensearch")?(d.css("zIndex",w++),p.removeClass("openfullscreenmenu"),r.focus()):r.blur(),e.preventDefault(),e.stopPropagation()}),r.on(g,function(e){e.stopPropagation()}),e(document).on(g+" keyup",function(e){"keyup"==e.type&&e.keyCode!=C||(p.removeClass("openddmobilemenu"),p.removeClass("opensearch"),r.blur())}),f.addListener(function(e){e.matches||p.removeClass("openddmobilemenu")})}};return T}(jQuery);