function lazyLoad(){var n=priceLoadOffset,t=n+50,i=[],r;priceLoadOffset+=50;setThresh(t-20);$(".pricePlaceholder").slice(n,t).each(function(){var n=$(this);n.html()!=="$0.00"&&i.push(n.data("id"))});r=JSON.stringify({productIds:i});$.ajax({contentType:"application/json; charset=utf-8",datatype:"json",type:"POST",url:detailsListUrls.PriceAPI,data:r,success:function(n){n!==null&&$(".pricePlaceholder").each(function(){var t=$(this);t.html()!=="$0.00"&&t.html(n[t.data("id")])})},error:function(){}});$(".eligibilityPlaceholder").slice(n,t).each(function(){var n=$(this),t,i;n.find(".btn").html()!=="Sign In"&&(t={divisionId:n.data("id"),seasonLeagueId:n.data("season-league")},i=detailsListUrls.EligibilityAPI,$.ajax({url:i,type:"GET",data:t,success:function(t){t!==null&&(n.html(t),$('[data-toggle="tooltip"]').tooltip())},error:function(){}}))});$(".paddingGridImage").slice(n,t).each(function(){var n=$(this),t={productId:n.data("id")},i=detailsListUrls.ProductAPI;$.ajax({url:i,type:"GET",data:t,success:function(t){var i=$('<img class="img-thumbnail search-page-img">');i.attr("src",t.Image);i.attr("alt",t.AltText);n.empty();i.appendTo(n)},error:function(){}})})}function setThresh(n){var t=$(".pricePlaceholder:eq("+n+")"),i=t.offset();if(i!==undefined){var r=i.top,u=t.outerHeight(),f=$(window).height();priceScrollThreshold=r+u-f;$(this).scrollTop()>priceScrollThreshold&&lazyLoad()}else priceScrollThreshold+=1e5}function loadSpinnerForImage(n){var t=new Spinner({lines:8,length:4,width:4,radius:8,color:"#000",speed:1,trail:20,shadow:!1,hwaccel:!1,zIndex:1}).spin(n)}var priceLoadOffset=0,priceScrollThreshold=99999,detailsListUrls;jQuery(document).ready(function(){lazyLoad()});$(window).scroll(function(){var n=$(this).scrollTop();n>priceScrollThreshold&&lazyLoad()});detailsListUrls={PriceAPI:"/api/Price/GetPrices",ProductAPI:"/api/Product",EligibilityAPI:"/api/Eligibility"}