!function(a){woodmartThemeModule.searchFullScreen=function(){var b=a(".wd-search-full-screen");woodmartThemeModule.$body.on("click",".wd-header-search:not(.wd-header-search-mobile) > a",function(b){b.preventDefault(),a(this).parent().find(".wd-search-dropdown").length>0||woodmartThemeModule.$body.hasClass("global-search-dropdown")||woodmartThemeModule.$window.width()<1024||(f()?d():setTimeout(function(){e()},10))}),woodmartThemeModule.$body.on("click",".wd-close-search a, .main-page-wrapper, .header-banner",function(b){!a(b.target).is(".wd-close-search a")&&a(b.target).closest(".wd-search-full-screen").length||f()&&d()});var c=function(a){27===a.keyCode&&(d(),woodmartThemeModule.$body.unbind("keyup",c))},d=function(){woodmartThemeModule.$body.removeClass("wd-search-opened"),b.removeClass("wd-opened")},e=function(){var e,g=a("#wpadminbar"),h=g.length>0?g.outerHeight():0,i=a(".whb-sticked"),j=a(".whb-main-header");i.length>0?e=a(".whb-clone").length>0?i.outerHeight()+h:j.outerHeight()+h:(e=j.outerHeight()+h,woodmartThemeModule.$body.hasClass("header-banner-display")&&(e+=a(".header-banner").outerHeight())),b.css("top",e),woodmartThemeModule.$body.on("keyup",c),woodmartThemeModule.$body.addClass("wd-search-opened"),b.addClass("wd-opened"),setTimeout(function(){b.find('input[type="text"]').focus(),woodmartThemeModule.$window.one("scroll",function(){f()&&d()})},300)},f=function(){return woodmartThemeModule.$body.hasClass("wd-search-opened")}},a(document).ready(function(){woodmartThemeModule.searchFullScreen()})}(jQuery);