1(function (e) { 2 "use strict"; 3 var n = window.Thememattic_JS || {}; 4 n.stickyMenu = function () { 5 if (e(window).scrollTop() > 350) { 6 e("#masthead").addClass("nav-affix"); 7 } else { 8 e("#masthead").removeClass("nav-affix"); 9 } 10 }; 11 n.mobileMenu = { 12 init: function () { 13 this.toggleMenu(); 14 this.menuMobile(); 15 this.menuArrow(); 16 }, 17 toggleMenu: function () { 18 e('#masthead').on('click', '.toggle-menu', function (event) { 19 var ethis = e('.main-navigation .menu .menu-mobile'); 20 if (ethis.css('display') == 'block') { 21 ethis.slideUp('300'); 22 } else { 23 ethis.slideDown('300'); 24 } 25 e('.ham').toggleClass('exit'); 26 }); 27 e('#masthead .main-navigation ').on('click', '.menu-mobile a i', function (event) { 28 event.preventDefault(); 29 var ethis = e(this), 30 eparent = ethis.closest('li'), 31 esub_menu = eparent.find('> .sub-menu'); 32 if (esub_menu.css('display') == 'none') { 33 esub_menu.slideDown('300'); 34 ethis.addClass('active'); 35 } else { 36 esub_menu.slideUp('300'); 37 ethis.removeClass('active'); 38 } 39 return false; 40 }); 41 }, 42 menuMobile: function () { 43 if (e('.main-navigation .menu > ul').length) { 44 var ethis = e('.main-navigation .menu > ul'), 45 eparent = ethis.closest('.main-navigation'), 46 pointbreak = eparent.data('epointbreak'), 47 window_width = window.innerWidth; 48 if (typeof pointbreak == 'undefined') { 49 pointbreak = 991; 50 } 51 if (pointbreak >= window_width) { 52 ethis.addClass('menu-mobile').removeClass('menu-desktop'); 53 e('.main-navigation .toggle-menu').css('display', 'block'); 54 } else { 55 ethis.addClass('menu-desktop').removeClass('menu-mobile').css('display', ''); 56 e('.main-navigation .toggle-menu').css('display', ''); 57 } 58 } 59 }, 60 menuArrow: function () { 61 if (e('#masthead .main-navigation div.menu > ul').length) { 62 e('#masthead .main-navigation div.menu > ul .sub-menu').parent('li').find('> a').append('<i class="ion-ios-arrow-down">'); 63 } 64 } 65 }; 66 n.ThemematticWidgetsNav = function () { 67 68 if (e("body").hasClass("rtl")) { 69 e('.trending-news').sidr({ 70 name: 'sidr-nav', 71 side: 'right' 72 }); 73 } else { 74 e('.trending-news').sidr({ 75 name: 'sidr-nav', 76 side: 'left' 77 }); 78 } 79 80 e('.trending-news').click(function(){ 81 e('.sidr-class-sidr-button-close').focus(); 82 }); 83 84 e( '.tmt-canvas-focus' ).on( 'focus', function() { 85 e('.sidr-class-sidr-button-close').focus(); 86 } ); 87 88 e('.sidr-class-sidr-button-close').click(function () { 89 e.sidr('close', 'sidr-nav'); 90 e('.search-field').focus(); 91 }); 92 93 e(document).keyup(function(j) { 94 if (j.key === "Escape") { // escape key maps to keycode `27` 95 e.sidr('close', 'sidr-nav'); 96 e('.search-field').focus(); 97 } 98 }); 99 100 }; 101 n.thememattic_matchheight = function () { 102 e('.widget-area').theiaStickySidebar({ 103 additionalMarginTop: 30 104 }); 105 }; 106 n.DataBackground = function () { 107 var pageSection = e(".data-bg"); 108 pageSection.each(function (indx) { 109 if (e(this).attr("data-background")) { 110 e(this).css("background-image", "url(" + e(this).data("background") + ")"); 111 } 112 }); 113 e('.bg-image').each(function () { 114 var src = e(this).children('img').attr('src'); 115 e(this).css('background-image', 'url(' + src + ')').children('img').hide(); 116 }); 117 }; 118 n.SlickCarousel = function () { 119 e(".mainbanner-jumbotron").slick({ 120 slidesToShow: 1, 121 slidesToScroll: 1, 122 fade: true, 123 autoplay: true, 124 autoplaySpeed: 8000, 125 infinite: true, 126 dots: false, 127 nextArrow: '<i class="Thememattic-icon slide-icon slide-next ion-ios-arrow-right quaternary-bgcolor"></i>', 128 prevArrow: '<i class="Thememattic-icon slide-icon slide-prev ion-ios-arrow-left quaternary-bgcolor"></i>', 129 }); 130 e(".tm-slider-widget").slick({ 131 slidesToShow: 1, 132 slidesToScroll: 1, 133 fade: true, 134 autoplay: true, 135 autoplaySpeed: 8000, 136 infinite: true, 137 dots: false, 138 nextArrow: '<i class="Thememattic-icon slide-icon slide-next ion-ios-arrow-right quaternary-bgcolor"></i>', 139 prevArrow: '<i class="Thememattic-icon slide-icon slide-prev ion-ios-arrow-left quaternary-bgcolor"></i>', 140 }); 141 e('.trending-slider').slick({ 142 slidesToShow: 4, 143 slidesToScroll: 1, 144 dots: false,
145 arrows: false, 146 nextArrow: '<i class="Thememattic-icon slide-icon slide-next ion-ios-arrow-right quaternary-bgcolor"></i>', 147 prevArrow: '<i class="Thememattic-icon slide-icon slide-prev ion-ios-arrow-left quaternary-bgcolor"></i>', 148 focusOnSelect: true, 149 responsive: [ 150 { 151 breakpoint: 991, 152 settings: { 153 slidesToShow: 3, 154 slidesToScroll: 3, 155 arrows: true 156 } 157 }, 158 { 159 breakpoint: 768, 160 settings: { 161 slidesToShow: 2, 162 slidesToScroll: 2, 163 arrows: true 164 } 165 }, 166 { 167 breakpoint: 480, 168 settings: { 169 slidesToShow: 1, 170 slidesToScroll: 1, 171 arrows: true 172 } 173 } 174 ] 175 }); 176 e(".gallery-columns-1, ul.wp-block-gallery.columns-1, .wp-block-gallery.columns-1 .blocks-gallery-grid").each(function () { 177 e(this).slick({ 178 slidesToShow: 1, 179 slidesToScroll: 1, 180 fade: true, 181 autoplay: true, 182 autoplaySpeed: 8000, 183 infinite: true, 184 dots: false, 185 nextArrow: '<i class="Thememattic-icon slide-icon slide-next ion-ios-arrow-right quaternary-bgcolor"></i>', 186 prevArrow: '<i class="Thememattic-icon slide-icon slide-prev ion-ios-arrow-left quaternary-bgcolor"></i>', 187 }); 188 }); 189 }; 190 n.ImagePopup = function () { 191 e('.widget .gallery, .entry-content .gallery, .wp-block-gallery').each(function () { 192 e(this).magnificPopup({ 193 delegate: 'a', 194 type: 'image', 195 gallery: { 196 enabled: true 197 }, 198 zoom: { 199 enabled: true, 200 duration: 300, 201 opener: function (element) { 202 return element.find('img'); 203 } 204 } 205 }); 206 }); 207 }; 208 n.ThemematticMarquee = function () { 209 e('.marquee').marquee({ 210 direction: 'left', 211 speed: 1500, 212 pauseOnHover: true 213 }); 214 }; 215 n.Thememattic_preloader = function () { 216 217 e("body").addClass("page-loaded"); 218 219 }; 220 n.InnerBanner = function () { 221 var pageSection = e(".data-bg"); 222 pageSection.each(function (indx) { 223 if (e(this).attr("data-background")) { 224 e(this).css("background-image", "url(" + e(this).data("background") + ")"); 225 } 226 }); 227 }; 228 // SHOW/HIDE SCROLL UP // 229 n.show_hide_scroll_top = function () { 230 if (e(window).scrollTop() > e(window).height() / 2) { 231 e("#scroll-up").fadeIn(300); 232 } else { 233 e("#scroll-up").fadeOut(300); 234 } 235 }; 236 // SCROLL UP // 237 n.scroll_up = function () { 238 e("#scroll-up").on("click", function () { 239 e("html, body").animate({ 240 scrollTop: 0 241 }, 800); 242 return false; 243 }); 244 }; 245 246 e(window).load(function () { 247 n.Thememattic_preloader(); 248 }); 249 250 e(document).ready(function () { 251 n.mobileMenu.init(); 252 n.ThemematticWidgetsNav(); 253 n.DataBackground(); 254 n.SlickCarousel(); 255 n.ImagePopup(); 256 n.thememattic_matchheight(); 257 n.scroll_up(); 258 }); 259 e(window).scroll(function () { 260 n.stickyMenu(); 261 n.show_hide_scroll_top(); 262 }); 263 e(window).resize(function () { 264 n.mobileMenu.menuMobile(); 265 }); 266})(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.