!function(){function o(o){var e=localStorage.getItem(o);return"GetInsta_cartList"===o?e&&JSON.parse(e).value.length?JSON.parse(e).value:null:e&&"null"!==e&&null!==e?"number"==typeof e||"textareaVal"===o||"user_account"===o||"token"===o||"end_cursor"===o?e:JSON.parse(e):null}function e(){l=o("popvalue"),$(".pop-cookie").addClass("on"),$(document).on("click","#_pcookie",function(o){$(".pop-cookie").remove(),$("#header,body").removeClass("popyes")}),1==l?($("#header,body").removeClass("popyes"),$(".pop-cookie").remove()):($("#header,body").addClass("popyes"),$(".pop-got").on("click",function(){!function(o,e){if("number"==typeof e||"string"==typeof e)localStorage.setItem(o,e);else if("GetInsta_cartList"===o){var t={value:e,ttl:0};localStorage.setItem(o,JSON.stringify(t))}else localStorage.setItem(o,JSON.stringify(e))}("popvalue",1),$(".pop-cookie").remove(),$("#header,body").removeClass("popyes")}))}function t(){(document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop)>200?s.addClass("show"):s.removeClass("show")}function n(){"ios"===(judgeClient()||"")?$(".itop-ad .android").remove():$(".itop-ad .ios").remove(),$(".itop-ad .close").on("click",function(){$(".itop-ad").remove()});var e=0;e=o("popvalue");(document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop)>$(window).height()/2?($(".itop-ad").addClass("on"),1!=e&&($(".pop-cookie").removeClass("on"),$("#header,body").removeClass("popyes"))):($(".itop-ad").removeClass("on"),1!=e&&($(".pop-cookie").addClass("on"),$("#header,body").addClass("popyes"))),$(".itop-ad .close").on("click",function(){$(".itop-ad").remove()})}var a=$(window).width(),s=$("#totopetc"),l=0;e(),window.addEventListener("scroll",function(){$(".scroll-animation").each(function(o,e){e.getBoundingClientRect().top<.66*window.innerHeight?$(e).addClass("on"):$(e).removeClass("on")}),a<=768&&n()}),a<=768?$("totopetc").remove():($(window).on("scroll",function(o,e){var t;return function(){clearTimeout(t),t=setTimeout(o,e)}}(t,300)),$("#totopetc").off("click").on("click",function(o){o.stopPropagation(),$("body, html").animate({scrollTop:0},800)}),window.addEventListener("scroll",function(){!function(){var o=document.getElementById("header")?document.getElementById("header"):"";wtopHeader=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,$("body").hasClass("scroll-header")&&(wtopHeader>100?o&&o.classList.add("on"):o&&o.classList.remove("on"))}()}))}();