1(function ($) { 2 'use strict'; 3 4 if (typeof $.fn.slick !== 'function') { 5 console.error('Homepage carousels: Slick is not loaded.'); 6 return; 7 } 8 9 // ========================================================= 10 // 1ST CAROUSEL CARDS 11 // ========================================================= 12 13 const card1Slides = [ 14 { 15 href: "/products/aed-units/philips/m5066a-heartstart-onsite", 16 img: "/wp-content/uploads/philips-heartstart-onsite-rr-400x400.jpg", 17 imgAlt: "Philips Heartstart Onsite AED", 18 title: "Philips Heartstart Onsite AED", 19 price: "$1,589.00", 20 ctaText: "Add to Cart", 21 ctaHref: "/products/aed-units/philips/m5066a-heartstart-onsite" 22 }, 23 { 24 href: "/products/aed-units/zoll-aed-plus/", 25 img: "/wp-content/uploads/zoll-aed-plus-rr-400x400.jpg", 26 imgAlt: "ZOLL AED Plus Featuring Real CPR Help", 27 title: "ZOLL AED Plus", 28 price: "$2,082.00", 29 ctaText: "Add to Cart", 30 ctaHref: "/products/aed-units/zoll-aed-plus/" 31 }, 32 { 33 href: "/products/aed-units/philips/861304-heartstart-frx", 34 img: "/wp-content/uploads/philips-heartstart-frx-rr-400x400.jpg", 35 imgAlt: "Philips Heartstart FRx", 36 title: "Philips Heartstart FRx", 37 price: "$2,010.00", 38 ctaText: "Add to Cart", 39 ctaHref: "/products/aed-units/philips/861304-heartstart-frx" 40 }, 41 { 42 href: "/products/aed-units/lifeline-aed/", 43 img: "/wp-content/uploads/defibtech-lifeline-aed-rr-400x400.jpg", 44 imgAlt: "Defibtech Lifeline AED", 45 title: "Defibtech Lifeline AED", 46 price: "$1,523.80", 47 ctaText: "Add to Cart", 48 ctaHref: "/products/aed-units/lifeline-aed/" 49 }, 50 /* 51 { 52 href: "/products/aed-units/heartsine/samaritan-pad-350p-360p", 53 img: "/wp-content/uploads/heartsine-samaritan-pad-350p-rr-400x400.jpg", 54 imgAlt: "Heartsine Samaritan PAD 350P / 360P", 55 title: "Heartsine Samaritan PAD 350P / 360P", 56 price: "$1,411.00", 57 ctaText: "Add to Cart", 58 ctaHref: "/products/aed-units/heartsine/samaritan-pad-350p-360p" 59 }, 60 */ 61 { 62 href: "/products/aed-units/physio-control-lifepak-cr2", 63 img: "/wp-content/uploads/physio-lifepak-cr2-rr-400x400.jpg", 64 imgAlt: "Physio Control LIFEPAK CR2", 65 title: "Physio Control LIFEPAK CR2", 66 price: "$1,411.00", 67 ctaText: "Add to Cart", 68 ctaHref: "/products/aed-units/physio-control-lifepak-cr2" 69 }, 70 { 71 href: "/products/aed-units/zoll-aed-3", 72 img: "/wp-content/uploads/zoll-aed-3-rr-1-400x400.jpg", 73 imgAlt: "ZOLL AED 3 With Real CPR Help", 74 title: "ZOLL AED 3", 75 price: "$2,399.00", 76 ctaText: "Add to Cart", 77 ctaHref: "/products/aed-units/zoll-aed-3" 78 }, 79 { 80 href: "/products/aed-units/powerheart-g5-aed/", 81 img: "/wp-content/uploads/cs-powerheart-g5-rr-400x400.jpg", 82 imgAlt: "Cardiac Science Powerheart G5 AED", 83 title: "Cardiac Science Powerheart G5 AED", 84 price: "$2,157.00", 85 ctaText: "Add to Cart", 86 ctaHref: "/products/aed-units/powerheart-g5-aed/" 87 } 88 ]; 89 90 function renderCard1(item) { 91 return ` 92 <div class="card"> 93 <div class="card-img"> 94 <a href="${item.href}"> 95 <img src="${item.img}" alt="${item.imgAlt || ''}"> 96 </a> 97 </div> 98 <div class="card-name"> 99 <a href="${item.href}"> 100 <h5>${item.title}</h5> 101 </a> 102 </div> 103 <div class="card-price"> 104 <p>${item.price}</p> 105 </div> 106 <div class="card-link"> 107 <a href="${item.ctaHref || '#'}">${item.ctaText || 'View'}</a> 108 </div> 109 </div> 110 `; 111 } 112 113 const $card1 = $('.shop-aeds-carousel'); 114 115 if ($card1.length) { 116 if ($card1.hasClass('slick-initialized')) { 117 $card1.slick('unslick'); 118 } 119 120 $card1.empty();
121 card1Slides.forEach(function (item) { 122 $card1.append(renderCard1(item)); 123 }); 124 125 $card1.slick({ 126 slidesToShow: 3, 127 slidesToScroll: 1, 128 arrows: false, 129 dots: false, 130 infinite: true, 131 responsive: [ 132 { 133 breakpoint: 1300, 134 settings: { 135 slidesToShow: 2, 136 slidesToScroll: 1 137 } 138 }, 139 { 140 breakpoint: 900, 141 settings: { 142 slidesToShow: 1, 143 slidesToScroll: 1 144 } 145 } 146 ] 147 }); 148 149 $('#carousel-1-left-arrow') 150 .off('click.homepageSlick') 151 .on('click.homepageSlick', function () { 152 $card1.slick('slickPrev'); 153 }); 154 155 $('#carousel-1-right-arrow') 156 .off('click.homepageSlick') 157 .on('click.homepageSlick', function () { 158 $card1.slick('slickNext'); 159 }); 160 } 161 162 // ========================================================= 163 // 2ND CAROUSEL CARDS 164 // ========================================================= 165 166 const card2Slides = [ 167 { 168 href: "/products/complete-aed-packages/philips-heartstart-onsite", 169 img: "/wp-content/uploads/philips-heartstart-onsite-complete-aed-defibrillator-package-mobile-400x400.jpg", 170 imgAlt: "Philips Heartstart OnSite Complete AED Package", 171 badges: ["Best Selling"], 172 title: "Philips Heartstart OnSite Complete AED Package", 173 price: "$1,609.00", 174 desc: "Includes Philips HeartStart OnSite AED, a wall cabinet, and a double-sided AED sign to store, display, and quickly locate the AED when needed.", 175 ctaText: "Add to Cart", 176 ctaHref: "/products/complete-aed-packages/philips-heartstart-onsite" 177 }, 178 { 179 href: "/products/complete-aed-packages/zoll-aed-plus", 180 img: "/wp-content/uploads/zoll-aed-plus-complete-defibrillator-package-mobile-400x400.jpg", 181 imgAlt: "ZOLL AED Plus With Real CPR Help Complete AED Package", 182 badges: ["Best Selling"], 183 title: "ZOLL AED Plus With Real CPR Help Complete AED Package", 184 price: "$2,132.00", 185 desc: "Includes ZOLL AED Plus Featuring Real CPR Help Unit, a wall cabinet, and a double-sided AED sign to store, display, and quickly locate the AED when needed.", 186 ctaText: "Add to Cart", 187 ctaHref: "/products/complete-aed-packages/zoll-aed-plus" 188 }, 189 { 190 href: "/products/complete-aed-packages/zoll-aed-3", 191 img: "/wp-content/uploads/zoll-aed-3-complete-defibrillator-package-mobile-400x400.jpg", 192 imgAlt: "ZOLL AED 3 With Real CPR Help Complete AED Package", 193 badges: ["Best Selling"], 194 title: "ZOLL AED 3 With Real CPR Help Complete AED Package", 195 price: "$2,495.99", 196 desc: "Includes ZOLL AED 3 Featuring Real CPR Help Unit, a wall cabinet, and a double-sided AED sign to store, display, and quickly locate the AED when needed.", 197 ctaText: "Add to Cart", 198 ctaHref: "/products/complete-aed-packages/zoll-aed-3" 199 } 200 ]; 201 202 function renderCard2(item) { 203 const badges = (Array.isArray(item.badges) ? item.badges : []) 204 .map(function (badge) { 205 return `<span class="card-2-best-for">${badge}</span>`; 206 }) 207 .join(''); 208 209 const kickerDesktop = ` 210 <h6 class="card-2-kicker card-2-kicker--desktop"> 211 FEATURED PACKAGE: <span class="card-2-badges">${badges}</span> 212 </h6> 213 `; 214 215 const kickerMobile = ` 216 <h6 class="card-2-kicker card-2-kicker--mobile"> 217 FEATURED PACKAGE: <span class="card-2-badges">${badges}</span> 218 </h6> 219 `; 220 221 return ` 222 <div class="card-2"> 223 ${kickerMobile} 224 225 <div class="card-2-img"> 226 <a href="${item.href}"> 227 <img src="${item.img}" alt="${item.imgAlt || ''}"> 228 </a> 229 </div> 230 231 <div class="card-2-content"> 232 ${kickerDesktop} 233 234 <a href="${item.href}" class="card-2-title-link"> 235 <h5>${item.title}</h5> 236 </a> 237 238 <p class="card-2-price">${item.price}</p> 239 <p class="card-2-description">${item.desc}</p> 240
241 <a class="card-2-add-to-cart" href="${item.ctaHref || '#'}"> 242 ${item.ctaText || 'View'} 243 </a> 244 </div> 245 </div> 246 `; 247 } 248 249 const $card2 = $('.card-2-carousel'); 250 251 if ($card2.length) { 252 if ($card2.hasClass('slick-initialized')) { 253 $card2.slick('unslick'); 254 } 255 256 $card2.empty(); 257 card2Slides.forEach(function (item) { 258 $card2.append(renderCard2(item)); 259 }); 260 261 $card2.slick({ 262 slidesToShow: 1, 263 slidesToScroll: 1, 264 arrows: false, 265 dots: false, 266 infinite: true, 267 autoplay: true, 268 autoplaySpeed: 5000, 269 responsive: [ 270 { 271 breakpoint: 900, 272 settings: { 273 slidesToShow: 1, 274 slidesToScroll: 1 275 } 276 } 277 ] 278 }); 279 280 function stopCard2Autoplay() { 281 if ($card2.data('autoplayStopped')) { 282 return; 283 } 284 285 $card2.slick('slickSetOption', 'autoplay', false, true); 286 $card2.slick('slickPause'); 287 $card2.data('autoplayStopped', true); 288 } 289 290 $('#carousel-2-left-arrow') 291 .off('click.homepageSlick') 292 .on('click.homepageSlick', function () { 293 stopCard2Autoplay(); 294 $card2.slick('slickPrev'); 295 }); 296 297 $('#carousel-2-right-arrow') 298 .off('click.homepageSlick') 299 .on('click.homepageSlick', function () { 300 stopCard2Autoplay(); 301 $card2.slick('slickNext'); 302 }); 303 304 $card2 305 .off('swipe.homepageSlick') 306 .on('swipe.homepageSlick', stopCard2Autoplay); 307 308 $('.card-2-carousel-wrapper') 309 .off('pointerdown.homepageSlick keydown.homepageSlick') 310 .on( 311 'pointerdown.homepageSlick keydown.homepageSlick', 312 stopCard2Autoplay 313 ); 314 } 315 316})(window.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.