!function(i){woodmartThemeModule.$document.on("wdFiltersOpened wdShopPageInit wdPjaxStart",function(){woodmartThemeModule.shopLoader()}),woodmartThemeModule.shopLoader=function(){woodmartThemeModule.$window.off("scroll.loaderVerticalPosition"),woodmartThemeModule.$window.on("scroll.loaderVerticalPosition",function(){var o,e,d=i('.products[data-source="main_loop"], .wd-portfolio-holder[data-source="main_loop"]'),t=d.parent().find(".wd-sticky-loader");d.length<1||(e=woodmartThemeModule.$window.height()/2,o=woodmartThemeModule.$window.scrollTop(),d=(e=d.offset().top-e+45)+d.height()-170,o<e?(t.addClass("wd-position-top"),t.removeClass("wd-position-stick")):d<o?(t.addClass("wd-position-bottom"),t.removeClass("wd-position-stick")):(t.addClass("wd-position-stick"),t.removeClass("wd-position-top wd-position-bottom")))})},i(document).ready(function(){woodmartThemeModule.shopLoader()})}(jQuery);