1jQuery(document).ready(function($) { 2 3 // Initialize HoverIntent with your desired options 4 $(".nav-primary ul li.menu-item-has-children").hoverIntent({ 5 over: function () { 6 // Code to run when the mouse enters the element 7 $(this).addClass("hovered-class"); 8 }, 9 out: function () { 10 // Code to run when the mouse leaves the element 11 $(this).removeClass("hovered-class"); 12 }, 13 // You can customize delay options here 14 timeout: 200, // Adjust this value as needed 15 sensitivity: 10 16 }); 17 18 19 20 21 $('a[href^="#"]').bind('click.smoothscroll', function(e) { 22 e.preventDefault(); 23 var target = this.hash, 24 $target = $(target); 25 26 $('html, body').stop().animate({ 27 'scrollTop': $target.offset().top + 100 28 }, 900, 'swing', function() { 29 window.location.hash = target; 30 }); 31 }); 32 if ($(window.location.hash).length > 0) { 33 $('html, body').animate({ 34 scrollTop: $(window.location.hash).offset().top+100 35 }, 1000); 36 } 37 38 $('#audio-control-desk').click(function() { 39 if ($("#videodesktop").prop('muted')) { 40 $("#videodesktop").prop("volume", 0.4); 41 $("#videodesktop").prop('muted', false); 42 $(this).toggleClass('muted'); 43 } else { 44 $("#videodesktop").prop('muted', true); 45 $(this).toggleClass('muted'); 46 } 47 }); 48 /* 49 $(".nav-primary .menu-item-has-children").hover(function() { 50 var e = $(this), 51 i = $(this).children(".sub-menu"); 52 TweenMax.fromTo(i, .2, { 53 transform: "translate3d(0, 1em, 0)", 54 ease: Power1.easeInOut 55 }, {
56 autoAlpha: 1, 57 transform: "translate3d(0, 0, 0)", 58 onComplete: function() { 59 e.addClass("sub-menu-active") 60 } 61 }) 62 }, function() { 63 var e = $(this), 64 i = e.children(".sub-menu"); 65 TweenMax.to(i, .2, { 66 ease: Power1.easeInOut, 67 autoAlpha: 0, 68 transform: "translate3d(0, 1em, 0)", 69 onComplete: function() { 70 e.removeClass("sub-menu-active") 71 } 72 }) 73 }); 74 */ 75 //$('h5.latest-blog-title').matchHeight(); 76 //$('.latest-blog-excerpt').matchHeight(); 77 $('.latest-posts').slick({ 78 slidesToShow: 3, 79 slidesToScroll: 1, 80 autoplay: true, 81 autoplaySpeed: 2000, 82 responsive: [{ 83 breakpoint: 960, 84 settings: { 85 slidesToShow: 2 86 } 87 }, 88 { 89 breakpoint: 768, 90 settings: { 91 arrows: false, 92 slidesToShow: 1 93 } 94 } 95 ] 96 }); 97 $('.slider-case-studies').slick({ 98 dots: false, 99 infinite: false, 100 speed: 300, 101 slidesToShow: 1, 102 slidesToScroll: 1, 103 centerMode: false, 104 variableWidth: true, 105 autoplay: false 106}); 107$(".prev-btn").click(function () { 108 $(".slider-case-studies").slick("slickPrev"); 109}); 110 111$(".next-btn").click(function () { 112 $(".slider-case-studies").slick("slickNext"); 113}); 114$(".prev-btn").addClass("slick-disabled"); 115$(".slider-case-studies").on("afterChange", function () { 116 if ($(".slick-prev").hasClass("slick-disabled")) { 117 $(".prev-btn").addClass("slick-disabled"); 118 } else { 119 $(".prev-btn").removeClass("slick-disabled"); 120 } 121 if ($(".slick-next").hasClass("slick-disabled")) { 122 $(".next-btn").addClass("slick-disabled"); 123 } else { 124 $(".next-btn").removeClass("slick-disabled"); 125 } 126}); 127 128 129 $('iframe[src*="youtube"]').parent().fitVids(); 130 131 $('.openmainnav').click(function() { 132 $('html').toggleClass('sliding-navbar-initiated'); 133 $('.sliding-navbar').toggleClass('sliding-navbar--open'); 134 $('.mask').toggleClass('show') 135 $('.openmainnav').toggleClass('menu-opened'); 136 }); 137 138 $('.mask').click(function() { 139 $('html').toggleClass('sliding-navbar-initiated'); 140 $('.sliding-navbar').toggleClass('sliding-navbar--open'); 141 $('.mask').removeClass('show'); 142 $('.openmainnav').toggleClass('menu-opened'); 143 }) 144 145 /* 146 jQuery(document).on("click", ".openmainnav", function(e) { 147 jQuery(".responsive-menu-header").slideToggle(); 148 jQuery('.responsive-menu-header').toggleClass("openedmenu"); 149 }); 150 jQuery(document).on("click", ".closemenu", function(e) { 151 jQuery(".responsive-menu-header").slideToggle(); 152 jQuery('.responsive-menu-header').toggleClass("openedmenu"); 153 }); 154 */ 155 /* 156 jQuery(".menu-item-has-children > a").click(function(event) { 157 event.preventDefault(); 158 jQuery(this).parent().children('.sub-menu').slideToggle(); 159 jQuery(this).next('.toggle-btn').children().toggleClass("fa-chevron-down fa-chevron-up"); 160 }); 161 */ 162 $('body').on('click', '.sf-menu > li', function(event) { 163 164 if (!$(this).hasClass('active')) { 165 jQuery('.sf-menu li').removeClass('active'); 166 $(this).addClass('active'); 167 //event.preventDefault(); 168 } else { 169 return true; 170 } 171 }); 172 $('body').on('click', '.toggle-btn', function(event) { 173 event.preventDefault(); 174 if ($(this).parent().parent().hasClass("sub-menu")) { 175 jQuery(this).next('.sub-menu').slideToggle(); 176 jQuery(this).toggleClass("menu-open"); 177 jQuery(this).parent().toggleClass('open-submenu'); 178 } else { 179 if ($(this).hasClass("menu-open")) { 180 jQuery(this).next('.sub-menu').slideToggle(); 181 jQuery(this).toggleClass("menu-open"); 182 jQuery(this).parent().removeClass('open-branch'); 183 184 jQuery('.open-submenu .toggle-btn').toggleClass("menu-open"); 185 jQuery('.open-submenu .sub-menu').slideToggle(); 186 jQuery('.open-submenu').removeClass('open-submenu'); 187 188 } else { 189 jQuery('.open-branch > .sub-menu').slideToggle(); 190 jQuery('.open-branch > .toggle-btn').toggleClass("menu-open"); 191 jQuery('.menu-item').removeClass('open-branch'); 192 jQuery(this).next('.sub-menu').slideToggle(); 193 jQuery(this).toggleClass("menu-open"); 194 jQuery(this).parent().addClass('open-branch'); 195 196 jQuery('.open-submenu .toggle-btn').toggleClass("menu-open"); 197 jQuery('.open-submenu .sub-menu').slideToggle(); 198 jQuery('.open-submenu').removeClass('open-submenu'); 199 } 200 } 201 }); 202}); 203jQuery(window).load(function() { 204 var currentmain; 205 var currentsubmenu; 206 var total; 207 currentmain = jQuery('.fullwidthmenu > ul.sub-menu:visible').outerHeight(); 208 currentsubmenu = jQuery('.fullwidthmenu > ul li.current-menu-ancestor ul.sub-menu:visible').outerHeight(); 209 total = currentmain + currentsubmenu; 210 jQuery('.main-content-area .container').css("paddingTop", total + "px"); 211}); 212jQuery(window).on('resize', function() { 213 var currentmain; 214 var currentsubmenu; 215 var total; 216 currentmain = jQuery('.fullwidthmenu > ul.sub-menu:visible').outerHeight(); 217 currentsubmenu = jQuery('.fullwidthmenu > ul li.current-menu-ancestor ul.sub-menu:visible').outerHeight(); 218 total = currentmain + currentsubmenu; 219 jQuery('.main-content-area .container').css("paddingTop", total + "px"); 220}); 221/* 222jQuery(window).scroll(function() { 223 if (jQuery(this).scrollTop() > 280) { 224 jQuery('body').addClass("sticky"); 225 } else { 226 jQuery('body').removeClass("sticky"); 227 } 228}); 229*/ 230 231/* 232const showAnim = gsap.from('.top-bar-header', { 233 yPercent: -100, 234 paused: true, 235 duration: 2 236}).progress(1); 237 238 239ScrollTrigger.create({ 240 start: "top top", 241 end: 99999, 242 onUpdate: (self) => { 243 self.direction === -1 ? showAnim.play() : showAnim.reverse() 244 } 245}); 246*/ 247function initScrollDirectionIndicator() { 248 // GSAP Plugins 249 gsap.registerPlugin(ScrollTrigger); 250 251 /*---------------------------- 252 Elements 253 ----------------------------*/ 254 255 const body = document.querySelector('body'); 256 257 /*---------------------------- 258 Fixed Nav 259 ----------------------------*/ 260 ScrollTrigger.create({ 261 markers: false, 262 trigger: body, 263 start: 'top -200px', 264 onUpdate: self => { 265 if (self.direction === 1) { 266 if (jQuery("body").hasClass("scrolling-active")) { 267 body.classList.remove('scrolling-up'); 268 body.classList.add('scrolling-active'); 269 body.classList.add('scrolling-down'); 270 } else { 271 body.classList.add('scrolling-down'); 272 body.classList.remove('scrolling-up'); 273 } 274 275 } else { 276 //showAnim.reverse(); 277 body.classList.add('scrolling-active'); 278 body.classList.add('scrolling-up'); 279 body.classList.remove('scrolling-down'); 280 } 281 }, 282 onLeaveBack: () => { 283 //showAnim.reverse(); 284 body.classList.remove('scrolling-active'); 285 body.classList.remove('scrolling-up'); 286 }, 287 }); 288} 289 290/*------------------------------- 291Init 292-------------------------------*/ 293 294document.addEventListener('DOMContentLoaded', event => { 295 initScrollDirectionIndicator(); 296});
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.