var primaryAnimator = (function() { var w = {}, j = { startAt: 0, timeoutData: {} }, i, x = "", r = false, p = false; var d, g, n, o; function a() { d = i.getPageInfo(); g = d.wHeight; n = d.wWidth; o = d.wCenter; } var k = {}; k.intro = 0; k.subintro = k.intro + 500; k.travis = k.subintro + 1000; k.takeoff = k.travis + 1000; k.goodlook = k.takeoff + 1000; k.notseen = k.goodlook + 1000; k.lowwide = k.notseen + 1000; k.schedule = k.lowwide + 1000; k.press = k.schedule + 1000; k.footer = k.press + 1000; k.end = k.footer; var l = 0; var v = [{ id: "main", startAt: 0, endAt: 500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: -870 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -1650 } }] }, { id: "main", startAt: 500, endAt: 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -1650 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: -1030 } }], onStartAnimate: function() { lazyImageLoader($("#takeoff img[data-src]")); } }, { id: "main", startAt: 1000, endAt: 1500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: -1030 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -1550 } }], onStartAnimate: function() { lazyImageLoader($("#goodlook img[data-src]")); } }, { id: "main", startAt: 1500, endAt: 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -1550 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -1030 } }], onStartAnimate: function() { lazyImageLoader($("#notseen img[data-src]")); }, onEndAnimate: function() { c(); } }, { id: "main", startAt: 2000, endAt: 2500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -1030 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -1830 } }], onStartAnimate: function() { lazyImageLoader($("#lowwide img[data-src]")); }, onEndAnimate: function() { f(); } }, { id: "main", startAt: 2500, endAt: 3000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -1830 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -2300 } }] }, { id: "main", startAt: 3000, endAt: 3500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -2300 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -3300 } }], onStartAnimate: function() { lazyImageLoader($("#schedule img[data-src]")); } }, { id: "main", startAt: 3500, endAt: 4000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -3300 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -4272 } }] }, { id: "main", startAt: 4000, endAt: 4500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -4272 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -5002 } }], onStartAnimate: function() { lazyImageLoader($("#press img[data-src]")); } }, { id: "main", startAt: 4500, endAt: 5000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -5002 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -5916 } }], onStartAnimate: function() { lazyImageLoader($("#roadclosed img[data-src]")); } }, { id: "main", startAt: 0, endAt: 500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { left: -690 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -1078 } }] }, { id: "main", startAt: 500, endAt: 1000 + 1, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { left: -1078 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -2219 } }] }, { id: "main", startAt: 1000, endAt: 1500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -2219 } }, { position: 1, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: -3458 } }] }, { id: "main", startAt: 1500, endAt: 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -3458 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -5164 } }] }, { id: "main", startAt: 2000, endAt: 2500, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: -5164 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -6697 } }] }, { id: "main", startAt: 2500, endAt: 3000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -6697 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -7504 } }] }, { id: "main", startAt: 3000, endAt: 3500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -7504 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -8383 } }] }, { id: "main", startAt: 3500, endAt: 4000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -8383 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -8861 } }] }, { id: "main", startAt: 4000, endAt: 4500, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -8861 } }, { position: 1, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: -9050 } }] }, { id: "main", startAt: 4500, endAt: 5000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -9050 } }, { position: 1, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: -9030 } }] }, { id: "mainScrollBarThumb", startAt: 0, endAt: k.end, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 0 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 401 } }] }, b("intro", "", -50, 50), { id: "introHero", startAt: k.intro, endAt: k.subintro + 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 0 } }, { position: 0.5, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: -50 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -50 } }] }, { id: "introHero", startAt: k.intro, endAt: k.subintro + 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 0 } }, { position: 0.22, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 0 } }, { position: 0.5, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -50 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -50 } }] }, { id: "subintro", startAt: k.intro, endAt: k.subintro + 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 1100 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: 905 } }] }, { id: "subintro", startAt: k.intro, endAt: k.subintro + 2000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 206 } }, { position: 0.22, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 206 } }, { position: 0.5, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 0 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 0 } }] }, h("subintroSplat", [-41, -341], [725, 0]), h("subintroGloves", [44, -195], [475, 0]), h("subintroLeftTitle", [162, -136], [700, 0]), h("subintroLeftP", [0, 0], [400, 0]), h("subintroKeys", [193, -157], [1000, 0]), h("subintroRightTitle", [1, -113], [500, 0]), h("subintroRightP", [0, 0], [800, 0]), b("travis", "travis", -50, 50), { id: "travis-cone", startAt: k.intro, endAt: k.travis + 1000 }, { id: "travis-car", startAt: k.intro, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -222 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -350 } }] }, { id: "travis-person", startAt: k.travis - 250, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { left: 2000 } }, { position: 0.18, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 146 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -250 } }], onEndAnimate: function() {} }, { id: "travis-bubble", startAt: k.travis - 500, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 49, top: 64, opacity: 0 } }, { position: 0.25, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 49, top: 64, opacity: 0 } }, { position: 0.33, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 49, top: 64, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -375, top: 64, opacity: 1 } }] }, { id: "travis-backflip", startAt: k.travis - 1, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 0 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -400 } }], onStartAnimate: function(t) { $(this._elem).show(); s("backflip", 40, function() { $("#travis-successful").fadeIn(500); }); } }, { id: "travis-successful", startAt: k.travis - 1, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 690, top: 65 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 290, top: 65 } }], onStartAnimate: function(t) {} }, { id: "travis-title", startAt: k.travis - 500, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: -300, opacity: 0 } }, { position: 0.1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: -300, opacity: 1 } }, { position: 0.33, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 309, top: 116 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: -100, top: 116 } }] }, { id: "travis-subtitle", startAt: k.travis - 500, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: -50, opacity: 0 } }, { position: 0.1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: -50, opacity: 1 } }, { position: 0.33, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 550, top: 254 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 150, top: 254 } }] }, { id: "travis-info", startAt: k.travis - 500, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: 0, opacity: 0 } }, { position: 0.05, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: 0, opacity: 1 } }, { position: 0.33, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 458, top: 296 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 58, top: 296 } }] }, { id: "travis-cta", startAt: k.travis, endAt: k.travis + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 756, top: 424, opacity: 0 } }, { position: 0.17, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 690, top: 424, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 356, top: 424 } }] }, b("takeoff", "takeoff", -50, 50), { id: "takeoff-title", startAt: k.takeoff - 500, endAt: k.takeoff + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: 169, opacity: 0 } }, { position: 0.1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 1400, top: 169, opacity: 1 } }, { position: 0.33, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 624, top: 169 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 524, top: 169 } }] }, { id: "goodlookTitle", startAt: k.goodlook - 830, endAt: k.notseen + 1, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 1000 } }, { position: 0.3, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 150 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { left: 150 } }] }, { id: "goodlookCopy", startAt: k.goodlook - 830, endAt: k.notseen + 1, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 500 } }, { position: 0.3, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 50 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { left: 50 } }] }, { id: "goodlookStreetLight", startAt: k.goodlook - 100, endAt: k.notseen - 600, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 445 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 245 } }] }, b("notseen", "notseen", -50, 50), { id: "notseenCar", startAt: k.notseen - 200, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: 0, left: -1000 } }, { position: 0.2, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: 240, left: 17 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 350, left: 307 } }] }, { id: "notseenHay", startAt: k.goodlook + 270, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 369, left: 800, opacity: 0 } }, { position: 0.1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 329, left: 516, opacity: 1 } }, { position: 0.45, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 369, left: 466, opacity: 1 } }, { position: 0.535, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { top: 369, left: 466, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { top: 300, left: 340, opacity: 1 } }] }, { id: "notseenTitle", startAt: k.goodlook + 270, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -150, left: -43 } }, { position: 0.45, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 50, left: -331 } }, { position: 0.535, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 50, left: -331 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -150, left: -643 } }] }, { id: "notseenCopy", startAt: k.goodlook + 270, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 0, left: -127 } }, { position: 0.45, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 234, left: -348 } }, { position: 0.535, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 234, left: -348 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { top: 0, left: -527 } }] }, { id: "notseen-gallery-wrap", startAt: k.goodlook + 270, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: -144, left: 604 } }, { position: 0.45, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 44, left: 454 } }, { position: 0.535, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 44, left: 454 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { top: -144, left: 304 } }] }, { id: "notseen-gallery-wrap-bg", startAt: k.goodlook + 270, endAt: k.lowwide, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { opacity: 0 } }, { position: 0.36, ease: TWEEN.Easing.Linear.EaseNone, properties: { opacity: 0 } }, { position: 0.39, ease: TWEEN.Easing.Linear.EaseNone, properties: { opacity: 1 } }, { position: 0.535, ease: TWEEN.Easing.Linear.EaseNone, properties: { opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { opacity: 0 } }] }, b("lowwide", "exterior", -50, 50), { id: "facade", startAt: k.lowwide - 1000, endAt: k.lowwide + 1, onProgress: function(y, A, z) { var t = A - z; $("#lowwide-building-back").css({ left: -47 + (t * 0.1) + "px" }); $("#lowwide-rail").css({ left: 210 + (t * 0.1) + "px" }); $("#lowwide-building-front").css({ left: -91 + (t * 0.3) + "px" }); $("#vehicle-360").css({ left: -210 + (t * 0.5) + "px" }); $("#lowwide-gesse").css({ left: -210 + (t * 0.5) + "px" }); $("#lowwide-tree").css({ left: -565 + (t * 1.7) + "px" }); } }, { id: "lowwide-building-back", startAt: k.lowwide - 1000, endAt: k.lowwide + 1000 }, { id: "lowwide-building-front", startAt: k.lowwide - 1000, endAt: k.lowwide + 1000 }, { id: "lowwide-gesse", startAt: k.lowwide - 1000, endAt: k.lowwide + 1000 }, { id: "lowwide-tree", startAt: k.lowwide - 1000, endAt: k.lowwide + 1000 }, { id: "lowwide-title", startAt: k.lowwide - 250, endAt: k.lowwide + 250, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: 600, opacity: 0 } }, { position: 0.4, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 436, opacity: 1 } }, { position: 0.65, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 436, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 272, opacity: 0 } }] }, { id: "lowwide-copy", startAt: k.lowwide - 250, endAt: k.lowwide + 250, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: 800, opacity: 0 } }, { position: 0.4, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 570, opacity: 1 } }, { position: 0.65, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 570, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 340, opacity: 0 } }] }, b("schedule", "schedule", -50, 50), { id: "schedule-title", startAt: k.schedule - 1000, endAt: k.schedule + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: 1000, top: 203 } }, { position: 0.5, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 100, top: 203 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 100, top: 203 } }] }, { id: "schedule-flagger", startAt: k.schedule - 1000, endAt: k.schedule + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: 50 } }, { position: 0.5, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -50 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: -50 } }] }, { id: "schedule-list", startAt: k.schedule - 200, endAt: k.schedule + 800, keyframes: [{ position: 0, ease: TWEEN.Easing.Quadratic.EaseInOut, properties: { left: 786, top: 250, opacity: 0 } }, { position: 0.2, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { left: 586, top: 250, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { left: 486, top: 250, opacity: 1 } }], onStartAnimate: function() { $(this._elem).css({ display: "block" }); RaceSchedule.resetContent(); }, onEndAnimate: function() { $(this._elem).css({ display: "none" }); RaceSchedule.resetContent(); } }, { id: "pressNavList", startAt: k.press - 700, endAt: k.press + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 842, left: 152 } }, { position: 0.46, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 452, left: 102 } }, { position: 0.65, ease: TWEEN.Easing.Cubic.EaseOut, properties: { top: 452, left: 102 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { top: 102, left: 102 } }] }, { id: "pressTitle", startAt: k.press - 1000, endAt: k.press + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 540, left: -7 } }, { position: 0.46, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 240, left: -57 } }, { position: 0.655, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 220, left: -57 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 160, left: -57 } }] }, { id: "pressMics", startAt: k.press - 1000, endAt: k.press + 1000, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 192, left: 93, opacity: 0 } }, { position: 0.35, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 242, left: 123, opacity: 0 } }, { position: 0.46, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 142, left: 73, opacity: 1 } }, { position: 0.655, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 142, left: 73, opacity: 1 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseInOut, properties: { top: 82, left: 73, opacity: 1 } }] }, { id: "closedContent", startAt: k.footer - 1000, endAt: k.footer, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 170 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 33 } }] }, { id: "closedLogo", startAt: k.footer - 370, endAt: k.footer, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 1500 } }, { position: 0.2, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -122 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -122 } }] }, { id: "closedCopy", startAt: k.footer - 410, endAt: k.footer, keyframes: [{ position: 0, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: 1500 } }, { position: 0.2, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -39 } }, { position: 1, ease: TWEEN.Easing.Linear.EaseNone, properties: { top: -39 } }] }, { id: "footer", startAt: k.footer - 300, endAt: k.footer, keyframes: [{ position: 0, ease: TWEEN.Easing.Cubic.EaseOut, properties: { bottom: -650 } }, { position: 1, ease: TWEEN.Easing.Cubic.EaseIn, properties: { bottom: 0 } }] }]; function h(A, y, z) { var t = k.subintro - 100; var B = k.travis; return e(A, y, z, false, true, t, B, { offsetMultiplier: 1.4, keyframePositions: [0, 0.3, 0.99, 1] }); } function e(H, D, A, M, L, E, F, t) { var C = { keyframePositions: [0, 0.35, 0.55, 1], offsetMultiplier: 1 }, z = $.extend(C, t); var y = $("#" + H); var K = D[0]; var J = D[1]; var G = A[0] * z.offsetMultiplier; var I = A[1] * z.offsetMultiplier; var B = { id: H, startAt: E, endAt: F, keyframes: [{ position: z.keyframePositions[0], onInit: function(N) {}, properties: {} }, { position: z.keyframePositions[1], ease: TWEEN.Easing.Quadratic.EaseOut, onInit: function(N) {}, properties: {} }, { position: z.keyframePositions[2], onInit: function(N) {}, properties: {} }, { position: z.keyframePositions[3], ease: TWEEN.Easing.Quadratic.EaseIn, onInit: function(N) {}, properties: {} }] }; B.keyframes[0].properties.left = K + (M ? G : 0); B.keyframes[1].properties.left = K; B.keyframes[2].properties.left = K; B.keyframes[3].properties.left = K + (M ? I : 0); B.keyframes[0].properties.top = J + (L ? G : 0); B.keyframes[1].properties.top = J; B.keyframes[2].properties.top = J; B.keyframes[3].properties.top = J + (L ? I : 0); return B; } function b(A, t, z, y) { return { id: "facade", startAt: k[A] + z, endAt: k[A] + y }; } function s(B, A, C) { var y = imageSequences[B], z = -1; var t = function() { z++; y.showImageAt(z); if(z < y.imageCount) { setTimeout(function() { t(); }, A); } else { C && C(); } }; t(); } function m() {} function c() { if($(".ie7Detect").exists() || $(".ie8Detect").exists()) { $("#goodlookLayer2 .car .lights").stop(true, true).css({ opacity: 0, display: "block" }).animate({ opacity: 1 }, 0).delay(350).animate({ opacity: 0 }, 0).delay(200).animate({ opacity: 1 }, 0).delay(350).animate({ opacity: 0 }, 0, function() { $(this).css("opacity", "").css("display", ""); }); } else { $("#goodlookLayer2 .car .lights").stop(true, true).css({ opacity: 0, display: "block" }).animate({ opacity: 1 }, 200).delay(150).animate({ opacity: 0 }, 200).animate({ opacity: 1 }, 200).delay(150).animate({ opacity: 0 }, 200, function() { $(this).css("opacity", "").css("display", ""); }); } } function f() { $("#notseenLensSplat").stop(true, true).css({ opacity: 0, display: "block" }).animate({ opacity: 1 }, 100).delay(3000).animate({ opacity: 0 }, 3000, function() { $(this).css("opacity", "").css("display", ""); }); } gotoSection = { "#top": k.intro, "#199": k.travis, "#video1": k.takeoff, "#video2": k.goodlook, "#gallery": k.notseen, "#view360": k.lowwide, "#races": k.schedule, "#inthepress": k.press, "#end": k.footer }; gotoSectionTranslation = { "#top": "#intro", "#subintro": "#subintro", "#199": "#travis", "#video1": "#takeoff", "#video2": "#goodlook", "#gallery": "#notseen", "#view360": "#lowwide", "#races": "#schedule", "#inthepress": "#press", "#end": "#roadclosed" }; var q = function(t) { if(!r) { r = true; w = $.extend(j, t); m(); $("[data-goto]").bind("click", function(y) { y.preventDefault(); i.scrollTo(gotoSection[$(this).attr("data-goto")]); resetFooter(); }); i = ScrollAnimator(); i.init({ animation: v, animationSections: k, maxScroll: k.end, useRAF: false, tickSpeed: 50, scrollSpeed: 30, debug: false, tweenSpeed: 0.3, startAt: w.startAt, container: $("#main"), onStart: function() {}, onResize: function() {}, onUpdate: function() {} }); if(i.isDebug()) { BrowserDetect.init(); $("#status").html(BrowserDetect.browser + "
" + BrowserDetect.version).show(); $("#status2").show(); } $(window).keydown(function(B) { var A = i.getScrollSpeed(); if(B.keyCode == 192) { i.toggleDebug(); } if(B.keyCode == 40 || B.keyCode == 39) { var z = i.getScrollTop(); var y = z + A; if(y > i.getMaxScroll()) { y = z; } i.scrollTo(y); } if(B.keyCode == 38 || B.keyCode == 37) { var z = i.getScrollTop(); var y = z - A; if(y < 0) { y = 0; } i.scrollTo(y); } if(B.keyCode == 36) { i.scrollTo(gotoSection["#top"]); } if(B.keyCode == 35) { i.scrollTo(gotoSection["#end"]); } }); } }; return { init: q }; })(); function primaryAnimatorLoad() { if(IsMobile.detect()) { document.location = "mobile/"; return false; } primaryAnimator.init(); } primaryAnimatorLoad();