1// AOS ANIMATION 2// AOS.init({disable: 'mobile'}); 3window.addEventListener('load', AOS.refresh); 4let scrollRef = 0; 5window.addEventListener('scroll', function () { 6 scrollRef <= 10 ? scrollRef++ : AOS.refresh(); 7}); 8AOS.init({ 9 duration: 1800, 10}) 11 12// MOBILE MENU 13$(document).ready(function () { 14 $('.menu-bar').on('click', function () { 15 $(this).toggleClass('in').parents('body').toggleClass('mobile-menu'); 16 $(this).next().toggleClass('in'); 17 }); 18 $('.mobile-scroll li.menu-item-has-children').on('click', function () { 19 var aftercl = psuedoClick(this); 20 var clickafter = psuedoClick(this).after; 21 if (clickafter == true) { 22 console.log($(aftercl)); 23 if (!$(this).hasClass('open')) { 24 $(this).addClass('open'); 25 $(this).children('ul').addClass('in'); 26 } else { 27 $(this).find('.sub-menu').removeClass('in'); 28 $(this).removeClass('open'); 29 $(this).find('li.open').removeClass('open'); 30 } 31 } 32 $('.sub-menu .sub-menu.in li.open').click(function () { 33 $(this).removeClass('open'); 34 $(this).children('.sub-menu.in').removeClass('in'); 35 }) 36 console.log($(this).children('.sub-menu')); 37 }); 38 39 $(document).bind('click', function (e) { 40 var $clicked = $(e.target); 41 if (!$clicked.parents().hasClass('main-nav')) { 42 $('.main-nav').find('.in').removeClass('in'); 43 $('body').removeClass('mobile-menu'); 44 } 45 }); 46}); 47 48function psuedoClick(parentElem) { 49 50 var beforeClicked, 51 afterClicked; 52 53 var parentLeft = parseInt(parentElem.getBoundingClientRect().left, 10), 54 parentTop = parseInt(parentElem.getBoundingClientRect().top, 10); 55 56 var parentWidth = parseInt(window.getComputedStyle(parentElem).width, 10), 57 parentHeight = parseInt(window.getComputedStyle(parentElem).height, 10); 58 59 var before = window.getComputedStyle(parentElem, ':before'); 60 61 var beforeStart = parentLeft + (parseInt(before.getPropertyValue("left"), 10)), 62 beforeEnd = beforeStart + parseInt(before.width, 10); 63 64 var beforeYStart = parentTop + (parseInt(before.getPropertyValue("top"), 10)), 65 beforeYEnd = beforeYStart + parseInt(before.height, 10); 66 67 var after = window.getComputedStyle(parentElem, ':after'); 68 69 var afterStart = parentLeft + (parseInt(after.getPropertyValue("left"), 10)), 70 afterEnd = afterStart + parseInt(after.width, 10); 71 72 var afterYStart = parentTop + (parseInt(after.getPropertyValue("top"), 10)), 73 afterYEnd = afterYStart + parseInt(after.height, 10); 74 75 var mouseX = event.clientX, 76 mouseY = event.clientY; 77 78 beforeClicked = (mouseX >= beforeStart && mouseX <= beforeEnd && mouseY >= beforeYStart && mouseY <= beforeYEnd ? true : false); 79 80 afterClicked = (mouseX >= afterStart && mouseX <= afterEnd && mouseY >= afterYStart && mouseY <= afterYEnd ? true : false); 81 82 return { 83 "before": beforeClicked, 84 "after": afterClicked 85 86 }; 87 88} 89 90 91// $('.thumb-slider-colum').slick({ 92// slidesToShow: 3, 93// slidesToScroll: 1, 94// loop: true, 95// arrows: true, 96// autoplay: false, 97// speed: 500, 98// responsive: [ 99// { 100// breakpoint:1199, 101// settings: { 102// slidesToShow: 3, 103// } 104// }, 105// { 106// breakpoint:1023, 107// settings: { 108// slidesToShow: 2, 109// } 110// }, 111// { 112// breakpoint: 575, 113// settings: { 114// slidesToShow: 1, 115// } 116// } 117// ] 118// }); 119 120 121$("#instantlyForm").submit(function (e) { 122 123 e.preventDefault(); // avoid to execute the actual submit of the form. 124 125 var form = $(this); 126 var actionUrl = form.attr('action'); 127 128 $.ajax({ 129 type: "POST", 130 url: site_url + '/preorder.php', 131 data: form.serialize(), // serializes the form's elements. 132 beforeSend: function () { 133 $('.response-order').html(''); 134 $('#instantlyForm .email-button').attr('disabled', true); 135 }, 136 success: function (data) { 137 $('#instantlyForm .email-button').removeAttr('disabled'); 138 if (data == 'success') { 139 $('#email').val(''); 140 window.location.href = site_url + "/thank-you"; 141 } else { 142 $('.response-order').html('Error, please try again').addClass('error').delay(5000).fadeOut("slow"); 143 setTimeout(function () { 144 $('.response-order').html('').removeClass('error'); 145 }, 6000); 146 } 147 } 148 }); 149 150}); 151$("#instantlyFormPopup").submit(function (e) { 152 153 e.preventDefault(); // avoid to execute the actual submit of the form. 154 155 var form = $(this); 156 var actionUrl = form.attr('action'); 157 158 $.ajax({ 159 type: "POST", 160 url: site_url + '/preorder.php', 161 data: form.serialize(), // serializes the form's elements. 162 beforeSend: function () { 163 $('.response-order-popup').html(''); 164 $('#instantlyFormPopup .email-button').attr('disabled', true); 165 }, 166 success: function (data) { 167 $('#instantlyFormPopup .email-button').removeAttr('disabled'); 168 if (data == 'success') { 169 //location.href = "thank-you.html"; 170 $('#emailPopup').val(''); 171 $('.form-popup').hide(); 172 $('.thanks-popup').show(); 173 } else { 174 175 176 } 177 } 178 }); 179 180}); 181 182 183// ALL ALL VIDEO CLICK PLAY PAUSE 184$(document).on('click', '#workvideo, .playicon', function (e) { 185 var videoID = $(this).attr('data-video'); 186 var video_type = $(this).attr('data-video-type'); 187 if (video_type == 'manual') { 188 var video = $('#' + videoID).get(0); 189 if (video.paused === false) { 190 video.pause(); 191 if (video.paused === true) { 192 $(this).parent().css('opacity', '1'); 193 } else { 194 $(this).parent().css('opacity', '0'); 195 } 196 197 } else { 198 $("video").each(function () { 199 var videoPause = $(this).get(0); 200 videoPause.pause(); 201 $(this).parent().find('.playicon').css('opacity', '1'); 202 }); 203 video.play(); 204 $(this).parent().css('opacity', '0'); 205 } 206 } 207 return false;
208}); 209 210 211// $(document).ready(function(){ 212// $(window).scroll(function(){ 213// $(".scrollwrapper").css('opacity',0 + $(window).scrollTop()/300); 214// }); 215// }); 216$(document).ready(function () { 217 $('.modal').on('hide.bs.modal', function () { 218 var memory = $(this).html(); 219 $(this).html(memory); 220 }); 221 222 $('#modal-video-modal').on('shown.bs.modal', function () { 223 $('#video1')[0].play(); 224 }) 225 $('#modal-video-modal').on('hidden.bs.modal', function () { 226 $('#video1')[0].pause(); 227 }) 228}); 229 230$(window).on('load', function () { 231 if ($('.fitness-last-section').length > 0) { 232 setTimeout(function () { 233 if ($(window).width() > 0) { 234 console.log("yes"); 235 gsap.registerPlugin(ScrollTrigger); 236 gsap.set(".slide", { 237 zIndex: (i, target, targets) => targets.length - i 238 }); 239 var images = gsap.utils.toArray('.slide:not(.purple)'); 240 images.forEach((image, i) => { 241 var tl = gsap.timeline({ 242 scrollTrigger: { 243 trigger: ".fitness-last-section", 244 // scroller: ".scroller", 245 start: () => "top -" + (window.innerHeight * (i + 0.6)), 246 end: () => "+=" + window.innerHeight, 247 scrub: true, 248 toggleActions: "play none reverse none", 249 invalidateOnRefresh: true, 250 } 251 }) 252 tl 253 .to(image, { 254 height: 0 255 }); 256 }); 257 // gsap.set(".panel-text", { zIndex: (i, target, targets) => targets.length - i }); 258 var texts = gsap.utils.toArray('.text-scroll-item'); 259 texts.forEach((text, i) => { 260 261 var tl = gsap.timeline({ 262 263 scrollTrigger: { 264 trigger: ".fitness-last-section", 265 // scroller: ".scroller", 266 start: () => "top -" + (window.innerHeight * i), 267 end: () => "+=" + window.innerHeight, 268 scrub: true, 269 toggleActions: "play none reverse none", 270 invalidateOnRefresh: true, 271 onEnter: () => { 272 texts.forEach((e) => { 273 e.classList.remove("active"); 274 }); 275 texts[i].classList.add("active"); 276 }, 277 onEnterBack: () => { 278 texts.forEach((e) => { 279 e.classList.remove("active"); 280 }); 281 texts[i].classList.add("active"); 282 } 283 } 284 285 }) 286 }); 287 ScrollTrigger.create({ 288 trigger: ".fitness-last-section", 289 // scroller: ".scroller", 290 scrub: true, 291 markers: true, 292 pin: true, 293 start: () => "top top", 294 end: () => "+=" + ((images.length + 1) * window.innerHeight), 295 invalidateOnRefresh: true, 296 }); 297 } 298 }, 2000); 299 } 300}) 301 302$(window).on('scroll', function () { 303 if ($('.how-it-works-content').length > 0) { 304 if ($(window).width() >= 1700) { 305 var sections = $('.how-it-works-content p'), 306 nav = $('.how-it-works-content'), 307 nav_height = nav.outerHeight(), 308 cur_pos = $(this).scrollTop(); 309 sections.each(function () { 310 var top = $(this).offset().top - 600, 311 bottom = top + $(this).outerHeight(); 312 313 if (cur_pos >= top && cur_pos <= bottom) { 314 nav.find('p').removeClass('active'); 315 sections.removeClass('active'); 316 317 $(this).addClass('active'); 318 } 319 }); 320 }; 321 } 322}); 323$(window).on('scroll', function () { 324 if ($(window).width() >= 1024 && $(window).width() <= 1699) { 325 var sections = $('.how-it-works-content p'), 326 nav = $('.how-it-works-content'), 327 nav_height = nav.outerHeight(), 328 cur_pos = $(this).scrollTop(); 329 sections.each(function () { 330 var top = $(this).offset().top - 400, 331 bottom = top + $(this).outerHeight(); 332 333 if (cur_pos >= top && cur_pos <= bottom) { 334 nav.find('p').removeClass('active'); 335 sections.removeClass('active'); 336 337 $(this).addClass('active'); 338 } 339 }); 340 }; 341}); 342 343$(window).on('scroll', function () { 344 if ($(window).width() >= 576 && $(window).width() <= 1023) { 345 var sections = $('.how-it-works-content p'), 346 nav = $('.how-it-works-content'), 347 nav_height = nav.outerHeight(), 348 cur_pos = $(this).scrollTop(); 349 sections.each(function () { 350 var top = $(this).offset().top - 250, 351 bottom = top + $(this).outerHeight(); 352 353 if (cur_pos >= top && cur_pos <= bottom) { 354 nav.find('p').removeClass('active'); 355 sections.removeClass('active'); 356 357 $(this).addClass('active'); 358 } 359 }); 360 }; 361}); 362$(window).on('scroll', function () { 363 if ($(window).width() <= 575) { 364 var sections = $('.how-it-works-content p'), 365 nav = $('.how-it-works-content'), 366 nav_height = nav.outerHeight(), 367 cur_pos = $(this).scrollTop(); 368 sections.each(function () { 369 var top = $(this).offset().top - 600, 370 bottom = top + $(this).outerHeight(); 371 372 if (cur_pos >= top && cur_pos <= bottom) { 373 nav.find('p').removeClass('active'); 374 sections.removeClass('active'); 375 376 $(this).addClass('active'); 377 } 378 }); 379 }; 380}); 381 382$(window).on("load", function (e) {
383 if($('.about-fade-scroll-show').length > 0) { 384 gsap.registerPlugin(ScrollTrigger); 385 386 // --- RED PANEL --- 387 gsap.from(".about-fade-scroll-show", { 388 scrollTrigger: { 389 trigger: ".about-fade-scroll-show", 390 scrub: true, 391 start: "top bottom", 392 end: "top top" 393 }, 394 opacity: 0, 395 ease: "none" 396 }); 397 } 398}) 399 400 401$(window).on("load", function (e) { 402 if($('.thumb-slider-colum').length > 0) { 403 var owl = $('.thumb-slider-colum'); 404 owl.owlCarousel({ 405 loop: true, 406 nav: true, 407 autoplay: true, 408 smartSpeed: 1500, 409 responsive: { 410 0: { 411 items: 1 412 }, 413 576: { 414 items: 2 415 }, 416 768: { 417 items: 3 418 }, 419 1199: { 420 items: 3.35 421 } 422 } 423 424 }); 425 } 426}); 427$(document).ready(function () { 428 if ($(window).width() > 767) { 429 if($('#thumb--scroll-slider').length > 0) { 430 gsap.registerPlugin(ScrollTrigger); 431 432 let container = document.getElementById('thumb--scroll-slider'); 433 434 gsap.to(container, { 435 x: () => -(container.scrollWidth - document.documentElement.clientWidth) + "px", 436 ease: "none", 437 scrollTrigger: { 438 trigger: container, 439 start: "center center", 440 end: () => "+=" + container.offsetWidth, 441 scrub: true, 442 pin: ".thumslider-section", 443 anticipatePin: 1 444 } 445 446 }); 447 ScrollTrigger.refresh(); 448 gsap.registerPlugin(ScrollTrigger); 449 gsap.to('progress', { 450 value: 100, 451 ease: 'none', 452 scrollTrigger: { 453 scrub: 0.3 454 } 455 }); 456 457 } 458 }; 459}); 460$(window).on("load", function (e) { 461 if($('.faq-slider-wrp').length > 0) { 462 $('.faq-slider-wrp').slick({ 463 dots: true, 464 infinite: true, 465 speed: 1500, 466 autoplay: true, 467 slidesToShow: 1, 468 slidesToScroll: 1, 469 responsive: [{ 470 breakpoint: 575, 471 settings: { 472 slidesToShow: 1, 473 slidesToScroll: 1, 474 adaptiveHeight: true, 475 } 476 } 477 // You can unslick at a given breakpoint now by adding: 478 // settings: "unslick" 479 // instead of a settings object 480 ] 481 }); 482 } 483}); 484$(window).on("load", function (e) { 485 if($('.cansonal-devices-slider').length > 0) { 486 $('.cansonal-devices-slider').slick({ 487 autoplay: true, 488 autoplaySpeed: 0, 489 speed: 5000, 490 arrows: false, 491 swipe: false, 492 slidesToShow: 2.8, 493 cssEase: 'linear', 494 pauseOnFocus: false, 495 pauseOnHover: true, 496 responsive: [{ 497 breakpoint: 575, 498 settings: { 499 slidesToShow: 1, 500 } 501 } 502 // You can unslick at a given breakpoint now by adding: 503 // settings: "unslick" 504 // instead of a settings object 505 ] 506 }); 507 } 508}); 509 510if ($('body').length > 0) { 511 window.addEventListener("orientationchange", function () { 512 location.reload(); 513 }, false); 514} 515 516 517$(document).ready(function () { 518 function ai() { 519 const e = document.querySelectorAll(".marquee-thework-line-part1"), 520 t = (window.pageYOffset || document.documentElement.scrollTop) / (document.documentElement.scrollHeight - window.innerHeight), 521 i = -1, 522 n = 50; 523 e.forEach(s => { 524 const r = i + (i - n) * t; 525 s.style.transform = `translateX(${r}%)` 526 }) 527 } 528 window.addEventListener("scroll", ai); 529 530}); 531$(document).ready(function () { 532 function ai() { 533 const e = document.querySelectorAll(".marquee-thework-line-part2"), 534 t = (window.pageYOffset || document.documentElement.scrollTop) / (document.documentElement.scrollHeight - window.innerHeight), 535 i = -1, 536 n = 50; 537 e.forEach(s => { 538 const r = i + (i - n) * t; 539 s.style.transform = `translateX(${-r}%)` 540 }) 541 } 542 window.addEventListener("scroll", ai); 543 544}); 545 546 547// $(window).on('scroll', function () { 548// var sections = $('.planned-rlt-content ul li') 549// , nav = $('.planned-rlt-content ul') 550// , nav_height = nav.outerHeight() 551// , cur_pos = $(this).scrollTop(); 552// sections.each(function() { 553// var top = $(this).offset().top - 600, 554// bottom = top + $(this).outerHeight(); 555// 556// if (cur_pos >= top && cur_pos <= bottom) { 557// nav.find('li').removeClass('active'); 558// sections.removeClass('active'); 559// 560// $(this).addClass('active'); 561// } 562// }); 563// }); 564 565$(window).scroll(function (e) { 566 var offsetRange = $(window).height() / 6, 567 offsetTop = $(window).scrollTop() + offsetRange + $(".tab-item.w-dyn-item").outerHeight(true), 568 offsetBottom = offsetTop + offsetRange; 569 570 $(".playiconslit video").each(function () { 571 var y1 = $(this).offset().top; 572 var y2 = offsetTop; 573 if (y1 + $(this).outerHeight(true) < y2 || y1 > offsetBottom) { 574 this.pause(); 575 } 576 }); 577}); 578 579 580$(document).on('click', '.playiconslit', function (e) { 581 var videoID = $(this).attr('data-video'); 582 var video_type = $(this).attr('data-video-type'); 583 if (video_type == 'manual') { 584 var video = $('#' + videoID).get(0); 585 if (video.paused === false) { 586 video.pause(); 587 if (video.paused === true) { 588 $(this).parent().css('opacity', '1'); 589 } else { 590 $(this).parent().css('opacity', '0'); 591 } 592 593 } else { 594 $("video").each(function () { 595 var videoPause = $(this).get(0); 596 videoPause.pause(); 597 $(this).parent().find('.playiconslit').css('opacity', '1'); 598 }); 599 video.play(); 600 $(this).parent().css('opacity', '0'); 601 } 602 } 603 return false;
604}); 605 606$(document).ready(function () { 607 var btn = $('.scroll-right-fixed a'); 608 609 $(window).scroll(function () { 610 if ($(window).scrollTop() > 300) { 611 btn.addClass('show'); 612 } else { 613 btn.removeClass('show'); 614 } 615 }); 616 btn.on('click', function (e) { 617 e.preventDefault(); 618 $('html, body').animate({ 619 scrollTop: 0 620 }, '300'); 621 }); 622}); 623 624 625// arrow animate 626 627// let intervel = 2000; 628// 629// setInterval(function () { 630// $('.scroll-right-fixed').toggleClass('active'); 631// 632// if($('.scroll-right-fixed').hasClass('active')) { 633// let intervel = 2000; 634// } else { 635// let intervel = 1000; 636// } 637// }, intervel); 638 639 640if ($(window).width() > 768) { 641 window.onload = () => { 642 document.querySelector(".scroll-right-fixed").classList.add("active") 643 toggleSequence() 644 setInterval(toggleSequence, 3000); 645 } 646 647 function toggleSequence() { 648 setTimeout(() => { 649 document.querySelector(".scroll-right-fixed").classList.toggle("active"); 650 }, 2000) 651 setTimeout(() => { 652 document.querySelector(".scroll-right-fixed").classList.toggle("active"); 653 }, 3000) 654 } 655} 656 657 658if ($(window).width() < 766) { 659 document.addEventListener("DOMContentLoaded", () => { 660 const scrollRightFixed = document.querySelector(".scroll-right-fixed"); 661 662 // Initially add the active class 663 scrollRightFixed.classList.add("active"); 664 665 const toggleSequence = () => { 666 setTimeout(() => { 667 scrollRightFixed.classList.toggle("active"); 668 }, 3000); 669 setTimeout(() => { 670 scrollRightFixed.classList.toggle("active"); 671 }, 2000); 672 }; 673 674 // Start the toggle sequence 675 toggleSequence(); 676 677 // Repeat the toggle sequence every 3000 milliseconds 678 setInterval(toggleSequence, 3000); 679 }); 680 681} 682 683// MAC NAVIGATOR 684$(function () { 685 const ua = navigator.userAgent; 686 const platform = navigator.platform.toLowerCase(); 687 688 const isMac = platform.includes('mac'); 689 const isWindows = ua.includes('Windows'); 690 const isSafari = /^((?!chrome|android).)*safari/i.test(ua); 691 const isChrome = ua.includes('Chrome'); 692 693 // Safari on macOS 694 if (isSafari && isMac) { 695 $('body').addClass('mac-safari'); 696 } 697 698 // Chrome on Windows 699 if (isChrome && isWindows) { 700 $('body').addClass('windows-chrome'); 701 } 702 703 // Chrome on macOS 704 if (isChrome && isMac) { 705 $('body').addClass('mac-chrome'); 706 } 707});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.