(()=>{var e;document.addEventListener("DOMContentLoaded",(()=>{let e,t,i,a,n;const o=o=>{e=o.currentTarget,t=e.querySelector("img, div.web-portfolio-image"),a=t.getAttribute("data-from")||1,n=t.getAttribute("data-to")||1.05,gsap.to(t,{duration:1,scale:n}),i=1},s=()=>{i=0,gsap.to(t,{duration:1,scale:a,x:0,y:0})};document.querySelectorAll(".web-image-box:not(.web-no-effect)").forEach((e=>{e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",s)}));const r=t=>{e=t.currentTarget;const i=e.querySelector(".web-image-box-overlay"),a=e.getBoundingClientRect(),n=(a.width/2-t.clientX+a.left)/(a.width/2),o=(a.height/2-t.clientY+a.top)/(a.height/2),s="mouseenter"===t.type;let r="0%",g="0%";Math.abs(n)>Math.abs(o)?r=(n>0?"-10":"10")+r:g=(o>0?"-10":"10")+g,s&&gsap.set(i,{x:r,y:g,display:"flex"}),gsap.to(i,{duration:.25,x:s?"0% !important":r,y:s?"0% !important":g,display:s?"flex":"none",ease:Power1.easeInOut})};document.querySelectorAll(".web-image-box-follow").forEach((e=>{e.addEventListener("mouseenter",r),e.addEventListener("mouseleave",r)}))})),e=jQuery,function(){var t=this;function i(t){var a,n,o,s=e(t);t.gifPlaying||(t.gifPlaying=!0,t.khGifLoaded?(s.addClass("web-gif-playing"),s.find("img").attr("src",s.find("img").attr("data-gif"))):t.khGifLoading||(t.khGifLoading=1,s.addClass("web-gif-loading"),a=s.find("img").attr("data-gif"),n=function(){t.khGifLoaded=1,s.removeClass("web-gif-loading"),t.gifPlaying&&(t.gifPlaying=!1,i(t))},(o=new Image).onload=function(){n()},o.src=a))}function a(t){var i=e(t);t.gifPlaying&&(t.gifPlaying=!1,i.removeClass("web-gif-playing"),i.find("img").attr("src",i.find("img").attr("data-gif-static")))}e(".web-gif").each((function(){var t=e(this);t.append(''+webData.gifIcon+""),t.append('
'),t.find("img").attr("data-gif-static",t.find("img").attr("src"))})),e(".web-gif-hover").on("mouseenter",(function(){e(this).addClass("hover"),i(this)})).on("mouseleave",(function(){e(this).removeClass("hover"),a(this)})),e(".web-gif-click").on("click",(function(){this.gifPlaying?(e(this).removeClass("hover"),a(this)):(e(this).addClass("hover"),i(this))}));var n=e(".web-gif-viewport");n.length&&t.throttleScroll((function(){n.each((function(){var n=t.isInViewport(e(this),1);n[0]?n[1].height/wndH<.7?1===n[0]?i(this):a(this):n[0]>=.7?i(this):a(this):a(this)}))})),e(".web-gif:not(.web-gif-click):not(.web-gif-hover):not(.web-gif-viewport)").each((function(){i(this)}))}()})();