function loaded(){myScroll=new IScroll("#wrapper",{mouseWheel:!0,click:!0})}function bindScroll(){$(window).scroll(function(){$(window).scrollTop()==$(document).height()-$(window).height()&&(isTrue?$(".loading").hide():$(".loading").show(),timer=setTimeout(function(){pageNum=parseInt($("#isPage").val())+1;LoadShare()},800))})}function OnMore(){pageNum=parseInt($("#isPage").val())+1;LoadShare()}function LoadShare(){$.ajax({type:"post",url:"/Home/GetIndexSearch",data:"pageSize="+pageSize+"&pageNum="+pageNum+"&_="+Math.random(),success:function(n){n.msg=="1"&&(isTrue=!0,$(".w-more").text("亲，已经到底部了哟~"),$("#go_a").removeAttr("onclick"));$.each(n.msg,function(n,t){htmlData='<li class="w-goodsList-item"><div class="w-goods w-goods-ing"><div class="w-goods-pic"><a target=_self href="'+t.detailUrl+'"><img  alt=""  src="'+t.ProductImage+'"> <\/a><\/div><div class ="w-goods-info""><p class="w-goods-title f-txtabb"><a href="'+t.detailUrl+'">(第'+t.Period+"期)"+t.ProductName+'<\/a><\/p><p class="w-goods-price">总需：'+t.TotalCount+'人次<\/p><div class="w-progressBar"><p class="w-progressBar-wrap"> <span style="width:'+t.Percent+'%;" class="w-progressBar-bar"><\/span> <\/p><ul class="txt"><li class="txt-l"><p><b>'+t.JoinCount+'<\/b>已参与<\/p><\/li><li class="txt-r"><p>还剩<b class="txt-blue">'+t.Surplus+"<\/b><\/p><\/li><\/ul><\/div><\/div><\/div><\/li>";$("#ul-alre").append(htmlData);$("#isPage").val(pageNum)})}})}function ReImgSize(n){var t,i;typeof n=="undefined"?$(".pimg").each(function(n,t){if(n>0){var i=$(".pimg").eq(0).height(),r=$(".pimg").eq(0).closest("li").height();$(t).height(i);$(t).closest("li").height(r)}}):(t=$(".pimg").eq(0).height(),t>0?($(n).height(t),i=$(".pimg").eq(0).closest("li").height(),$(n).closest("li").height(i)):$(".pimg").each(function(n,t){if(n>0){var i=$(".pimg").eq(0).height(),r=$(".pimg").eq(0).closest("li").height();$(t).height(i);$(t).closest("li").height(r)}}))}var pageNum=1,pageSize=16,timer,t=n=0,count,myScroll,isTrue;window.addEventListener("DOMContentLoaded",loaded,!0);$(function(){var n;loaded();$(".categor-shade-wrap").css("display","none");$("#m-category-btn").click(function(){var n=$(window).height()-85,t=$(".pb-category-tab ul li").length,i=31*t;n>i&&$(".pb-category-tab ul").css("height","100%");$(".categor-shade-wrap").css("display","block")});$(".categor-shade-wrap").click(function(){$(".categor-shade-wrap").css("display","none")});n=document.getElementById("position").getElementsByTagName("li");try{window.mySwipe=new Swipe(document.getElementById("slider"),{startSlide:0,speed:400,auto:3e3,continuous:!0,disableScroll:!1,stopPropagation:!1,callback:function(t){for(var i=n.length;i--;)n[i].className=" ";n[t].className="on"}});n=document.getElementById("position").getElementsByTagName("li")}catch(t){}$(".pb-category-tab ul li").mouseover(function(){$(this).addClass("cur")}).mouseout(function(){$(this).removeClass("cur")});LoadShare()});isTrue=!1