"use strict";function render(){requestAnimationFrame(render),mainvisual.renderer.render(mainvisual.world)}function resetAll(){$.each(PIXI.utils.TextureCache,function(e,i){-1==mainvisual.imageList.indexOf(e)&&this.baseTexture.destroy(!0)})}function popup(){0itempage.itemAreaEnd?$html.addClass("is_itemend"):$html.removeClass("is_itemend"))}};$(document).on("click",".scroll-to-down",function(e){e.preventDefault(),TweenLite.to(window,.6,{scrollTo:{y:windowHeight,autoKill:!1,ease:Power2.easeOut}})});var hover={tweens:[0,0,0,0],animation:{in:{bg:{speed:.3,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]},out:{bg:{speed:.3,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]}},init:function(){var s=this;s.clipPath={origin:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],from:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],enter:[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}],leave:[{x:0,y:0},{x:100,y:0},{x:100,y:0},{x:0,y:0}]},s.$hover=$(".js-hover"),s.$hover.each(function(e,i){var t=$(i).find(".bg");if(2===detector.q){var n="polygon("+s.clipPath.from[0].x+"% "+s.clipPath.from[0].y+"%,"+s.clipPath.from[1].x+"% "+s.clipPath.from[1].y+"%,"+s.clipPath.from[2].x+"% "+s.clipPath.from[2].y+"%,"+s.clipPath.from[3].x+"% "+s.clipPath.from[3].y+"%)";TweenMax.set(t,{webkitClipPath:n})}else{var o=t.width(),a=t.height();TweenLite.set(t,{clip:"rect("+a+"px "+o+"px "+a+"px 0px)"})}})},onMouseEnter:function(e){var i=e.find(".bg"),t=this;if(e.addClass("is_hovered"),2===detector.q){for(var n=0;n<4;n++)t.tweens[n]&&t.tweens[n].kill(),t.tweens[n]=TweenLite.set(t.clipPath.origin[n],{x:t.clipPath.from[n].x,y:t.clipPath.from[n].y});for(n=0;n<4;n++)t.tweens[n]=TweenLite.to(t.clipPath.origin[n],t.animation.in.bg.speed,{x:t.clipPath.enter[n].x,y:t.clipPath.enter[n].y,ease:t.animation.in.bg.ease,delay:t.animation.in.d[n]*t.animation.in.bg.delay,onUpdate:function(){t.onUpdate(i)}})}else TweenLite.to(i,t.animation.in.bg.speed,{clip:"rect(0px "+i.width()+"px "+i.height()+"px 0px)",ease:t.animation.in.bg.ease})},onMouseLeave:function(i){var e=i.find(".bg"),t=this;if(2===detector.q)for(var n=0;n<4;n++)t.tweens[n]=3===n?TweenLite.to(t.clipPath.origin[n],t.animation.out.bg.speed,{x:t.clipPath.leave[n].x,y:t.clipPath.leave[n].y,ease:t.animation.out.bg.ease,delay:t.animation.out.d[n]*t.animation.out.bg.delay,onUpdate:function(){t.onUpdate(e)},onComplete:function(){i.removeClass("is_hovered");for(var e=0;e<4;e++)t.clipPath.origin[e].x=t.clipPath.from[e].x,t.clipPath.origin[e].y=t.clipPath.from[e].y}}):TweenLite.to(t.clipPath.origin[n],t.animation.out.bg.speed,{x:t.clipPath.leave[n].x,y:t.clipPath.leave[n].y,ease:t.animation.out.bg.ease,delay:t.animation.out.d[n]*t.animation.out.bg.delay,onUpdate:function(){t.onUpdate(e)}});else TweenLite.to(e,t.animation.out.bg.speed,{clip:"rect(0px "+e.width()+"px 0px 0px)",ease:t.animation.out.bg.ease,onComplete:function(){i.removeClass("is_hovered"),TweenLite.set(e,{clip:"rect("+e.height()+"px "+e.width()+"px "+e.height()+"px 0px)"})}})},onUpdate:function(e){var i=this,t="polygon("+i.clipPath.origin[0].x+"% "+i.clipPath.origin[0].y+"%,"+i.clipPath.origin[1].x+"% "+i.clipPath.origin[1].y+"%,"+i.clipPath.origin[2].x+"% "+i.clipPath.origin[2].y+"%,"+i.clipPath.origin[3].x+"% "+i.clipPath.origin[3].y+"%)";TweenMax.set(e,{webkitClipPath:t})}};$(document).on({mouseenter:function(){hover.onMouseEnter($(this))},mouseleave:function(){hover.onMouseLeave($(this))}},".js-hover");var hoverbuttons={animation:{in:{speed:.3,ease:Power1.easeInOut},out:{speed:.3,ease:Power1.easeInOut}}};$(document).on({mouseenter:function(){var e=$(this).find(".hr");TweenLite.to(e,hoverbuttons.animation.out.speed,{x:"100%",ease:hoverbuttons.animation.out.ease,onComplete:function(){TweenLite.set(e,{x:"-100%"}),TweenLite.to(e,hoverbuttons.animation.in.speed,{x:"0%",ease:hoverbuttons.animation.in.ease})}})}},".js-hover-buttons"),$(document).on({mouseenter:function(){var e=$(this).find(".bg");TweenLite.set(e,{x:"-100%"}),TweenLite.to(e,hoverbuttons.animation.in.speed,{x:"0%",ease:hoverbuttons.animation.in.ease})},mouseleave:function(){var e=$(this).find(".bg");TweenLite.to(e,hoverbuttons.animation.out.speed,{x:"100%",ease:hoverbuttons.animation.out.ease})}},".js-slider-hover-right,.js-slider-hover-left");var itempage={zoomFlag:!1,animation:{in:{bg:{speed:.5,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]},out:{bg:{speed:.5,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]}},clipPath:{origin:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],from:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],enter:[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}],leave:[{x:0,y:0},{x:100,y:0},{x:100,y:0},{x:0,y:0}]},init:function(){"item"===page.name?($html.addClass("is_item"),this.itemAreaEnd=$(".section-item-info").offset().top+windowHeight,$(".js-zoom").append('
'),itempage.loadIframe()):$html.removeClass("is_item")},loadIframe:function(){$(".js-iframe").each(function(e,i){var t=$(i).data("frame-src");$(i).append('')})},onMouseMove:function(e,i){if(!device.mobile()&&!device.tablet()){var t=e.find(".btn-zoom");t.addClass("on"),TweenMax.to(t,.2,{x:i.pageX-e.offset().left,y:i.pageY-e.offset().top})}},onMouseLeave:function(e){device.mobile()||device.tablet()||e.find(".btn-zoom").removeClass("on")},zoomOpen:function(e,i){var t=this;if(!t.zoomFlag){var n=e.data("zoom");$("body").append('
'),$(".zoom-img-body").on("load",function(){if(t.$holder=$(".zoom-img-ol"),t.$holderClip=$(".zoom-img-in"),t.$img=$(".zoom-img-body"),t.contentWidth=t.$img.width(),t.contentHeight=t.$img.height(),t.contentHeight<=windowHeight){var e=t.contentWidth/t.contentHeight;t.$img.height(windowHeight),t.contentHeight=windowHeight,t.$img.width(windowHeight*e),t.contentWidth=windowHeight*e}t.contentWidth,t.contentHeight;if(2===detector.q){for(var i=0;i<4;i++)TweenLite.set(t.clipPath.origin[i],{x:t.clipPath.from[i].x,y:t.clipPath.from[i].y});for(i=0;i<4;i++)TweenLite.to(t.clipPath.origin[i],t.animation.in.bg.speed,{x:t.clipPath.enter[i].x,y:t.clipPath.enter[i].y,ease:t.animation.in.bg.ease,delay:t.animation.in.d[i]*t.animation.in.bg.delay,onUpdate:function(){TweenMax.set(t.$holder,{visibility:"visible"}),t.onUpdate(t.$holderClip)},onComplete:function(){TweenMax.set(t.$holderClip,{clearProps:"webkitClipPath"}),t.onZoomComplete()}})}else TweenMax.set(t.$holder,{visibility:"visible"}),TweenLite.fromTo(t.$holderClip,t.animation.in.bg.speed,{clip:"rect("+windowHeight+"px "+windowWidth+"px "+windowHeight+"px 0px)"},{clip:"rect(0px "+windowWidth+"px "+windowHeight+"px 0px)",ease:t.animation.in.bg.ease,onComplete:function(){TweenMax.set(t.$holderClip,{clearProps:"clip"}),t.onZoomComplete()}})})}},onZoomComplete:function(){var e=this;device.mobile()||device.tablet()||TweenMax.to(e.$img,.5,{x:e.img_x,y:e.img_y,ease:Power1.easeOut}),e.zoomFlag=!0,setTimeout(function(){e.$holder.addClass("is_zoom_opened")},0)},onResize:function(){var e=this;if("item"===page.name&&(this.itemAreaEnd=$(".section-category-theme").offset().top-windowHeight),e.zoomFlag){if(e.zoomFlag=!1,e.$img.width(windowWidth),e.$img.height(""),e.contentWidth=windowWidth,e.contentHeight=e.$img.height(),e.contentHeight<=windowHeight){var i=e.contentWidth/e.contentHeight;e.$img.height(windowHeight),e.contentHeight=windowHeight,e.$img.width(windowHeight*i),e.contentWidth=windowHeight*i}var t=windowWidth-e.contentWidth,n=windowHeight-e.contentHeight;setTimeout(function(){device.mobile()||device.tablet()?(e.img_x=t/2,e.img_y=n/2,TweenMax.set(".zoom-img-in",{scrollTo:{x:-e.img_x,y:-e.img_y}})):(e.img_x=t/2,e.img_y=n/2,TweenMax.set(e.$img,{x:e.img_x,y:e.img_y})),e.zoomFlag=!0},0)}},zoomClose:function(e){var i=this;if(i.zoomFlag)if(i.$holder.removeClass("is_zoom_opened"),2===detector.q)for(var t=0;t<4;t++)TweenLite.to(i.clipPath.origin[t],i.animation.out.bg.speed,{x:i.clipPath.leave[t].x,y:i.clipPath.leave[t].y,ease:i.animation.out.bg.ease,delay:i.animation.out.d[t]*i.animation.out.bg.delay,onUpdate:function(){i.onUpdate(i.$holderClip)},onComplete:function(){i.zoomFlag=!1,$(".zoom-img-ol").remove()}});else TweenLite.fromTo(i.$holderClip,i.animation.out.bg.speed,{clip:"rect(0px "+windowWidth+"px "+windowHeight+"px 0px)"},{clip:"rect(0px "+windowWidth+"px 0px 0px)",ease:i.animation.out.bg.ease,onComplete:function(){i.zoomFlag=!1,$(".zoom-img-ol").remove()}})},onUpdate:function(e){var i=this,t="polygon("+i.clipPath.origin[0].x+"% "+i.clipPath.origin[0].y+"%,"+i.clipPath.origin[1].x+"% "+i.clipPath.origin[1].y+"%,"+i.clipPath.origin[2].x+"% "+i.clipPath.origin[2].y+"%,"+i.clipPath.origin[3].x+"% "+i.clipPath.origin[3].y+"%)";TweenMax.set(e,{webkitClipPath:t})},zoomMove:function(e){var i=this;i.zoomFlag&&(i.img_x=(windowWidth-i.contentWidth)*e.pageX/windowWidth,i.img_y=(windowHeight-i.contentHeight)*(e.pageY-windowTop)/windowHeight,TweenMax.to(i.$img,1,{x:i.img_x,y:i.img_y,ease:Power1.easeOut}))}};$(document).on({click:function(e){e.preventDefault(),itempage.zoomOpen($(this),e)},mousemove:function(e){itempage.onMouseMove($(this),e)},mouseleave:function(){itempage.onMouseLeave($(this))}},".js-zoom"),$(document).on({click:function(e){e.preventDefault(),itempage.zoomClose($(this))},mousemove:function(e){itempage.zoomMove(e)}},".js-zoom-move");var resizeTimer=!1;$(window).on({resize:function(){!1!==resizeTimer&&clearTimeout(resizeTimer),resizeTimer=setTimeout(function(){itempage.onResize()},100)}}),$(function(){itempage.init()});var popupAction={tween:!1,$popup:null,animation:{in:{txt:{speed:.65,delay:.02,delayOffset:.2,ease:Power1.easeOut},bg:{speed:.6,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]},out:{txt:{speed:.45,delay:.02,delayOffset:0,ease:Power1.easeInOut},bg:{speed:.55,delay:.1,ease:Power1.easeInOut},d:[.5,0,0,.5]}},clipPath:{origin:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],from:[{x:0,y:100},{x:100,y:100},{x:100,y:100},{x:0,y:100}],enter:[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}],leave:[{x:0,y:0},{x:100,y:0},{x:100,y:0},{x:0,y:0}]},init:function(){this.opened=!1,this.$popup=$(".popup-ol"),this.$bg=$(".popup-ol, .popup-background"),this.onResize(),is_desktop||(this.animation.in.d=[.25,0,0,.25],this.animation.out.d=[.25,0,0,.25])},onOpenBackground:function(){var e=this;if($("html").addClass("is_popupbg_opened"),2===detector.q){for(var i=0;i<4;i++)TweenLite.set(e.clipPath.origin[i],{x:e.clipPath.from[i].x,y:e.clipPath.from[i].y});for(i=0;i<4;i++)TweenLite.to(e.clipPath.origin[i],e.animation.in.bg.speed,{x:e.clipPath.enter[i].x,y:e.clipPath.enter[i].y,ease:e.animation.in.bg.ease,delay:e.animation.in.d[i]*e.animation.in.bg.delay,onUpdate:function(){e.onUpdate()}})}else TweenLite.to(e.$bg,e.animation.in.bg.speed,{clip:"rect(0px "+windowWidth+"px "+windowHeight+"px 0px)",ease:e.animation.in.bg.ease})},onCloseBackground:function(){var i=this;if(2===detector.q)for(var e=0;e<4;e++)3===e?TweenLite.to(i.clipPath.origin[e],i.animation.out.bg.speed,{x:i.clipPath.leave[e].x,y:i.clipPath.leave[e].y,ease:i.animation.out.bg.ease,delay:i.animation.out.d[e]*i.animation.out.bg.delay,onUpdate:function(){i.onUpdate()},onComplete:function(){i.opened=!1,$("html").removeClass("is_popupbg_opened");for(var e=0;e<4;e++)i.clipPath.origin[e].x=i.clipPath.from[e].x,i.clipPath.origin[e].y=i.clipPath.from[e].y}}):TweenLite.to(i.clipPath.origin[e],i.animation.out.bg.speed,{x:i.clipPath.leave[e].x,y:i.clipPath.leave[e].y,ease:i.animation.out.bg.ease,delay:i.animation.out.d[e]*i.animation.out.bg.delay,onUpdate:function(){i.onUpdate()}});else TweenLite.to(i.$bg,i.animation.out.bg.speed,{clip:"rect(0px "+windowWidth+"px 0px 0px)",ease:i.animation.out.bg.ease,onComplete:function(){i.opened=!1,$("html").removeClass("is_popupbg_opened"),TweenLite.set(i.$bg,{clip:"rect("+windowHeight+"px "+windowWidth+"px "+windowHeight+"px 0px)"})}})},onOpen:function(){var t=this;t.$popup.each(function(e,i){$(i).find(".js-fade-in").each(function(e,i){TweenLite.set(i,{y:60,opacity:0}),TweenLite.to(i,t.animation.in.txt.speed,{y:0,opacity:1,delay:.75,ease:t.animation.in.txt.ease})})})},onClose:function(){var t=this;t.$popup.each(function(e,i){$(i).find(".js-fade-in").each(function(e,i){TweenLite.to(i,2*t.animation.out.txt.speed,{y:-60,opacity:0,ease:t.animation.out.txt.ease})})})},onResize:function(){var e=this;if(2===detector.q){if(e.opened)for(var i=0;i<4;i++)e.clipPath.origin[i].x=e.clipPath.enter[i].x,e.clipPath.origin[i].y=e.clipPath.enter[i].y;else for(i=0;i<4;i++)e.clipPath.origin[i].x=e.clipPath.from[i].x,e.clipPath.origin[i].y=e.clipPath.from[i].y;e.onUpdate()}else e.opened?TweenLite.set(e.$bg,{clip:"rect(0px "+windowWidth+"px "+windowHeight+"px 0px)"}):TweenLite.set(e.$bg,{clip:"rect("+windowHeight+"px "+windowWidth+"px "+windowHeight+"px 0px)"})},onUpdate:function(){var e=this,i="polygon("+e.clipPath.origin[0].x+"% "+e.clipPath.origin[0].y+"%,"+e.clipPath.origin[1].x+"% "+e.clipPath.origin[1].y+"%,"+e.clipPath.origin[2].x+"% "+e.clipPath.origin[2].y+"%,"+e.clipPath.origin[3].x+"% "+e.clipPath.origin[3].y+"%)";TweenMax.set(e.$bg,{webkitClipPath:i})}};$(document).on("click",".popup-mask, .popup-close",function(e){e.preventDefault(),removePopup()}),window.addEventListener("scroll",removePopupTrigger);