File: /var/www/ippmt.kauko.lt/wp-content/plugins/ocean-elementor-widgets/assets/js/search-icon.min.js
!function(a){var b=function(a,b){var c=a;if(c.find(".oew-search-icon-dropdown").length){var d=c.find(".oew-dropdown-link"),e=c.find(".oew-search-dropdown");d.click(function(a){return e.fadeToggle("fast"),$j(this).parent().toggleClass("active"),e.find("input.field").focus(),!1}),$j(document).on("click",function(a){$j(a.target).closest(".oew-search-dropdown").length||(d.parent().removeClass("active"),e.fadeOut("fast"))})}if(c.find(".oew-search-icon-overlay").length){var f=c.find("a.oew-overlay-link"),g=c.find("a.oew-search-overlay-close"),h=c.find(".oew-search-overlay");f.length&&f.on("click",function(a){a.preventDefault(),h.addClass("active"),h.fadeIn(200),setTimeout(function(){$j("html").css("overflow","hidden")},400)}),g.on("click",function(a){a.preventDefault(),h.removeClass("active"),h.fadeOut(200),setTimeout(function(){$j("html").css("overflow","visible")},400)}),f.on("click",function(){h.find("input").focus()}),h.appendTo("body"),h.find("form").each(function(){var a=$j(this),b=a.find("input");a.find("label");b.val().length&&a.addClass("search-filled"),b.on("keyup blur",function(){b.val().length>0?a.addClass("search-filled"):a.removeClass("search-filled")})})}};a(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/oew-search-icon.default",b)})}(jQuery);