1(function (e) { 2 "use strict"; 3 var n = window.AFTHRAMPES_JS || {}; 4 n.mobileMenu = { 5 init: function () { 6 this.toggleMenu(), this.menuMobile(), this.menuArrow(); 7 8 if (e('.aft-mobile-navigation').length) { 9 10 var navElement = document.querySelector(".aft-mobile-navigation"); 11 if (navElement) { 12 n.trapFocus(navElement); 13 } 14 15 16 } 17 }, 18 toggleMenu: function () { 19 e('#masthead').on('click', '.toggle-menu', function (event) { 20 var ethis = e('.main-navigation .menu .menu-mobile'); 21 if (ethis.css('display') == 'block') { 22 ethis.slideUp('300'); 23 } else { 24 ethis.slideDown('300'); 25 } 26 e('.ham').toggleClass('exit'); 27 }); 28 e('#masthead .main-navigation ').on('click', '.menu-mobile a button', function (event) { 29 event.preventDefault(); 30 var ethis = e(this), 31 eparent = ethis.closest('li'); 32 if (eparent.find('> .children').length) { 33 var esub_menu = eparent.find('> .children'); 34 } else { 35 var esub_menu = eparent.find('> .sub-menu'); 36 } 37 if (esub_menu.css('display') == 'none') { 38 esub_menu.slideDown('300'); 39 ethis.addClass('active'); 40 } else { 41 esub_menu.slideUp('300'); 42 ethis.removeClass('active'); 43 } 44 return false; 45 }); 46 }, 47 menuMobile: function () { 48 if (e('.main-navigation .menu > ul').length) { 49 var ethis = e('.main-navigation .menu > ul'), 50 eparent = ethis.closest('.main-navigation'), 51 pointbreak = eparent.data('epointbreak'), 52 window_width = window.innerWidth; 53 if (typeof pointbreak == 'undefined') { 54 pointbreak = 991; 55 } 56 if (pointbreak >= window_width) { 57 ethis.addClass('menu-mobile').removeClass('menu-desktop'); 58 e('.main-navigation .toggle-menu').css('display', 'block'); 59 e('.main-navigation').addClass('aft-mobile-navigation'); 60 } else { 61 ethis.addClass('menu-desktop').removeClass('menu-mobile').css('display', ''); 62 e('.main-navigation .toggle-menu').css('display', ''); 63 e('.main-navigation').removeClass('aft-mobile-navigation'); 64 } 65 } 66 }, 67 menuArrow: function () { 68 if (e('#masthead .main-navigation div.menu > ul').length) { 69 e('#masthead .main-navigation div.menu > ul .sub-menu').parent('li').find('> a').append('<button class="fa fa-angle-down">'); 70 e('#masthead .main-navigation div.menu > ul .children').parent('li').find('> a').append('<button class="fa fa-angle-down">'); 71 } 72 } 73 }, 74 75 n.trapFocus = function (element) { 76 77 78 var focusableEls = element.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'), 79 firstFocusableEl = focusableEls[0], 80 lastFocusableEl = focusableEls[focusableEls.length - 1], 81 KEYCODE_TAB = 9; 82 83 element.addEventListener('keydown', function (e) { 84 var isTabPressed = (e.key === 'Tab' || e.keyCode === KEYCODE_TAB); 85 86 if (!isTabPressed) { 87 return; 88 } 89 90 if (e.shiftKey) /* shift + tab */ { 91 if (document.activeElement === firstFocusableEl) {
92 lastFocusableEl.focus(); 93 e.preventDefault(); 94 } 95 } else /* tab */ { 96 if (document.activeElement === lastFocusableEl) { 97 firstFocusableEl.focus(); 98 e.preventDefault(); 99 } 100 } 101 102 }); 103 }, 104 105 n.DataBackground = function () { 106 var pageSection = e(".data-bg"); 107 pageSection.each(function (indx) { 108 if (e(this).attr("data-background")) { 109 e(this).css("background-image", "url(" + e(this).data("background") + ")"); 110 } 111 }); 112 e('.bg-image').each(function () { 113 var src = e(this).children('img').attr('src'); 114 e(this).css('background-image', 'url(' + src + ')').children('img').hide(); 115 }); 116 }, 117 n.setInstaHeight = function () { 118 e('.insta-slider-block').each(function () { 119 var img_width = e(this).find('.insta-item .af-insta-height').eq(0).innerWidth(); 120 e(this).find('.insta-item .af-insta-height').css('height', img_width); 121 }); 122 }, 123 n.Preloader = function () { 124 125 e('#loader-wrapper').fadeOut(); 126 e('#af-preloader').delay(500).fadeOut('slow'); 127 128 }, 129 n.Search = function () { 130 131 e(".af-search-click").on('click', function () { 132 e("#af-search-wrap").toggleClass("af-search-toggle"); 133 }); 134 135 }, 136 n.Offcanvas = function () { 137 e('#sidr').addClass('aft-mobile-off-canvas'); 138 var offCanvasElement = document.querySelector(".aft-mobile-off-canvas"); 139 if (offCanvasElement) { 140 n.trapFocus(offCanvasElement); 141 } 142 143 144 e('.offcanvas-nav').sidr({ 145 speed: 300, 146 side: 'left', 147 displace: false, 148 149 }); 150 e('.sidr-class-sidr-button-close').on('click', function () { 151 e.sidr('close', 'sidr'); 152 }); 153 }, 154 // SHOW/HIDE SCROLL UP // 155 n.show_hide_scroll_top = function () { 156 if (e(window).scrollTop() > e(window).height() / 2) { 157 e("#scroll-up").fadeIn(300); 158 } else { 159 e("#scroll-up").fadeOut(300); 160 } 161 }, 162 n.scroll_up = function () { 163 e("#scroll-up").on("click", function () { 164 e("html, body").animate({ 165 scrollTop: 0 166 }, 800); 167 return false; 168 }); 169 }, 170 n.MagnificPopup = function () { 171 e('div.zoom-gallery').magnificPopup({ 172 delegate: 'a.insta-hover', 173 type: 'image', 174 closeOnContentClick: false, 175 closeBtnInside: false, 176 mainClass: 'mfp-with-zoom mfp-img-mobile', 177 image: { 178 verticalFit: true, 179 titleSrc: function (item) { 180 return item.el.attr('title'); 181 } 182 }, 183 gallery: { 184 enabled: true 185 }, 186 zoom: { 187 enabled: true, 188 duration: 300, 189 opener: function (element) { 190 return element.find('img'); 191 } 192 } 193 }); 194 e('.gallery').each(function () { 195 e(this).magnificPopup({ 196 delegate: 'a', 197 type: 'image', 198 gallery: { 199 enabled: true 200 }, 201 zoom: { 202 enabled: true, 203 duration: 300, 204 opener: function (element) { 205 return element.find('img'); 206 } 207 } 208 }); 209 }); 210 211 e('.wp-block-gallery').each(function () { 212 e(this).magnificPopup({ 213 delegate: 'a', 214 type: 'image', 215 gallery: { 216 enabled: true 217 }, 218 zoom: { 219 enabled: true, 220 duration: 300, 221 opener: function (element) { 222 return element.find('img'); 223 } 224 } 225 }); 226 }); 227 }, 228 n.searchReveal = function () { 229 jQuery('.search-overlay .search-icon').on('click', function () { 230 jQuery(this).parent().toggleClass('reveal-search'); 231 return false;
232 }); 233 234 jQuery('body').on('click', function (e) { 235 if (jQuery(".search-overlay").hasClass('reveal-search')) { 236 var container = jQuery(".search-overlay"); 237 if (!container.is(e.target) && container.has(e.target).length === 0) { 238 container.removeClass('reveal-search'); 239 } 240 } 241 }); 242 243 244 }, 245 n.em_sticky = function () { 246 jQuery('.home #secondary.aft-sticky-sidebar').theiaStickySidebar({ 247 additionalMarginTop: 30 248 }); 249 }, 250 251 252 n.jQueryMarquee = function () { 253 e('.marquee.aft-flash-slide').marquee({ 254 //duration in milliseconds of the marquee 255 speed: 80000, 256 //gap in pixels between the tickers 257 gap: 0, 258 //time in milliseconds before the marquee will start animating 259 delayBeforeStart: 0, 260 //'left' or 'right' 261 // direction: 'right', 262 //true or false - should the marquee be duplicated to show an effect of continues flow 263 duplicated: true, 264 pauseOnHover: true, 265 startVisible: true 266 }); 267 }, 268 269 n.SliderAsNavFor = function () { 270 if (e('.banner-single-slider-1-wrap').hasClass("no-thumbnails")) { 271 return null; 272 } else { 273 return '.af-banner-slider-thumbnail'; 274 } 275 }, 276 n.RtlCheck = function () { 277 if (e('body').hasClass("rtl")) { 278 return true; 279 } else { 280 return false; 281 } 282 }, 283 284 n.SlickSliderControls = function (widgetClass, controlWrap) { 285 var widgetID = e(widgetClass).parents('.morenews-widget').attr('id'); 286 console.log(widgetID); 287 return e(widgetID).find(controlWrap); 288 }, 289 290 n.checkThumbOption = function () { 291 if (e('.hasthumbslide').hasClass('side')) { 292 return '.af-post-slider-thumbnail'; 293 } else { 294 return false; 295 } 296 }, 297 298 //slick slider 299 n.SlickBannerCarousel = function () { 300 301 302 e(".af-banner-carousel-1").not('.slick-initialized').slick({ 303 autoplay: true, 304 autoplaySpeed: 5000, 305 infinite: true, 306 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 307 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 308 appendArrows: e('.af-main-navcontrols'), 309 rtl: n.RtlCheck(), 310 311 }); 312 313 314 }, 315 316 //Slick Carousel 317 n.SlickTrendingVerticalCarousel = function () { 318 319 320 e(".aft-horizontal-trending-part .banner-vertical-slider").not('.slick-initialized').slick({ 321 slidesToShow: 2, 322 slidesToScroll: 1, 323 autoplaySpeed: 7000, 324 autoplay: true, 325 infinite: true, 326 loop: true, 327 dots: false, 328 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 329 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 330 appendArrows: ('.af-trending-navcontrols'), 331 responsive: [ 332 333 { 334 breakpoint: 600, 335 settings: { 336 slidesToShow: 1, 337 draggable: false, 338 swipeToSlide: false, 339 touchMove: false, 340 swipe: false 341 } 342 } 343 ] 344 }); 345 346 347 e(".aft-4-trending-posts .banner-vertical-slider").not('.slick-initialized').slick({ 348 slidesToShow: 4, 349 slidesToScroll: 1, 350 autoplay: true, 351 infinite: true, 352 loop: true, 353 vertical: true, 354 verticalSwiping: true, 355 dots: false, 356 nextArrow: '<span class="slide-icon slide-next icon-up fas fa-angle-up"></span>', 357 prevArrow: '<span class="slide-icon slide-prev icon-down fas fa-angle-down"></span>',
358 appendArrows: e('.af-trending-navcontrols'), 359 responsive: [ 360 { 361 breakpoint: 1025, 362 settings: { 363 slidesToShow: 2, 364 slidesToScroll: 1, 365 vertical: false, 366 verticalSwiping: false, 367 draggable: false, 368 swipeToSlide: false, 369 touchMove: false, 370 swipe: false, 371 rtl: n.RtlCheck(), 372 } 373 }, 374 { 375 breakpoint: 600, 376 settings: { 377 draggable: false, 378 swipeToSlide: false, 379 touchMove: false, 380 swipe: false 381 } 382 } 383 ] 384 }); 385 386 387 e(".banner-thumb-carousel").not('.slick-initialized').slick({ 388 slidesToShow: 2, 389 slidesToScroll: 1, 390 autoplay: true, 391 autoplaySpeed: 8000, 392 infinite: true, 393 loop: true, 394 dots: false, 395 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 396 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 397 appendArrows: e('.af-thumb-navcontrols'), 398 rtl: n.RtlCheck(), 399 responsive: [ 400 { 401 breakpoint: 480, 402 settings: { 403 slidesToShow: 1, 404 slidesToScroll: 1 405 } 406 } 407 ] 408 }); 409 }, 410 411 n.SlickWidgetPostSlider = function () { 412 e(".af-widget-post-slider").each(function () { 413 e(this).not('.slick-initialized').slick({ 414 slidesToShow: 1, 415 slidesToScroll: 1, 416 autoplay: true, 417 autoplaySpeed: 5000, 418 infinite: true, 419 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 420 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 421 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-post-slider-navcontrols'), 422 rtl: n.RtlCheck(), 423 }); 424 }); 425 426 }, 427 428 //Slick Carousel 429 n.SlickCarousel = function () { 430 e(".af-featured-post-carousel").each(function () { 431 e(this).not('.slick-initialized').slick({ 432 slidesToShow: 4, 433 slidesToScroll: 1, 434 autoplay: true, 435 autoplaySpeed: 5000, 436 infinite: true, 437 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 438 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 439 appendArrows: e('.af-widget-featured-post-carousel-navcontrols'), 440 rtl: n.RtlCheck(), 441 responsive: [ 442 { 443 breakpoint: 1025, 444 settings: { 445 slidesToShow: 3, 446 slidesToScroll: 3 447 } 448 }, 449 { 450 breakpoint: 769, 451 settings: { 452 slidesToShow: 2, 453 slidesToScroll: 2 454 } 455 }, 456 { 457 breakpoint: 600, 458 settings: { 459 slidesToShow: 1, 460 slidesToScroll: 1 461 } 462 }, 463 { 464 breakpoint: 480, 465 settings: { 466 slidesToShow: 1, 467 slidesToScroll: 1 468 } 469 } 470 ] 471 }); 472 }); 473 }, 474 475 n.WidgetSlickCarousel = function () { 476 e("#secondary .af-widget-post-carousel").each(function () { 477 e(this).not('.slick-initialized').slick({ 478 slidesToShow: 1, 479 slidesToScroll: 1, 480 autoplay: true, 481 autoplaySpeed: 5000, 482 infinite: true, 483 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 484 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
485 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-post-carousel-navcontrols'), 486 rtl: n.RtlCheck(), 487 responsive: [ 488 489 { 490 breakpoint: 900, 491 settings: { 492 slidesToShow: 2, 493 slidesToScroll: 2 494 } 495 }, 496 { 497 breakpoint: 480, 498 settings: { 499 slidesToShow: 1, 500 slidesToScroll: 1 501 } 502 } 503 ] 504 }); 505 }); 506 507 e(".primary-footer .af-widget-post-carousel").each(function () { 508 e().not('.slick-initialized').slick({ 509 slidesToShow: 1, 510 slidesToScroll: 1, 511 autoplay: true, 512 autoplaySpeed: 5000, 513 infinite: true, 514 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 515 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 516 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-post-carousel-navcontrols'), 517 rtl: n.RtlCheck(), 518 }); 519 }); 520 521 e("#sidr .af-widget-post-carousel").each(function () { 522 e(this).not('.slick-initialized').slick({ 523 slidesToShow: 1, 524 slidesToScroll: 1, 525 autoplay: true, 526 autoplaySpeed: 5000, 527 infinite: true, 528 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 529 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 530 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-post-carousel-navcontrols'), 531 rtl: n.RtlCheck(), 532 }); 533 }); 534 535 e(".morenews_posts_carousel_widget .af-widget-post-carousel").each(function () { 536 e(this).not('.slick-initialized').slick({ 537 slidesToShow: 3, 538 slidesToScroll: 1, 539 autoplay: true, 540 autoplaySpeed: 5000, 541 infinite: true, 542 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 543 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 544 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-post-carousel-navcontrols'), 545 rtl: n.RtlCheck(), 546 responsive: [ 547 { 548 breakpoint: 1025, 549 settings: { 550 slidesToShow: 2, 551 slidesToScroll: 2 552 } 553 }, 554 { 555 breakpoint: 769, 556 settings: { 557 slidesToShow: 2, 558 slidesToScroll: 2 559 } 560 }, 561 { 562 breakpoint: 600, 563 settings: { 564 slidesToShow: 1, 565 slidesToScroll: 1 566 } 567 }, 568 { 569 breakpoint: 480, 570 settings: { 571 slidesToShow: 1, 572 slidesToScroll: 1 573 } 574 } 575 ] 576 }); 577 }); 578 }, 579 580 581 n.SlickWidgetTrendingVerticalCarousel = function () { 582 583 e(".body.full-width-content #primary .af-trending-widget-carousel").each(function () { 584 e(this).not('.slick-initialized').slick({ 585 slidesToShow: 3, 586 slidesToScroll: 1, 587 autoplay: true, 588 infinite: true, 589 loop: true, 590 dots: false, 591 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 592 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
593 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-trending-carousel-navcontrols'), 594 rtl: n.RtlCheck(), 595 responsive: [ 596 { 597 breakpoint: 1025, 598 settings: { 599 slidesToShow: 2, 600 draggable: false, 601 swipeToSlide: false, 602 touchMove: false, 603 swipe: false 604 605 } 606 }, 607 { 608 breakpoint: 600, 609 settings: { 610 slidesToShow: 1, 611 draggable: false, 612 swipeToSlide: false, 613 touchMove: false, 614 swipe: false 615 616 } 617 } 618 ] 619 }); 620 }); 621 622 623 e("#primary .af-trending-widget-carousel").each(function () { 624 e(this).not('.slick-initialized').slick({ 625 slidesToShow: 2, 626 slidesToScroll: 1, 627 autoplay: true, 628 infinite: true, 629 loop: true, 630 dots: false, 631 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 632 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 633 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-trending-carousel-navcontrols'), 634 rtl: n.RtlCheck(), 635 responsive: [ 636 637 { 638 breakpoint: 600, 639 settings: { 640 slidesToShow: 1, 641 draggable: false, 642 swipeToSlide: false, 643 touchMove: false, 644 swipe: false 645 } 646 } 647 ] 648 }); 649 }); 650 651 e(".af-trending-widget-carousel").each(function () { 652 e(this).not('.slick-initialized').slick({ 653 slidesToShow: 5, 654 slidesToScroll: 1, 655 autoplay: true, 656 infinite: true, 657 loop: true, 658 vertical: true, 659 verticalSwiping: true, 660 dots: false, 661 nextArrow: '<span class="slide-icon slide-next icon-up fas fa-angle-up"></span>', 662 prevArrow: '<span class="slide-icon slide-prev icon-down fas fa-angle-down"></span>', 663 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-trending-carousel-navcontrols'), 664 responsive: [ 665 { 666 breakpoint: 1025, 667 settings: { 668 slidesToShow: 2, 669 slidesToScroll: 1, 670 vertical: false, 671 verticalSwiping: false, 672 draggable: false, 673 swipeToSlide: false, 674 touchMove: false, 675 swipe: false, 676 rtl: n.RtlCheck(), 677 } 678 }, 679 { 680 breakpoint: 600, 681 settings: { 682 draggable: false, 683 swipeToSlide: false, 684 touchMove: false, 685 swipe: false 686 } 687 } 688 ] 689 }); 690 }); 691 692 }, 693 694 n.SlickWidgetPopularVerticalCarousel = function () { 695 e(".body.full-width-content #primary .af-popular-widget-carousel").each(function () { 696 e(this).not('.slick-initialized').slick({ 697 slidesToShow: 3, 698 slidesToScroll: 1, 699 autoplay: true, 700 infinite: true, 701 loop: true, 702 dots: false, 703 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 704 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>',
705 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-popular-carousel-navcontrols'), 706 rtl: n.RtlCheck(), 707 responsive: [ 708 { 709 breakpoint: 1025, 710 settings: { 711 slidesToShow: 2, 712 draggable: false, 713 swipeToSlide: false, 714 touchMove: false, 715 swipe: false 716 717 } 718 }, 719 { 720 breakpoint: 600, 721 settings: { 722 slidesToShow: 1, 723 draggable: false, 724 swipeToSlide: false, 725 touchMove: false, 726 swipe: false 727 728 } 729 } 730 ] 731 }); 732 }); 733 734 e("#primary .af-popular-widget-carousel").each(function () { 735 e(this).not('.slick-initialized').slick({ 736 slidesToShow: 2, 737 slidesToScroll: 1, 738 autoplay: true, 739 infinite: true, 740 loop: true, 741 dots: false, 742 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 743 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 744 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-popular-carousel-navcontrols'), 745 rtl: n.RtlCheck(), 746 responsive: [ 747 748 { 749 breakpoint: 600, 750 settings: { 751 slidesToShow: 1, 752 draggable: false, 753 swipeToSlide: false, 754 touchMove: false, 755 swipe: false 756 } 757 } 758 ] 759 }); 760 }); 761 762 e(".af-popular-widget-carousel").each(function () { 763 e(this).not('.slick-initialized').slick({ 764 slidesToShow: 5, 765 slidesToScroll: 1, 766 autoplay: true, 767 infinite: true, 768 loop: true, 769 vertical: true, 770 verticalSwiping: true, 771 dots: false, 772 nextArrow: '<span class="slide-icon slide-next icon-up fas fa-angle-up"></span>', 773 prevArrow: '<span class="slide-icon slide-prev icon-down fas fa-angle-down"></span>', 774 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-popular-carousel-navcontrols'), 775 responsive: [ 776 { 777 breakpoint: 1025, 778 settings: { 779 slidesToShow: 2, 780 slidesToScroll: 1, 781 vertical: false, 782 verticalSwiping: false, 783 draggable: false, 784 swipeToSlide: false, 785 touchMove: false, 786 swipe: false, 787 rtl: n.RtlCheck(), 788 } 789 }, 790 { 791 breakpoint: 600, 792 settings: { 793 draggable: false, 794 swipeToSlide: false, 795 touchMove: false, 796 swipe: false 797 } 798 } 799 ] 800 }); 801 }); 802 803 }, 804 //Video thumbnail
805 n.YouTubeThumbnail = function () { 806 807 808 e(".af-youtube-video-carousel").not('.slick-initialized').slick({ 809 slidesToShow: 3, 810 slidesToScroll: 1, 811 loop: true, 812 infinite: true, 813 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 814 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 815 appendArrows: e('.af-widget-featured-video-carousel-navcontrols'), 816 rtl: n.RtlCheck(), 817 responsive: [ 818 { 819 breakpoint: 1025, 820 settings: { 821 slidesToShow: 2, 822 slidesToScroll: 1, 823 infinite: true, 824 } 825 }, 826 { 827 breakpoint: 600, 828 settings: { 829 slidesToShow: 1, 830 slidesToScroll: 1 831 } 832 } 833 ] 834 835 }); 836 837 838 e(".af-youtube-slider").each(function () { 839 e(this).not('.slick-initialized').slick({ 840 slidesToShow: 1, 841 slidesToScroll: 1, 842 loop: true, 843 infinite: true, 844 nextArrow: '<span class="slide-icon slide-next icon-right fas fa-angle-right"></span>', 845 prevArrow: '<span class="slide-icon slide-prev icon-left fas fa-angle-left"></span>', 846 appendArrows: e(this).parents('.morenews-widget').find('.af-widget-youtube-video-navcontrols'), 847 fade: true, 848 rtl: n.RtlCheck(), 849 asNavFor: e(this).parents('.morenews-widget').find('.af-youtube-slider-thumbnail') 850 851 }); 852 }); 853 854 e(".af-youtube-slider-thumbnail").each(function () { 855 e(this).not('.slick-initialized').slick({ 856 slidesToShow: 3, 857 slidesToScroll: 1, 858 loop: true, 859 vertical: true, 860 verticalSwiping: true, 861 infinite: true, 862 dots: false, 863 arrows: false, 864 focusOnSelect: true, 865 asNavFor: e(this).parents('.morenews-widget').find('.af-youtube-slider'), 866 responsive: [ 867 { 868 breakpoint: 1025, 869 settings: { 870 slidesToShow: 3, 871 slidesToScroll: 1, 872 infinite: true, 873 } 874 }, 875 { 876 breakpoint: 600, 877 settings: { 878 slidesToShow: 2, 879 slidesToScroll: 1, 880 vertical: false, 881 verticalSwiping: false, 882 } 883 } 884 ] 885 }); 886 }); 887 888 /*JS FOR FEATURED SECTION THUMBNAILS*/ 889 e('.entry-header-yt-thumbnail').on('click', function (evt) { 890 if (e(this).parents('.primary-video').find('.entry-header-yt-thumbnail').hasClass('af-hide-item')) { 891 e(this).parents('.primary-video').find('.entry-header-yt-iframe').addClass('af-hide-item'); 892 e(this).parents('.primary-video').find('.entry-header-yt-thumbnail').removeClass('af-hide-item'); 893 e(this).parents('.primary-video').find('.vid_frame').attr('src', ''); 894 } 895 896 e(this).parents('.entry-header-yt-video-container').find('.entry-header-yt-iframe').removeClass('af-hide-item'); 897 e(this).parents('.entry-header-yt-video-container').find('.entry-header-yt-thumbnail').addClass('af-hide-item'); 898 e(this).css('padding-top', 0); 899 var video_link = e(this).attr('data-video-link'); 900 e(this).parent().find('.vid_frame').attr('src', video_link); 901 e(".vid-container").fitVids(); 902 }); 903 904 e('.featured-yt-sec .slick-arrow').on('click', function (evt) { 905 if (e(this).parents('.primary-video').find('.entry-header-yt-thumbnail').hasClass('af-hide-item')) { 906 e(this).parents('.primary-video').find('.entry-header-yt-iframe').addClass('af-hide-item'); 907 e(this).parents('.primary-video').find('.entry-header-yt-thumbnail').removeClass('af-hide-item'); 908 e(this).parents('.primary-video').find('.vid_frame').attr('src', ''); 909 } 910 }); 911 912 /*JS FOR WIDGET SECTION THUMBNAILS*/ 913 e('.widget-yt-thumbnail').on('click', function (evt) { 914 915 916 if (e(this).parents('.secondary-video').find('.widget-yt-thumbnail').hasClass('af-hide-item')) { 917 918 e(this).parents('.secondary-video').find('.widget-yt-iframe').removeClass('af-hide-frame'); 919 e(this).parents('.secondary-video').find('.widget-yt-thumbnail').addClass('af-hide-frame'); 920 e(this).parents('.secondary-video').find('.vid_frame').attr('src', ''); 921 } 922 923 924 e(this).parents('.secondary-video').find('.widget-yt-iframe').removeClass('af-hide-frame'); 925 e(this).parents('.secondary-video').find('.widget-yt-thumbnail').addClass('af-hide-frame'); 926 e(this).css('padding-top', 0); 927 var video_link = e(this).attr('data-video-link'); 928 e(this).parent().find('.vid_frame').attr('src', video_link); 929 //e(".vid-container").fitVids(); 930 931 }); 932 933 e('.slick-arrow').on('click', function (evt) { 934 if (e(this).parents('.secondary-video').find('.widget-yt-thumbnail').hasClass('af-hide-item')) { 935 e(this).parents('.secondary-video').find('.entry-header-yt-iframe').addClass('af-hide-item'); 936 e(this).parents('.secondary-video').find('.entry-header-yt-thumbnail').removeClass('af-hide-item'); 937 e(this).parents('.secondary-video').find('.vid_frame').attr('src', ''); 938 } 939 }); 940 941 942 }, 943 944 945 n.MasonryBlog = function () { 946 if (e('.aft-masonry-archive-posts').length > 0) { 947 jQuery('.aft-masonry-archive-posts').masonry(); 948 } 949 } 950 951 952 e(document).ready(function () { 953 n.mobileMenu.init(), 954 n.setInstaHeight(), 955 n.em_sticky(), 956 n.jQueryMarquee(), 957 n.MagnificPopup(), 958 n.Offcanvas(), 959 n.searchReveal(), 960 n.scroll_up(), 961 n.SlickBannerCarousel(), 962 n.SlickWidgetPostSlider(), 963 n.WidgetSlickCarousel(), 964 n.SlickCarousel(), 965 n.SlickTrendingVerticalCarousel(), 966 n.SlickWidgetTrendingVerticalCarousel(), 967 n.SlickWidgetPopularVerticalCarousel(),
968 n.YouTubeThumbnail(); 969 970 }), e(window).scroll(function () { 971 972 n.show_hide_scroll_top(); 973 }), e(window).load(function () { 974 n.DataBackground(), 975 n.MasonryBlog(), 976 n.Preloader(), 977 n.Search(); 978 }), 979 e(window).resize(function () { 980 n.mobileMenu.menuMobile(); 981 }); 982 983})(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.