1jQuery(function ($) { 2 3 'use strict'; 4 5 // Mean Menu 6 jQuery('.mean-menu').meanmenu({ 7 meanScreenWidth: "1099" 8 }); 9 10 // Sticky Navbar 11 $(window).on('scroll', function() { 12 if ($(this).scrollTop() > 50) { 13 $('.main-nav').addClass('is-sticky'); 14 } else { 15 $('.main-nav').removeClass('is-sticky'); 16 } 17 }); 18 19 $(function() { 20 $('body').addClass('pre-loaded'); 21 }); 22 23 // magnific-popup 24 $(".video-modal").magnificPopup({ 25 disableOn: 0, 26 type: 'iframe', 27 mainClass: 'mfp-fade', 28 removalDelay: 160, 29 preloader: false, 30 fixedContentPos: false 31 }); 32 33 // modal 34 $(".modal-action").click(function() { 35 var modal_action = $(this).attr("data-modal-action"); 36 $(".modal-wrapper[data-modal-wrapper=" + modal_action + "]").addClass("modal-wrapper-active"); 37 }) 38 39 $(".modal-close").click(function() { 40 var modal_close = $(this).attr("data-modal-close"); 41 $(".modal-wrapper[data-modal-wrapper=" + modal_close + "]").removeClass("modal-wrapper-active"); 42 }) 43 44 // language-option 45 $(".nav-language-option").each(function() { 46 var each = $(this) 47 each.find(".lang-compo").html(each.find(".language-dropdown-menu a:nth-child(1)").html()); 48 var allOptions = $(".language-dropdown-menu").children('a'); 49 each.find(".language-dropdown-menu").on("click", "a", function() { 50 allOptions.removeClass('selected'); 51 $(this).addClass('selected'); 52 $(this).closest(".nav-language-option").find(".lang-compo").html($(this).html()); 53 }); 54 }) 55 56 // home-feature-carousel 57 $('.home-feature-carousel').owlCarousel({ 58 loop: false, 59 margin: 35, 60 nav: true, 61 navText: [ 62 "<span class='flaticon-left-arrow'></span>", 63 "<span class='flaticon-right-arrow'></span>" 64 ], 65 dots: false, 66 smartSpeed: 2500, 67 68 responsive:{ 69 70 0: { 71 items: 1 72 }, 73 74 768: { 75 items: 2 76 }, 77 78 1000: { 79 items: 3 80 } 81 } 82 }) 83 84 // counter -> homepage 1 85 $('.counter').counterUp({ 86 delay: 10, 87 time: 1000 88 }); 89 90 // home-client-carousel 91 $('.client-carousel').owlCarousel({ 92 loop: false, 93 margin: 0, 94 nav: false, 95 dots: false, 96 smartSpeed: 1500, 97 98 responsive:{ 99 100 0: { 101 items: 1 102 }, 103 104 768: { 105 items: 1 106 }, 107 108 1000: { 109 items: 1 110 } 111 } 112 }) 113 114 // carousel -> control 115 var clientCarousel = $('.client-carousel'); 116 clientCarousel.owlCarousel(); 117 $(".carousel-control-item-left").click(function () { 118 clientCarousel.trigger('next.owl.carousel'); 119 }) 120 $(".carousel-control-item-right").click(function () { 121 clientCarousel.trigger('prev.owl.carousel'); 122 }) 123 124 // carousel -> home client 2 125 var carousel1 = $(".client-details-carousel"); 126 var carousel2 = $(".client-thumbnail-carousel"); 127 128 var syncedSecondary = true; 129 130 carousel1.owlCarousel({ 131 items: 1,
132 slideSpeed: 8000, 133 nav: true, 134 autoplay: false, 135 dots: false, 136 loop: true, 137 animateIn: 'fadeIn', 138 animateOut: 'fadeOut', 139 navText: [ 140 "<span class='flaticon-left-arrow'></span>", 141 "<span class='flaticon-right-arrow'></span>" 142 ], 143 }).on('changed.owl.carousel', syncPosition); 144 145 carousel2 146 .on('initialized.owl.carousel', function() { 147 carousel2.find(".owl-item").eq(0).addClass("current"); 148 }) 149 .owlCarousel({ 150 dots: false, 151 nav: false, 152 smartSpeed: 200, 153 slideSpeed: 500, 154 slideBy: 4, 155 responsive: { 156 157 0: { 158 items: 1, 159 }, 160 161 768: { 162 items: 2, 163 }, 164 165 992: { 166 items: 3, 167 }, 168 169 1200: { 170 items: 4, 171 } 172 173 // 1600: { 174 // items: 5, 175 // }, 176 } 177 }).on('changed.owl.carousel', syncPosition2); 178 179 function syncPosition(el) { 180 var count = el.item.count - 1; 181 var current = Math.round(el.item.index - (el.item.count / 2) - .5); 182 183 if (current < 0) { 184 current = count; 185 } 186 if (current > count) { 187 current = 0; 188 } 189 190 //end block 191 carousel2 192 .find(".owl-item") 193 .removeClass("current") 194 .eq(current) 195 .addClass("current"); 196 var onscreen = carousel2.find('.owl-item.active').length - 1; 197 var start = carousel2.find('.owl-item.active').first().index(); 198 var end = carousel2.find('.owl-item.active').last().index(); 199 200 if (current > end) { 201 carousel2.data('owl.carousel').to(current, 100, true); 202 } 203 if (current < start) { 204 carousel2.data('owl.carousel').to(current - onscreen, 100, true); 205 } 206 } 207 208 function syncPosition2(el) { 209 if (syncedSecondary) { 210 var number = el.item.index; 211 carousel1.data('owl.carousel').to(number, 100, true); 212 } 213 } 214 215 carousel2.on("click", ".owl-item", function(e) { 216 e.preventDefault(); 217 var number = $(this).index(); 218 carousel1.data('owl.carousel').to(number, 300, true); 219 }); 220 221 // home-logo-carousel 222 $('.home-logo-carousel').owlCarousel({ 223 loop: true, 224 margin: 50, 225 nav: false, 226 dots: false, 227 autoplay: true, 228 autoplayHoverPause: true, 229 autoplayTimeout: 2520, 230 smartSpeed: 1500, 231 232 responsive:{ 233 234 0: { 235 items: 2 236 }, 237 238 768: { 239 items: 3 240 }, 241 242 1000: { 243 items: 5 244 } 245 } 246 }) 247 248 // home-business-carousel-2 249 $('.business-carousel').owlCarousel({ 250 loop: false, 251 margin: 25, 252 nav: false, 253 dots: false, 254 smartSpeed: 1500, 255 navText: [ 256 "<span class='flaticon-left-arrow'></span>", 257 "<span class='flaticon-right-arrow'></span>" 258 ], 259 260 responsive:{ 261 262 0: { 263 items: 1 264 }, 265 266 768: { 267 items: 1 268 }, 269 270 1000: { 271 items: 1 272 } 273 } 274 }) 275 276 // faq-accordion 277 $(".faq-accordion-header").click(function() { 278 279 $(this).parent(".faq-accordion-item").toggleClass("faq-accordion-item-active").siblings().removeClass("faq-accordion-item-active") 280 }) 281 282 // authentication-tab 283 $(".authentication-tab-item").click(function() { 284 var tab_modal = $(this).attr("data-authentcation-tab"); 285 $(this).addClass("authentication-tab-active").siblings().removeClass("authentication-tab-active"); 286 $(".authentication-tab-details-item[data-authentcation-details=" +tab_modal+ "]").addClass("authentication-tab-details-active").siblings().removeClass("authentication-tab-details-active"); 287 }) 288 289 // Subscribe form 290 $(".newsletter-form").validator().on("submit", function(event) { 291 if (event.isDefaultPrevented()) { 292 // handle the invalid form... 293 formErrorSub(); 294 submitMSGSub(false, "Please enter your email correctly."); 295 } else { 296 // everything looks good! 297 event.preventDefault(); 298 } 299 }); 300 301 function callbackFunction(resp) { 302 if (resp.result === "success") { 303 formSuccessSub(); 304 } else { 305 formErrorSub(); 306 } 307 } 308 309 function formSuccessSub() { 310 $(".newsletter-form")[0].reset(); 311 submitMSGSub(true, "Thank you for subscribing!"); 312 setTimeout(function() { 313 $("#validator-newsletter").addClass('hide'); 314 }, 4000) 315 } 316 317 function formErrorSub() { 318 $(".newsletter-form").addClass("animate__animated animate__shakeX"); 319 setTimeout(function() { 320 $(".newsletter-form").removeClass("animate__animated animate__shakeX"); 321 }, 1000) 322 } 323 324 function submitMSGSub(valid, msg) { 325 if (valid) { 326 var msgClasses = "validation-success"; 327 } else { 328 var msgClasses = "validation-danger"; 329 } 330 $("#validator-newsletter").removeClass().addClass(msgClasses).text(msg); 331 } 332 333 334}($)); 335 336 337// function to set a given theme/color-scheme 338function setTheme(themeName) { 339 localStorage.setItem('aila_theme', themeName); 340 document.documentElement.className = themeName; 341} 342 343// function to toggle between light and dark theme 344function toggleTheme() { 345 if (localStorage.getItem('aila_theme') === 'theme-dark') { 346 setTheme('theme-light'); 347 } else { 348 setTheme('theme-dark'); 349 } 350} 351 352// Immediately invoked function to set the theme on initial load 353(function () { 354 if (localStorage.getItem('aila_theme') === 'theme-dark') { 355 setTheme('theme-dark'); 356 document.getElementById('slider').checked = false;
357 } else { 358 setTheme('theme-light'); 359 document.getElementById('slider').checked = true; 360 } 361})();
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.