Загрузка');$('.categories-home-products').empty().append(loading);if(typeof list_id !== "undefined"){var prepare_url = '/search/?query=&home_list='+list_id+' .product-list';}else{var prepare_url = address+'?pshow='+pshow+sorting+' .product-list';}setTimeout(function(){$('.categories-home-products').load( prepare_url , { random: "1" },function(){$('.categories-home-products .product-list').removeClass('table lthumbs thumbs').addClass('thumbs');$(this).find('.loading').parent().remove();if( typeof list_id === "undefined" ){$(this).append('
');}$('.categories-home-products').removeAttr('style');$('body').find('.product-list img').retina();});},500);});$(".cat-item").eq(0).trigger('click');});$(window).load(function(){var wrap = $(window);var wrapper = $('.home-category-wrap');var wrapperTop = wrapper.offset().top;$('.swiper-home-category').on('click',function(){$('body,html').animate({ scrollTop: wrapperTop-50 },300);});wrap.on("scroll", function(e) {if (wrap.scrollTop() > (wrapperTop - 56)) {wrapper.addClass("fixed");if ($(this).scrollTop() > (wrapperTop - 200 + wrapper.outerHeight())){wrapper.addClass('hide');}else{wrapper.removeClass('hide');}} else {if(wrapper.hasClass('fixed')){var m = $('.swiper-home-category').detach();wrapper.removeClass("fixed").prepend(m);}}});});