1(function($) { 2 "use strict"; 3 4 5 jQuery(document).ready(function ($) { 6 7 var sidemenuoption = $('.sidemenuoption'); 8 var menuoption_open = $('.sidemenuoption-open'); 9 var menuoption_close = $('.menuoption-close'); 10 var overlay = $('.body-overlay'); 11 var is_closed = true; 12 menuoption_open.on('click', function(e) { 13 e.preventDefault(); 14 if (is_closed == true) { 15 is_closed = false; 16 sidemenuoption.removeClass('themelazer-close'); 17 sidemenuoption.addClass('themelazer-open'); 18 overlay.addClass('overlay-show'); 19 } else { 20 is_closed = true; 21 sidemenuoption.removeClass('themelazer-open'); 22 sidemenuoption.addClass('themelazer-close'); 23 overlay.removeClass('overlay-show'); 24 } 25 }); 26 menuoption_close.add(overlay).on('click', function(e) { 27 e.preventDefault(); 28 sidemenuoption.removeClass('themelazer-open'); 29 sidemenuoption.addClass('themelazer-close'); 30 overlay.removeClass('overlay-show'); 31 is_closed = true; 32 }); 33 34 }); 35 36 37 var ennlilWidgetsScripts = function( $scope, $ ) { 38 39 // Init 40 initFlickity(); 41 42 setTimeout(() => { 43 $('#flickity-thumbs').flickity('reloadCells'); 44 }, 500); 45 46 /* Flickity Slider 47 -------------------------------------------------------*/ 48 function initFlickity() { 49 50 // 1st carousel, main 51 $('#theme-flickity-box-slider').flickity({ 52 cellAlign: 'left', 53 contain: true, 54 pageDots: false, 55 prevNextButtons: true, 56 draggable: false, 57 fade: true, 58 imagesLoaded: true, 59 }); 60 61 // 2nd carousel, navigation 62 $('#flickity-thumbs').flickity({ 63 cellAlign: 'left', 64 asNavFor: '#theme-flickity-box-slider', 65 imagesLoaded: true, 66 contain: true, 67 pageDots: false, 68 prevNextButtons: false, 69 // draggable: false 70 }); 71 72 } 73 74 } 75 76 $(window).on('elementor/frontend/init', function () { 77 elementorFrontend.hooks.addAction('frontend/element_ready/global', ennlilWidgetsScripts); 78 }); 79 80 81 82 jQuery('.mainmenu ul.menu').slicknav({ 83 allowParentLinks: true, 84 prependTo: '.ennlil-responsive-menu', 85 }); 86 87 /* ----------------------------------------------------------- */ 88 /* Sticky Header 89 /* ----------------------------------------------------------- */ 90 $(window).on('scroll', function () { 91 92 /**Fixed header**/ 93 if ($(window).scrollTop() > 250) { 94 $('.navbar-sticky').addClass('sticky fade_down_effect'); 95 } else { 96 $('.navbar-sticky').removeClass('sticky fade_down_effect'); 97 } 98}); 99 100 101 jQuery(window).load(function() { 102 jQuery("#preloader").fadeOut(); 103 }); 104 105 106 jQuery(window).load(function() { 107 108 if (jQuery('.frontpage-slider-two').length) { 109 jQuery('.frontpage-slider-two').owlCarousel({ 110 center: true, 111 items: 2, 112 autoplay: false, 113 autoplayTimeout: 3000, 114 smartSpeed: 800, 115 loop: true, 116 margin: 20, 117 singleItem : true, 118 dots: false, 119 nav: true, 120 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 121 responsive: { 122 280: { 123 items: 1 124 }, 125 576: { 126 items: 2 127 }, 128 768: { 129 items: 2 130 } 131 } 132 }); 133 } 134 135 136 if (jQuery('.main-slider').length) { 137 jQuery('.main-slider').owlCarousel({ 138 items: 1, 139 loop: true, 140 autoplay: false, 141 autoplayTimeout: 3000, 142 autoplayHoverPause: true, 143 mouseDrag: true, 144 smartSpeed: 1100, 145 margin: 30, 146 dots: true, 147 nav: false, 148 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 149 responsive: { 150 280: { 151 items: 1 152 }, 153 576: { 154 items: 1 155 }, 156 768: { 157 items: 1 158 } 159 } 160 }); 161 } 162 163 164 if (jQuery('.widget-post-slider').length) { 165 jQuery('.widget-post-slider').owlCarousel({ 166 items: 1, 167 loop: true, 168 autoplay: false, 169 autoplayTimeout: 3000, 170 autoplayHoverPause: true, 171 mouseDrag: true, 172 smartSpeed: 1100, 173 margin: 0, 174 dots: true, 175 nav: false, 176 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 177 responsive: { 178 280: { 179 items: 1 180 }, 181 576: { 182 items: 1 183 }, 184 768: { 185 items: 1 186 } 187 } 188 }); 189 } 190 191 192 /* ----------------------------------------------------------- */ 193 /* Trending Slider 194 /* ----------------------------------------------------------- */ 195 196 197 if (jQuery('.trending-slider').length > 0) { 198 jQuery('.trending-slider').owlCarousel({ 199 dots: false, 200 items: 4, 201 autoplay: false, 202 margin: 30, 203 reponsiveClass: true, 204 nav: true, 205 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 206 autoplayHoverPause: true, 207 loop:true, 208 responsive: { 209 // breakpoint from 0 up 210 0: { 211 items: 1, 212 }, 213 // breakpoint from 480 up 214 480: { 215 items: 1, 216 }, 217 // breakpoint from 768 up 218 768: { 219 items: 2, 220 }, 221 // breakpoint from 768 up 222 1200: { 223 items: 4, 224 } 225 } 226 }); 227} 228 229}); 230 231 /* ----------------------------------------------------------- */ 232 /* Video popup 233 /* ----------------------------------------------------------- */ 234 235 if ($('.video-play-btn').length > 0) { 236 $('.video-play-btn').magnificPopup({ 237 type: 'iframe', 238 mainClass: 'mfp-with-zoom', 239 zoom: { 240 enabled: true, // By default it's false, so don't forget to enable it 241 242 duration: 300, // duration of the effect, in milliseconds 243 easing: 'ease-in-out', // CSS transition easing function 244 245 opener: function (openerElement) { 246 return openerElement.is('img') ? openerElement : openerElement.find('img'); 247 } 248 } 249 }); 250} 251 252if ($('.ennlil_video_post_Button').length > 0) {
253 $('.ennlil_video_post_Button').magnificPopup({ 254 type: 'iframe', 255 mainClass: 'mfp-with-zoom', 256 zoom: { 257 enabled: true, // By default it's false, so don't forget to enable it 258 259 duration: 300, // duration of the effect, in milliseconds 260 easing: 'ease-in-out', // CSS transition easing function 261 262 opener: function (openerElement) { 263 return openerElement.is('img') ? openerElement : openerElement.find('img'); 264 } 265 } 266 }); 267} 268 269 270 271 // Search Popup JS 272 $('.close-btn').on('click',function() { 273 $('.search_box__Wrap').fadeOut(); 274 $('.search-btn').show(); 275 $('.close-btn').removeClass('active'); 276 }); 277 $('.search-btn').on('click',function() { 278 $(this).hide(); 279 $('.search_box__Wrap').fadeIn(); 280 $('.close-btn').addClass('active'); 281 }); 282 283 $(".popular-grid-slider").owlCarousel( 284 { 285 items: 2, 286 dots: false, 287 loop: true, 288 nav: true, 289 margin: 30, 290 navText: ["<i class='fa fa-angle-left'></i>", "<i class='fa fa-angle-right'></i>"], 291 responsive: { 292 // breakpoint from 0 up 293 0: { 294 items: 1, 295 }, 296 // breakpoint from 480 up 297 480: { 298 items: 2, 299 }, 300 // breakpoint from 768 up 301 768: { 302 items: 2, 303 }, 304 // breakpoint from 768 up 305 1200: { 306 items: 2, 307 } 308 } 309 } 310 ); 311 312 313 314 /* ----------------------------------------------------------- */ 315 /* Back to top 316 /* ----------------------------------------------------------- */ 317 318 $(window).scroll(function () { 319 if ($(this).scrollTop() > 300) { 320 $('.backto').fadeIn(); 321 } else { 322 $('.backto').fadeOut(); 323 } 324 }); 325 326 // scroll body to 0px on click 327 $('.backto').on('click', function () { 328 $('.backto').tooltip('hide'); 329 $('body,html').animate({ 330 scrollTop: 0 331 }, 800); 332 return false; 333 }); 334 335 $('.backto').tooltip('hide'); 336 337 338 setTimeout(function() 339 { 340 $('#preloader').delay(150).fadeOut('slow'); 341 }, 10000); 342 343 344 345 346jQuery(window).load(function() { 347 348 var galleryThumbs = new Swiper('.gallery-thumbs', { 349 spaceBetween: 10, 350 slidesPerView: 4, 351 loop: true, 352 freeMode: true, 353 loopedSlides: 5, //looped slides should be the same 354 watchSlidesVisibility: true, 355 watchSlidesProgress: true, 356 virtualTranslate: true, 357 358 359 breakpoints: { 360 // when window width is >= 320px 361 320: { 362 slidesPerView: 1, 363 spaceBetween: 10 364 }, 365 // when window width is >= 480px 366 480: { 367 slidesPerView: 2, 368 spaceBetween: 10 369 }, 370 // when window width is >= 640px 371 640: { 372 slidesPerView: 2, 373 spaceBetween: 10 374 }, 375 376 991: { 377 slidesPerView: 3, 378 spaceBetween: 10 379 }, 380 381 1300: { 382 slidesPerView: 4, 383 spaceBetween: 10 384 } 385 386 387 } 388 389 390 391 392 }); 393 394 395 396 397 398 var galleryTop = new Swiper('.gallery-top', { 399 spaceBetween: 10, 400 loop:true, 401 loopedSlides: 5, //looped slides should be the same 402 navigation: { 403 nextEl: '.swiper-button-next', 404 prevEl: '.swiper-button-prev', 405 }, 406 effect: 'fade', 407 thumbs: { 408 swiper: galleryThumbs, 409 }, 410 }); 411 412}); 413 414 415 /* ----------------------------------------------------------- */ 416 /* Sticky Header 417 /* ----------------------------------------------------------- */ 418 419 $(window).on("scroll", function () { 420 421 if ( $( '#theme-header' ).hasClass( "stick-top" ) ) { 422 423 if ($(window).scrollTop() > 200) { 424 $(".site-navigation").addClass("sticky animated slideInDown"); 425 } else { 426 $(".site-navigation").removeClass("sticky animated slideInDown"); 427 } 428 } 429 430 if ( $( '#common-theme-header' ).hasClass( "stick-top" ) ) { 431 432 if ($(window).scrollTop() > 200) { 433 $(".header-three-area").addClass("sticky animated slideInDown"); 434 } else { 435 $(".header-three-area").removeClass("sticky animated slideInDown"); 436 } 437 } 438 439 if ( $( '#common-theme-header-four' ).hasClass( "stick-top" ) ) { 440 441 if ($(window).scrollTop() > 200) { 442 $(".header-three-area").addClass("sticky animated slideInDown"); 443 } else { 444 $(".header-three-area").removeClass("sticky animated slideInDown"); 445 } 446 } 447 448 449 }); 450 451 452 //Create the cookie object 453 var cookieStorage = {
454 setCookie: function setCookie(key, value, time, path) { 455 var expires = new Date(); 456 expires.setTime(expires.getTime() + time); 457 var pathValue = ''; 458 if (typeof path !== 'undefined') { 459 pathValue = 'path=' + path + ';'; 460 } 461 document.cookie = key + '=' + value + ';' + pathValue + 'expires=' + expires.toUTCString(); 462 }, 463 getCookie: function getCookie(key) { 464 var keyValue = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)'); 465 return keyValue ? keyValue[2] : null; 466 }, 467 removeCookie: function removeCookie(key) { 468 document.cookie = key + '=; Max-Age=0; path=/'; 469 } 470 }; 471 472 //Click on dark mode icon. Add dark mode classes and wrappers. Store user preference through sessions 473 $('.wpnm-button').click(function() { 474 //Show either moon or sun 475 $('.wpnm-button').toggleClass('active'); 476 //If dark mode is selected 477 if ($('.wpnm-button').hasClass('active')) { 478 //Add dark mode class to the body 479 $('body').addClass('dark-mode'); 480 cookieStorage.setCookie('yonkovNightMode', 'true', 2628000000, '/'); 481 } else { 482 $('body').removeClass('dark-mode'); 483 setTimeout(function() { 484 cookieStorage.removeCookie('yonkovNightMode'); 485 }, 100); 486 } 487 }) 488 489 //Check Storage. Display user preference 490 if (cookieStorage.getCookie('yonkovNightMode')) { 491 $('body').addClass('dark-mode'); 492 $('.wpnm-button').addClass('active'); 493 } 494 495 496 497 498 499 500 501 502})(jQuery);
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.