!function(e){woodmartThemeModule.$document.on("wdShopPageInit",function(){woodmartThemeModule.sortByWidget()}),woodmartThemeModule.sortByWidget=function(){var o;woodmartThemeModule.$body.hasClass("woodmart-ajax-shop-on")&&void 0!==e.fn.pjax&&((o=e(".woocommerce-ordering")).on("change","select.orderby",function(){var o=e(this).closest("form");o.find('[name="_pjax"]').remove(),e.pjax({container:".main-page-wrapper",timeout:woodmart_settings.pjax_timeout,url:"?"+o.serialize(),scrollTo:!1,renderCallback:function(e,o,t){woodmartThemeModule.removeDuplicatedStylesFromHTML(o,function(o){e.html(o),t(),woodmartThemeModule.$document.trigger("wdShopPageInit"),woodmartThemeModule.$document.trigger("wood-images-loaded")})}})}),o.on("submit",function(o){o.preventDefault(o)}))},e(document).ready(function(){woodmartThemeModule.sortByWidget()}),window.addEventListener("popstate",function(){woodmartThemeModule.sortByWidget()})}(jQuery);