1/*! BEFORE PAGE LOAD */ 2$('.video-wrap').hide(); 3 4 5/*! AFTER PAGE LOAD */ 6$( document ).ready(function() { 7 8 /*! LOCATION BUTTONS: When a Location Button is CLICKED, then AUTO-SCROLL to the point where the buttons are at the top of the screen. (A reference achor is placed above the button row.) */ 9 /*! For reference: http://jsfiddle.net/BjpWB/4/ */ 10 function scrollToAnchor(){ 11 var aTag = $("a[name='idLOCATION']"); 12 var scrollOffsetPosition = aTag.offset().top; 13 14 $('html,body').animate({scrollTop: scrollOffsetPosition}, 800); 15 } 16 $('#LOCATIONbtns .btn-location').on('click', function () { 17 setTimeout(scrollToAnchor, 10); /* This sets a time for when the scrollToAnchor() function will start. */ 18 // A brief delay gives time for a full click, esp on mobile. Helps ensure the user's fingers is no longer touching the screen when scroll begins (otherwise another link may be clicked during scroll) 19 // This anchor point is located at the top of the Button Row 20 21 // CANCEL THE ANIMATION if the user starts to scroll before the animation is complete // 22 $("html, body").on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function(){ 23 $(this).stop(); 24 }); 25 }); 26 27 /*! LOCATION BUTTONS: After hovering over an Location Button, after a slight delay, the cursor changes to the default arrow (instead of the pointer finger) */ 28 function pointer() { 29 $('#LOCATIONbtns .btn-location:not(.active)').removeClass('cursor-default'); 30 $('#LOCATIONbtns .btn-location.active').addClass('cursor-default'); 31 } 32 $('#LOCATIONbtns .btn-location').hover(function(){ 33 setTimeout(pointer, 2000); /* This sets a time for when the pointer() function will start */ 34 }); 35 36 /*! PARALAX BACKGROUND IMG */ 37 var video1element = $('#video1 .bg-parallax-element'); //// First target your parallax element 38 var img1element = $('#img1 .bg-parallax-element'); //// First target your parallax element 39 var img2element = $('#img2 .bg-parallax-element'); //// First target your parallax element 40 41 $(window).on('scroll', function () { 42 var scrollTop = $(window).scrollTop(); //// Measures how far down you've scrolled from top of page 43 44 var video1offset = video1element.offset().top, //// Measure how far the element is from the top 45 video1distance = (video1offset - scrollTop), //// Remove distance that was previously scrolled (above top of screen) 46 video1shift = (video1distance * -0.6); //// THIS IS THE SPEED OF MOVEMENT - Calculate a percentage value of the distance from the top (negative value shifts image UP) 47 48 var img1offset = img1element.offset().top, //// Measure how far the element is from the top 49 img1distance = (img1offset - scrollTop), //// Remove distance that was previously scrolled (above top of screen) 50 img1shift = (img1distance * -0.6); //// THIS IS THE SPEED OF MOVEMENT - Calculate a percentage value of the distance from the top (negative value shifts image UP) 51 52 var img2offset = img2element.offset().top, //// Measure how far the element is from the top 53 img2distance = (img2offset - scrollTop), //// Remove distance that was previously scrolled (above top of screen) 54 img2shift = (img2distance * -0.5); //// THIS IS THE SPEED OF MOVEMENT - Calculate a percentage value of the distance from the top (negative value shifts image UP) 55 56 video1element.css("margin-top", video1shift); 57 img1element.css("margin-top", img1shift); 58 img2element.css("margin-top", img2shift); 59 }); 60 /*! END PARALAX */ 61 62 /*! VIDEO LOADING - FADE IN (See top of this file, where video is initially hidden) */ 63 $('.video-wrap').fadeIn(3000); // Notice at the top of this file that the video is first hidden before 64}); 65
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.