1 2(function ($) { 3 4 5 // Add Shadow to Nav ON Scroll 6 7 function scrollNav() { 8 var scroll = $(window).scrollTop(); 9 10 if (scroll >= 50) { 11 12 $("header.fixed-top").addClass('isScroll'); 13 } else { 14 $("header.fixed-top").removeClass('isScroll'); 15 } 16 } 17 scrollNav(); 18 $(window).on('scroll', function () { 19 scrollNav(); 20 }); 21 22 // Skip to Main Content Animation 23 $('a[href="#main"] ').on('click', function () { 24 $('html,body').animate({ scrollTop: ($('#main').offset().top - 136) }, 1500); 25 return false; 26 }); 27 28 //Back to Top Button 29 var btn = $('#backToTop'); 30 31 $(window).scroll(function () { 32 if ($(window).scrollTop() > 300) { 33 btn.removeClass('d-none'); 34 } else { 35 btn.addClass('d-none'); 36 } 37 }); 38 39 btn.on('click', function (e) { 40 e.preventDefault(); 41 $('html,body').animate({ scrollTop: ($('#backTop').offset().top - 136) }, 1500); 42 }); 43 44 // Navbar Parent Link Clickable 45 // if ($(window).width() > 769) { 46 $('.navbar .dropdown').on('hover', function () { 47 $(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown(); 48 49 }, function () { 50 $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp(); 51 52 }); 53 54 $('.navbar .dropdown > a').on('click', function () { 55 location.href = this.href; 56 }); 57 58 // } 59 60 61 // Gets the video src from the data-src on each button 62 var $showDelay = '#videoPlayer .embed-responsive, #videoPlayer .modal-title, #videoPlayer .modal-footer .fs-small'; 63 var $videoSrc; 64 var $videoTitle; 65 var $videoLength; 66 $('.video-btn').click(function () { 67 $videoSrc = $(this).data("src"); 68 $videoTitle = $(this).data("title"); 69 $videoLength = $(this).data("length"); 70 $($showDelay).css('opacity', '0'); 71 }); 72 // console.log($videoSrc); 73 74 75 76 // when the modal is opened autoplay it 77 $('#videoPlayer').on('shown.bs.modal', function (e) { 78 79 // set the video src to autoplay and not to show related video. 80 $("#video").attr('src', $videoSrc); 81 $("#videoTitle").html($videoTitle); 82 $("#videoLength").html($videoLength); 83 setTimeout( 84 function () { 85 $($showDelay).css('opacity', '1'); 86 }, 1350); 87 88 }) 89 90 91 92 // stop playing the youtube video when I close the modal 93 $('#videoPlayer').on('hide.bs.modal', function (e) { 94 $("#video").attr('src', $videoSrc); 95 $("#videoTitle").html('Watch Video'); 96 $($showDelay).css('opacity', '0'); 97 }) 98 99 100 var owlPrevious = '<button class="btn btn-outline-dark btn-sm"> <span class="sr-only"> Previous </span> <i class="fas fa-long-arrow-alt-left"></i></button>'; 101 var owlNext = '<button class="btn btn-outline-dark btn-sm"> <span class="sr-only"> Next </span> <i class="fas fa-long-arrow-alt-right"></i></button>'; 102 103 // Video Gallery Carousel 104 105 $('.owl-video-carousel').owlCarousel({ 106 loop: false, 107 lazyLoad: false, 108 // slideSpeed: 300, 109 paginationSpeed: 400, 110 margin: 26, 111 nav: true, 112 items: 1, 113 smartSpeed: 500, 114 autoplay: true, 115 autoplayTimeout: 20000, 116 autoplayHoverPause: true, 117 navText: [owlPrevious, owlNext], 118 responsive: { 119 0: { 120 items: 1, 121 slideBy: 1, 122 autoplay: false, 123 124 }, 125 768: { 126 items: 2, 127 slideBy: 2, 128 autoplay: true, 129 }, 130 992: { 131 items: 3, 132 slideBy: 1, 133 autoplay: true, 134 }, 135 } 136 }); 137 138 //Go through each carousel on the page 139 $('.owl-carousel').each(function() { 140 console.log ('found owl'); 141 //Find each set of dots in this carousel 142 $(this).find('.owl-dot').each(function(index) { 143 //Add one to index so it starts from 1 144 $(this).attr('aria-label', index + 1); 145 console.log ('found dot' + (index + 1)); 146 }); 147 148 149 }); 150 151 152 // Logo Carousel 153 154 $('.owl-logo-carousel').owlCarousel({ 155 loop: true, 156 lazyLoad: false, 157 // slideSpeed: 300, 158 paginationSpeed: 400, 159 margin: 26, 160 nav: true, 161 items: 1, 162 smartSpeed: 500, 163 autoplay: true, 164 autoplayTimeout: 5000, 165 autoplayHoverPause: true, 166 navText: [owlPrevious, owlNext], 167 responsive: { 168 0: { 169 items: 1, 170 slideBy: 1, 171 autoplay: false, 172 173 }, 174 768: { 175 items: 2, 176 slideBy: 2, 177 autoplay: true, 178 }, 179 992: { 180 items: 3, 181 slideBy: 1, 182 autoplay: true, 183 }, 184 1200: { 185 items: 4, 186 slideBy: 1, 187 autoplay: true, 188 }, 189 } 190 }); 191 192 }(jQuery)); 193 194 195 196
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.