https://www.coalicionporelevangelio.org/wp-content/themes/luther/js/templates/home.js?ver=1790877196
1(function ($) { 2 var bookSwiper = undefined; 3 var podcastSwiper = undefined; 4 var seriesSwiper = undefined; 5 var window_width = window.innerWidth; 6 $(window).on('load', function () { 7 }); 8 $(document).on('ready', function () { 9 initmobileBookSlider(); 10 initPodcastSlider(); 11 if ($('.podcast_wrapper .podcast_latest_card').length > 0) { 12 $('.podcast_wrapper .podcast_latest_card').matchHeight({ property: 'min-height', byRow: false, });//https://github.com/liabru/jquery-match-height 13 } 14 initmobileSeriesSlider(); 15 initdesktopVideoMovements(); 16 initmobileVideoPopups(); 17 //if ($('.most_read_section .most_read_card').length > 0) { 18 // $('.most_read_section .most_read_card').matchHeight({ property: 'min-height', byRow: false, }); 19 //} 20 matchHeightMostReadCards(); 21 22 latestInlineAdPlacement(); 23 if ($('.sections_section .section_cat_wrap .section_art_title_wrap').length > 0) { 24 $('.sections_section .section_cat_wrap .section_art_title_wrap').matchHeight({ property: 'min-height', byRow: false, }); 25 } 26 //resize 27 $(window).on('resize orientationchange', function () { 28 if (window_width != window.innerWidth) { 29 waitForFinalEvent(function () { 30 setTimeout(function () { 31 window_width = window.innerWidth; 32 initmobileBookSlider(); 33 initPodcastSlider(); 34 initmobileSeriesSlider(); 35 initdesktopVideoMovements(); 36 initmobileVideoPopups(); 37 38 matchHeightMostReadCards(); 39 }, 500); 40 }, 300, "re-init or destroy swiper on homepage resize"); 41 } 42 }); 43 }); 44 45 function matchHeightMostReadCards() { 46 if ($('.most_read_section .most_read_card').length > 0) { 47 $('.most_read_section .most_read_card').css('min-height','unset').matchHeight({ property: 'min-height', byRow: false, }); 48 } 49 } 50 51 52 function initmobileBookSlider() { 53 54 if ($(".book_slider").length > 0) { 55 56 if (bookSwiper !== undefined) { 57 bookSwiper.destroy(true, true); 58 bookSwiper = undefined; 59 } 60 if (bookSwiper == undefined) { 61 bookSwiper = new Swiper('.book_slider', { 62 effect: 'coverflow', 63 coverflowEffect: { 64 rotate: 0, 65 stretch: -15, 66 depth: 400, 67 modifier: 1, 68 slideShadows: false, 69 }, 70 keyboard: { 71 enabled: true, 72 }, 73 mousewheel: { 74 enabled: true, 75 eventsTarged: '.book_review', 76 sensitivity: 1, 77 }, 78 loop: true, 79 centeredSlides: true, 80 slidesPerView: 'auto', 81 spaceBetween: 15, 82 speed: 500, 83 calculateHeight: true, 84 //watchSlidesVisibility: true, 85 // lazy: true, 86 // preloadImages: false, 87 breakpoints: { 88 // when window width is >= #px 89 768: { 90 slidesPerView: 1, 91 spaceBetween: 45, 92 93 }, 94 } 95 }); 96 } 97 98 } 99 } 100 101 function initPodcastSlider() { 102 103 if ($(".podcast_slider").length > 0) { 104 if (podcastSwiper !== undefined) { 105 podcastSwiper.destroy(true, true); 106 podcastSwiper = undefined; 107 $('.podcast_slider .swiper-wrapper').removeAttr('style'); 108 $('.podcast_slider .swiper-slide').removeAttr('style'); 109 } 110 var screenWidth = window.innerWidth; 111 if (screenWidth < 768 && podcastSwiper == undefined) { 112 podcastSwiper = new Swiper('.podcast_slider', { 113 effect: 'coverflow', 114 coverflowEffect: { 115 rotate: 0, 116 stretch: -15, 117 depth: 400, 118 modifier: 1, 119 slideShadows: false, 120 }, 121 keyboard: { 122 enabled: true, 123 }, 124 mousewheel: { 125 enabled: true, 126 eventsTarged: '.podcast_wrapper', 127 sensitivity: 1, 128 }, 129 loop: true, 130 centeredSlides: true, 131 slidesPerView: 'auto', 132 spaceBetween: 15, 133 speed: 500, 134 calculateHeight: true 135 }); 136 } else if (screenWidth >= 768 && podcastSwiper == undefined) { 137 podcastSwiper = new Swiper('.podcast_slider', { 138 effect: 'slide', 139 keyboard: { 140 enabled: true, 141 }, 142 loop: false, 143 centeredSlides: false, 144 slidesPerView: 2, 145 spaceBetween: 0, 146 speed: 500, 147 calculateHeight: true, 148 breakpoints: { 149 1270: { 150 slidesPerView: 3, 151 }, 152 153 } 154 }); 155 } 156 157 } 158 } 159 160 function initmobileSeriesSlider() { 161 162 if ($(".series_slider").length > 0) { 163 if (seriesSwiper !== undefined) { 164 seriesSwiper.destroy(true, true); 165 seriesSwiper = undefined; 166 } 167 var screenWidth = window.innerWidth; 168 if (screenWidth < 768 && seriesSwiper == undefined) { 169 seriesSwiper = new Swiper('.series_slider', { 170 effect: 'coverflow', 171 coverflowEffect: { 172 rotate: 0, 173 stretch: -15, 174 depth: 400, 175 modifier: 1, 176 slideShadows: false, 177 }, 178 keyboard: { 179 enabled: true, 180 }, 181 mousewheel: { 182 enabled: true, 183 eventsTarged: '.series_wrapper', 184 sensitivity: 1, 185 }, 186 loop: true, 187 centeredSlides: true, 188 slidesPerView: 'auto', 189 spaceBetween: 15, 190 speed: 500, 191 calculateHeight: true, 192 193 }); 194 } else if (screenWidth >= 768 && seriesSwiper != undefined) { 195 seriesSwiper.destroy(); 196 seriesSwiper = undefined; 197 $('.series_slider .swiper-wrapper').removeAttr('style'); 198 $('.series_slider .swiper-slide').removeAttr('style'); 199 } 200 201 } 202 } 203 204 function initmobileVideoPopups() { 205 if ($(".vid_image").length > 0 && window.innerWidth < 768) { 206 $(".vid_image").on('click', function () { 207 if (window.innerWidth < 768) { 208 var vidsrc = ''; 209 var vid_iframe = $(this).find('iframe'); 210 var vid_wrapper = $(this).find('.fluid-width-video-wrapper'); 211 if (vid_wrapper.length > 0) { 212 vidsrc = vid_wrapper; 213 } else { 214 vidsrc = vid_iframe; 215 } 216 var vidcode = $(this).find('.vid-code'); 217 var vidimage = $(this).find('.vid-graphic'); 218 setTimeout(function () { 219 $.magnificPopup.open({ 220 items: { 221 src: vidsrc 222 }, 223 type: 'inline', 224 midClick: true, 225 mainClass: 'mfp-fade video-popup', 226 removalDelay: 600, 227 closeBtnInside: false, 228 callbacks: { 229 open: function () { 230 $(vidimage).show(); 231 }, 232 close: function () { 233 // Reset video on close: 234 if (vidcode.length > 0) { 235 $(vidcode).empty(); 236 $(vidimage).fadeIn(); 237 } 238 } 239 } 240 }); 241 }, 300); 242 } 243 }); 244 } 245 246 } 247 248 function initdesktopVideoMovements() { 249 if ($(".vid_image").length > 0 && window.innerWidth >= 768) { 250 $(".vid_image").on('click', function () { 251 var clicked_id = $(this).closest('article').attr('id'); 252 clicked_id = '#' + clicked_id; 253 var target_id = $('.video_player_wrap article').attr('id'); 254 $(clicked_id).swap({ 255 target: target_id, // Mandatory. The ID of the element we want to swap with 256 opacity: "0.25", // Optional. If set will give the swapping elements a translucent effect while in motion 257 speed: 300, // Optional. The time taken in milliseconds for the animation to occur 258 callback: function () { // Optional. Callback function once the swap is complete 259 //changing out vid iframes and cover images 260 $('.video_pool .vid').each(function () { 261 var vidcode = $(this).find('.vid-code'); 262 var vidimage = $(this).find('.vid-graphic'); 263 if (vidcode.length > 0) { 264 $(vidcode).empty(); 265 $(vidimage).fadeIn(); 266 } 267 268 }); 269 } 270 }); 271 }); 272 } 273 } 274 275 window.latestInlineAdPlacement = function latestInlineAdPlacement() { 276 if ($('.latest_articles .inline_ad.ad_hidden').length > 0) { 277 var inline_ad = $('.latest_articles .inline_ad.ad_hidden'); 278 var num_of_articles = $('.latest_articles').find('article').length; 279 $(inline_ad).each(function () { 280 var ad_placement = $(this).data('ad-placement'); 281 if (num_of_articles > 0) { 282 if (ad_placement <= num_of_articles) { 283 $('.latest_articles').find('article').eq(ad_placement - 1).after($(this).css('display', '').removeClass('ad_hidden').addClass('fadeup')); 284 } 285 } 286 }); 287 } 288 } 289 290})(jQuery); 291 292
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.