logoLight(); if ($(".who-we-are-section").length) { gsap.set($(".who-we-are-section").find(".who-we-are-video-tint"), { autoAlpha: 0, }); var paraImageLrg = $(".parallax-image-group.offset-right img").outerHeight( true ); var paraImageSml = $(".parallax-image-group.narrow img").outerHeight(true); gsap.set(".parallax-image-group.offset-right", { y: 0.5 * paraImageLrg }); gsap.set(".parallax-image-group.narrow", { y: -3 * paraImageSml }); gsap.set(".large-text-image-overlay, .xlarge-text", { perspective: 200 }); $(document).ready(function () { var teamTl = gsap.timeline({ scrollTrigger: { trigger: ".who-we-are-section", start: "-2px top", end: "bottom top", scrub: 1, pin: false, anticipatepin: 1, onEnter: logoLight, onLeave: logoDark, onEnterBack: logoLight, onLeaveBack: logoDark, }, }); var parallaxPin = gsap.timeline({ scrollTrigger: { trigger: ".parallax-image-section", start: "top top", end: "150% top", scrub: 1, pin: true, anticipatepin: 1, onEnter: () => { $(".menu-button-icon-line").addClass("white"); }, onEnterBack: () => { $(".menu-button-icon-line").addClass("white"); }, onLeave: () => { $(".menu-button-icon-line").removeClass("white"); }, onLeaveBack: () => { $(".menu-button-icon-line").removeClass("white"); }, }, }); var parallaxMove = gsap.timeline({ scrollTrigger: { trigger: ".parallax-image-text-wrapper", start: "top bottom", end: "250% top", scrub: 1, pin: false, anticipatepin: 1, }, }); /*var parallaxFade = gsap.timeline({ scrollTrigger: { trigger: ".parallax-image-text-wrapper", start: "top bottom", end: "top top", scrub: 1, anticipatepin: 1, toggleActions: "play pause resume reset", }, });*/ var parallaxText = gsap.timeline({ scrollTrigger: { trigger: ".parallax-image-text-wrapper", start: "top 30%", end: "top top", scrub: 1, anticipatepin: 1, toggleActions: "play pause resume reset", }, }); /*parallaxFade.fromTo( ".parallax-image-text-wrapper", { autoAlpha: 0 }, { autoAlpha: 1 }, "<" );*/ //splitText(parallaxText, $(".parallax-image-section")); parallaxPin .to( ".parallax-image-section", { background: "#222", color: "#ffcd00", duration: 0.1 }, "<" ) .to( ".parallax-image-section .split-type", { color: "#ffcd00", duration: 0.1 }, "<" ) .to({}, {}, "+=1"); parallaxMove .fromTo( ".parallax-image-group.offset-right", { y: 0 }, { y: -3 * paraImageLrg }, "<" ) .fromTo( ".parallax-image-group.narrow", { y: -3 * paraImageSml }, { y: 0 }, "<" ); }); } if ($(".popup-wrapper").length > 0) { var $popupWrapper = $(".popup-wrapper"); $(".open-career-popup").click(function () { $popupWrapper.fadeIn(); $popupWrapper.css("display", "flex"); }); $(".popup-close").click(function () { $popupWrapper.fadeOut(); }); $(document).keydown(function () { if (event.key === "Escape" || event.keyCode === "27") { $popupWrapper.fadeOut(); } }); }