jQuery(function(e){"use strict";function n(){if(r.is(":visible")){var n=a.width();c.each(function(){var o=e(this),t=o.parent();t.removeClass("nav-open-left"),o.offset().left+o.outerWidth()>n&&t.addClass("nav-open-left")})}}function o(e){e&&e.preventDefault(),h.removeClass("head-search-expanded"),s.focus()}function t(e){e&&e.preventDefault(),h.addClass("head-search-expanded").find("input").focus()}function i(){return h.hasClass("head-search-expanded")}var a=e(window),s=e("body"),r=e(".nav"),c=r.find("ul"),d=e(".navigation-main"),f=e("#mobilemenu");d.each(function(){e(this).clone().removeAttr("id").removeClass().appendTo(f.find("ul"))}),f.find("li").removeAttr("id"),f.mmenu({offCanvas:{position:"top",zposition:"front"},autoHeight:!0,navbars:[{position:"top",content:["prev","title","close"]}]}),n();var u;a.on("resize",function(){clearTimeout(u),u=setTimeout(function(){n()},350)});var l=e(".head-search-trigger"),h=e(".head-search-form");l.on("click",t),e(document).on("keydown",function(e){e=e||window.e,27===e.keyCode&&i()&&o(e)}),s.on("click",function(e){i()&&o()}).find(".head-search-form, .head-search-trigger").on("click",function(e){e.stopPropagation()}),s.fitVids(),a.on("load",function(){e(".row-isotope").isotope()})});