123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- var comFunct = {
- isDesktop: function() {
- return !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)
- },
- isMobileDevice: function() {
- return navigator.userAgent.toLowerCase().indexOf("iphone") > -1 || navigator.userAgent.toLowerCase().indexOf("ipad") > -1 || navigator.userAgent.toLowerCase().indexOf("ipod") > -1 || navigator.userAgent.toLowerCase().indexOf("android") > -1 || navigator.userAgent.toLowerCase().indexOf("webos") > -1 || navigator.userAgent.toLowerCase().indexOf("blackberry") > -1
- },
- isMobileDeviceFake: function() {
- return comFunct.getViewport("width") < 979
- },
- getViewport: function(e) {
- var t, i;
- return "undefined" != typeof window.innerWidth ? (t = window.innerWidth, i = window.innerHeight) : "undefined" != typeof document.documentElement && "undefined" != typeof document.documentElement.clientWidth && 0 != document.documentElement.clientWidth ? (t = document.documentElement.clientWidth, i = document.documentElement.clientHeight) : (t = document.getElementsByTagName("body")[0].clientWidth, i = document.getElementsByTagName("body")[0].clientHeight), "width" == e ? t : i
- },
- log: function() {
- if (window.console) for (var e = 0; e < arguments.length; e++) console.log(arguments[e]);
- else window.console = {
- log: function() {}
- }
- },
- is_touch_device: function() {
- return "ontouchstart" in window || "onmsgesturechange" in window
- },
- getRelativepath: function() {
- var e = location.href,
- t = location.protocol + "//" + location.hostname,
- i = e.replace(t, "");
- return i
- }
- },
- testMobile, isMobile = {
- Android: function() {
- return navigator.userAgent.match(/Android/i)
- },
- BlackBerry: function() {
- return navigator.userAgent.match(/BlackBerry/i)
- },
- iOS: function() {
- return navigator.userAgent.match(/iPhone|iPad|iPod/i)
- },
- Opera: function() {
- return navigator.userAgent.match(/Opera Mini/i)
- },
- Windows: function() {
- return navigator.userAgent.match(/IEMobile/i)
- },
- any: function() {
- return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()
- }
- };
- (jQuery);
- var Dreamscapes = {
- isDev: !0,
- General: {
- log: function(e) {
- Dreamscapes.isDev && console.log(e)
- },
- runOnce: function(e) {
- var t;
- return function() {
- return e && (t = e(), e = null), t
- }
- },
- homeInitialLoading: !0,
- loadedSlides: []
- },
- Functions: {}
- };
- Dreamscapes.Timelines = function() {
- function e() {
- var e = new TimelineMax({
- paused: !0
- }),
- t = $(".home-loader"),
- i = $(".loader-subtitle"),
- n = $(".loader-cta-wrapper"),
- r = t.find(".loader-fact.fact-1"),
- o = t.find(".loader-fact.fact-2"),
- s = new SplitText(i, {
- type: "words,chars"
- }),
- a = $(".explore-path-wrapper"),
- l = $(".map-location-wrapper"),
- c = $(".map-container"),
- u = s.chars,
- d = $("#airplaneIcon"),
- h = $("#exploreDestinationPath"),
- f = ($(".main-menu-wrapper"), MorphSVGPlugin.pathDataToBezier(h, {
- offsetY: -94,
- offsetX: -4
- })),
- p = new SplitText(r, {
- type: "words,chars"
- }),
- m = new SplitText(o, {
- type: "words,chars"
- }),
- g = p.chars,
- v = m.chars;
- TweenMax.set(r, {
- perspective: 800
- }), TweenMax.set(o, {
- perspective: 800
- });
- var _ = 2.2;
- return e.add("firstFact").to(r, .6, {
- force3D: "auto",
- autoAlpha: 1
- }, "firstFact").staggerFrom(g, .5, {
- force3D: "auto",
- autoAlpha: 0,
- y: 60,
- rotationX: 160,
- ease: Back.easeOut,
- delay: 1.8
- }, .013, "firstFact").to(r, .3, {
- autoAlpha: 0,
- force3D: "auto",
- delay: _
- }).to(o, .3, {
- force3D: "auto",
- autoAlpha: 1
- }).staggerFrom(v, .5, {
- force3D: "auto",
- autoAlpha: 0,
- y: 60,
- rotationX: 160,
- ease: Back.easeOut
- }, .013).add("subtitleReveal", "+=1.2").staggerFrom(u, .5, {
- force3D: "auto",
- autoAlpha: 0,
- y: 60,
- rotationX: 160,
- ease: Back.easeOut
- }, .013, "subtitleReveal").to(n, 1, {
- autoAlpha: 1,
- force3D: "auto",
- y: "-=40",
- delay: 1.6,
- ease: Power3.easeOut
- }, "subtitleReveal").to(a, .4, {
- autoAlpha: 1,
- force3D: "auto",
- delay: 1.2,
- ease: Sine.easeInOut
- }, "subtitleReveal").to(c, 1.8, {
- scale: 1,
- delay: 1.2,
- force3D: "auto",
- ease: Power3.easeInOut
- }, "subtitleReveal").add("pinDrop", "-=1").staggerFromTo(l, 1, {
- opacity: 0,
- y: -60
- }, {
- opacity: 1,
- force3D: "auto",
- y: 0,
- ease: Elastic.easeOut.config(1.2, .5)
- }, .08, "pinDrop").to(d, 6.5, {
- bezier: {
- values: f,
- type: "cubic",
- force3D: "auto",
- autoRotate: !0
- },
- ease: Linear.easeNone,
- repeat: -1,
- repeatDelay: .8
- }, "subtitleReveal"), e
- }
- function t() {
- var e = new TimelineMax({
- paused: !0
- }),
- t = comFunct.getViewport("height"),
- i = comFunct.getViewport("width"),
- n = t / 2,
- r = i / 2,
- o = Math.sqrt(r * r + n * n),
- s = $(".menu-trigger"),
- a = $(".map-container"),
- l = s.find(".pin-wrapper"),
- c = s.find(".icon-close-menu"),
- u = $(".map-location-wrapper").not(".map-location-wrapper.active"),
- d = $(".main-menu-wrapper"),
- h = d.find("svg"),
- f = s.find(".icon-world"),
- p = $(".language-select-wrapper"),
- m = p.find("li");
- return e.add("open").to("#clipCircle", 1, {
- attr: {
- cx: r,
- cy: n,
- r: o
- },
- ease: Power2.easeInOut,
- force3D: "auto"
- }, "open").to(d, .55, {
- autoAlpha: 1,
- ease: Power2.easeIn,
- force3D: "auto"
- }, "open").to(a, 1.2, {
- scale: 1,
- ease: Sine.easeOut,
- force3D: "auto"
- }, "open", "+=0.4").add("iconChange").to(l, .4, {
- scale: .2,
- opacity: 0,
- ease: Back.easeInOut,
- force3D: "auto"
- }, "iconChange").to(f, .4, {
- scale: .2,
- opacity: 0,
- ease: Back.easeInOut,
- force3D: "auto"
- }, "iconChange").to(c, .4, {
- scale: 1,
- opacity: 1,
- ease: Back.easeInOut,
- force3D: "auto"
- }, "iconChange").add("pinDrop", "-=0.4").staggerFromTo(u, .4, {
- opacity: 0,
- y: -45
- }, {
- opacity: 1,
- y: 0,
- ease: Back.easeInOut,
- onComplete: function() {
- h.css("display", "none")
- },
- force3D: "auto"
- }, .05, "pinDrop").fromTo(p, .4, {
- autoAlpha: 0,
- y: 20
- }, {
- autoAlpha: 1,
- y: 0,
- ease: Power4.easeInOut,
- force3D: "auto"
- }, "pinDrop").staggerFromTo(m, .4, {
- opacity: 0,
- y: -15
- }, {
- opacity: 1,
- y: 0,
- force3D: "auto",
- ease: Back.easeInOut
- }, .05, "pinDrop"), e
- }
- function i(e, t) {
- var i = $(".slide"),
- n = i.eq(e),
- r = n.find(".flight-zone-wrapper"),
- o = n.find(".airplaneIcon"),
- s = n.find(".flightZonePath"),
- a = MorphSVGPlugin.pathDataToBezier(s, {
- offsetY: -9
- });
- return t.add("flight", "+=8.2").to(r, .6, {
- autoAlpha: 1,
- ease: Sine.easeInOut,
- force3D: "auto"
- }, "flight").to(o, 19, {
- bezier: {
- values: a,
- type: "cubic",
- autoRotate: !0
- },
- ease: Linear.easeNone,
- repeat: -1,
- force3D: "auto"
- }, "flight", "+=0.2").to(r, .4, {
- autoAlpha: 0,
- ease: Sine.easeInOut,
- force3D: "auto"
- }), t
- }
- function n() {
-
- }
- return {
- loaderTimeline: e,
- menuTimeline: t,
- airplaneTimeline: i,
- nextDestinationTimeline: n
- }
- }, $.js = function(e) {
- return $("[data-js=" + e + "]")
- }, Dreamscapes.Functions = function() {
- function e() {
-
- }
- function t() {
-
- }
- function i() {
- var e = comFunct.getViewport("width"),
- t = $("body"),
- i = Dreamscapes.Timelines(),
- n = $(".menu-trigger"),
- r = $(".main-menu-wrapper"),
- o = $(".main-menu-trigger-wrapper"),
- s = r.find("svg"),
- a = $(".map-location-wrapper").not(".map-location-wrapper.active"),
- l = ($(".language-select").find("a"), i.menuTimeline()),
- c = $(".video-wrapper");
- n.on("click", function() {
- s.css("display", "block"), "closed" == $(this).attr("data-toggle") ? ($(this).attr("data-toggle", "opened"), n.addClass("is-opened"), r.find(".main-menu").removeClass("intro-scene"), e > 767 && TweenMax.to(o, .8, {
- top: "15%",
- ease: Back.easeInOut.config(1),
- force3D: "auto"
- }), l.play(), t.addClass("overflow"), setTimeout(function() {
- c.addClass("menu-is-opened")
- }, 800)) : $(this).attr("data-toggle", "opened") && ($(this).attr("data-toggle", "closed"), n.removeClass("is-opened"), l.reverse(), t.removeClass("overflow"), c.removeClass("menu-is-opened"), $("body").hasClass("destination-page") && e > 767 ? TweenMax.to(o, .8, {
- top: "85%",
- delay: .4,
- ease: Back.easeInOut.config(1),
- force3D: "auto"
- }) : e > 767 && TweenMax.to(o, .8, {
- top: "85%",
- delay: .6,
- ease: Back.easeInOut.config(1),
- force3D: "auto"
- }))
- }), a.on("click", function() {
- n.attr("data-toggle", "closed"), l.reverse(), document.body.scrollTop = 0
- })
- }
- function n() {
- var e = $(".navigation-bar-wrapper");
- TweenMax.to(e, .1, {
- y: "-60px",
- force3D: "auto",
- ease: Sine.easeIn
- })
- }
- function r() {}
- function o() {}
- function s() {}
- function a() {}
- function l() {
- var e = comFunct.getViewport("width");
- if (e > 1024) {
- var t = $(".button");
- t.on("mouseenter", function() {
- TweenMax.to($(this).find(".button-wrapper"), 1, {
- scale: 1.2,
- force3D: "auto",
- ease: Elastic.easeOut
- })
- }), t.on("mouseleave", function() {
- TweenMax.to($(this).find(".button-wrapper"), 1, {
- scale: 1,
- force3D: "auto",
- ease: Elastic.easeOut
- })
- })
- }
- }
- //function c() {}
- function u(e, t) {
- var i = Dreamscapes.Timelines();
- t.clear();
- var n = i.airplaneTimeline(e, t);
- n.play()
- }
- //function d() {}
- function h(e) {
-
- }
- function f(e, t) {
-
- }
- function p(e) {
-
- }
- //function m() {}
- //function g() {}
- //function v() {}
- function _(e) {
- }
- //function y() {}
-
- //function b() {}
- //function T() {}
- //function x() {}
-
- function C(e, t) {}
-
- function P(e, t) {
- for (var i in t) e = e.replace("{" + i + "}", encodeURIComponent(t[i]));
- return e
- }
- var D = {},
- O = 0,
- M = !1,
- R = 0;
- Dreamscapes.General.log;
- return {
- cookiePlugin: t,
- mainMenu: i,
- //homeLoader: e,
- slideDown: n,
- //slideUp: r,
- //destinationParallaxScroll: o,
- scrollEvent: a,
- buttonHovers: l,
- //gsapScrollTo: d,
- callAirplane: u,
- setLayerDimensions: h,
- callTimeline: f,
- fullPagePlugin: p,
- //scrollMagicAnimation: y,
- //barbaInit: x,
- destinationIntroTimeline: _,
- //slickSliderPlugin: m,
- //inpageShare: g,
- //globalShare: v,
- lazyLoadVideos: C,
- //lazyLoadVideosHomepage: S,
- //countToPlugin: w,
- //destinationHeaderElements: b,
- //countToInitial: T,
- //destinationArc: c,
- //ajaxIframeLoad: k,
- //socialShare: A,
- //makeUrl: P
- }
- }, $(document).ready(function() {
- var e = $(".main-menu.intro-scene");
- setTimeout(function() {
- TweenMax.fromTo(e, 1.8, {
- opacity: 0,
- y: 40
- }, {
- opacity: 1,
- y: 0,
- ease: Power4.easeInOut
- })
- }, 200)
- }), $(function() {
- window.lazySizesConfig = window.lazySizesConfig || {}, lazySizesConfig.preloadAfterLoad = !0;
- var e = Dreamscapes.Functions(),
- t = !0;
- "homepage" == $(".barba-container").data("namespace") ? (e.homeLoader(), e.fullPagePlugin(t)) : e.lazyLoadVideos(), e.cookiePlugin(), e.mainMenu(), e.scrollEvent(), e.buttonHovers() || e.destinationIntroTimeline(t)
- });
|