var act_start1=new Date("2018/06/12 09:00:00").getTime()/1000;var act_end1=new Date("2018/06/12 23:59:59").getTime()/1000;var act_star2=new Date("2018/06/12 23:59:59").getTime()/1000;var act_end2=new Date("2018/06/15 23:59:59").getTime()/1000;var now=new Date().getTime()/1000;if(now0&&act_end1-now>=0){setTimeout(function(){$(".pop_up").removeClass("hid").addClass("show");$("body").css("overflow","hidden");},1000);countDown(act_end1-now);}} abortTime(now,act_star2,act_end2);function abortTime(now,act_star2,act_end2){if(now-act_star2>=0&&act_end2-now>=0){setTimeout(function(){$(".pop_up").removeClass("hid").addClass("show");$("body").css("overflow","hidden");},1000);$(".app_Pic").attr("src"," assets/img/activity-pop/App/pop_Onepic.png");$(".table_three").eq(0).addClass("hid");$(".table_three").eq(1).removeClass("hid");countDown(act_end2-now);} if(now-act_end2>0){$(".pop_up").addClass("hid").removeClass("show");$(".Jspop_up").remove();$(".pop_up").remove();$("body").css("overflow","auto");$(".app_pop").addClass("hid");$(".app_pop").remove();$(".app_popUp").remove();}};function countDown(times){var timer=null;timer=setInterval(function(){var day=0,hour=0,minute=0,second=0;if(times>0){day=Math.floor(times/(60*60*24));hour=Math.floor(times/(60*60))-(day*24);minute=Math.floor(times/60)-(day*24*60)-(hour*60);second=Math.floor(times)-(day*24*60*60)-(hour*60*60)-(minute*60);} if(day<=9)day='0'+day;if(hour<=9)hour='0'+hour;if(minute<=9)minute='0'+minute;if(second<=9)second='0'+second;$(".pop_day").text(day);$(".pop_Hour").text(hour);$(".pop_minute").text(minute);$(".pop_second").text(second);times--;if(times<=0){clearInterval(timer);now=new Date().getTime()/1000;startTimer(now,act_start1,act_end1);abortTime(now,act_star2,act_end2);}},1000);} $(".pop_close").click(function(){$(".pop_up").addClass("hid").removeClass("show");$("body").css("overflow","auto");}) $(".app_popContent").click(function(){$(".app_pop").addClass("hid");$("body").css("overflow","auto");}) $(".app_Close").click(function(){$(".app_pop").addClass("hid");$("body").css("overflow","auto");})