1// menu fuction 2(function($){ 3 // $(document).ready(function() { 4 // var isShown = localStorage.getItem('popIda'); 5 // var notification = $('.page-template-veterans-pillar .site-banner'); 6 7 // if (!isShown && notification.length == 1) { 8 // setTimeout(function(){ 9 // $.magnificPopup.open({ 10 // items: { 11 // src: '<div id="donate-tues" class="donate-tues-popup"><a href="#" target="_blank"><img style="max-height:80vh" src="/wp-content/uploads/2023/08/emergency.png"></a></div>' 12 // }, 13 // preloader: true, 14 // type: 'inline' 15 // }); 16 // localStorage.setItem('popIda', true); 17 // }, 3000); 18 // } else { 19 20 // } 21 // }); 22 $(document).on('click', 'a.burger', function(event){ 23 $('#site-navigation').toggleClass('active'); 24 }); 25 26 $(document).on('click', '#primary-menu a', function(event){ 27 if ($(this).parent().find('.sub-menu').length) { 28 $(this).parent().find('.sub-menu').toggleClass('active'); 29 } 30 }); 31})(jQuery); 32 33// swiper function news 34(function(window) { 35 function initSwiper() { 36 var swiper = new Swiper('.swiper-container-news', 37 { 38 slidesPerView: 1.5, 39 centeredSlides: true, 40 spaceBetween: 20, 41 loopedSlides:1, 42 preventClicks:false, 43 loop:true, 44 simulateTouch:false, 45 breakpoints: { 46 1024: { 47 visibilityFullFit: true, 48 loopedSlides:4, 49 slidesPerView:4, 50 centeredSlides: false, 51 preventClicks: false, 52 grabCursor:true, 53 navigation: { 54 nextEl: '.swiper-button-next-unique', 55 prevEl: '.swiper-button-prev-unique', 56 } 57 } 58 } 59 } 60 ); 61 62 } 63 if (document.getElementsByClassName('swiper-container-news').length > 0) { 64 window.addEventListener('resize', initSwiper); 65 initSwiper(); 66 } 67})(window); 68 69 70// swiper function news 71(function(window) { 72 function initSwiper() { 73 var swiper = new Swiper('.swiper-live-update', 74 { 75 slidesPerView: 1, 76 centeredSlides: true, 77 spaceBetween: 20, 78 loopedSlides:1, 79 preventClicks:false, 80 loop:true, 81 simulateTouch:false, 82 pagination: { 83 el: '.swiper-pagination', 84 }, 85 navigation: { 86 nextEl: '.swiper-button-next', 87 prevEl: '.swiper-button-prev', 88 }, 89 breakpoints: { 90 1024: { 91 visibilityFullFit: true, 92 loopedSlides:4, 93 slidesPerView:4, 94 centeredSlides: false, 95 preventClicks: false, 96 grabCursor:true, 97 98 } 99 } 100 } 101 ); 102 103 } 104 if (document.getElementsByClassName('swiper-live-update').length > 0) { 105 window.addEventListener('resize', initSwiper); 106 initSwiper(); 107 } 108})(window); 109 110 111// swiper function veteran pillar 112(function(window, $) { 113 $(document).on('click', '.swiper-wrapper a', function(e){ 114 e.stopPropagation(); 115 }); 116 function initSwiper() { 117 var pillars = $('.swiper-container-veteran-pillar'); 118 var is_mobile = false; 119 if($('.nwidget .preview-slide').css('display') == 'hidden') { 120 is_mobile = true; 121 } 122 var slidesPerView = 1; 123 if (pillars.hasClass('slides-3') || pillars.hasClass('slides-4') ) { 124 slidesPerView = 1.4; 125 } 126 var swiper = new Swiper('.swiper-container-veteran-pillar', 127 { 128 slidesPerView: slidesPerView, 129 centeredSlides: true, 130 spaceBetween: 20, 131 loopedSlides:1, 132 preventClicks:false, 133 simulateTouch:false, 134 allowTouchMove: true, 135 loop:true, 136 speed:1000, 137 navigation: { 138 nextEl: '.pillar-swiper-button-next', 139 prevEl: '.pillar-swiper-button-prev', 140 }, 141 pagination: { 142 el: ".swiper-pagination", 143 dynamicBullets: false, 144 clickable:true 145 }, 146 excludedElements: ".link, a", 147 preventClicksPropagation:true 148 } 149 ); 150 swiper.on('slideChange', function() { 151 152 console.log("swiper swipping"); 153 }); 154 swiper.on('click', function(swiper, event) { 155 console.log(swiper); 156 console.log(event); 157 console.log("click event"); 158 if (event.srcElement.className == 'pillar-box__img') { 159 event.preventDefault(); 160 event.stopPropagation() 161 return false;
162 } 163 }); 164 swiper.on('touchStart ', function(swiper, event) { 165 console.log(swiper); 166 console.log(event); 167 console.log("touch event"); 168 if (event.srcElement.className == 'pillar-box__img') { 169 event.preventDefault(); 170 event.stopPropagation() 171 return false; 172 } 173 }); 174 175 } 176 if (document.getElementsByClassName('swiper-container-veteran-pillar').length > 0) { 177 window.addEventListener('resize', initSwiper); 178 initSwiper(); 179 } 180 181})(window, jQuery); 182 183 184// swiper function veteran pillar 185(function(window) { 186 function initSwiper() { 187 var swiper = new Swiper('.swiper-container-nhome-page', 188 { 189 slidesPerView: 1, 190 centeredSlides: true, 191 spaceBetween: 20, 192 loopedSlides:1, 193 preventClicks:false, 194 loop:true, 195 navigation: { 196 nextEl: '.pillar-swiper-button-next', 197 prevEl: '.pillar-swiper-button-prev', 198 }, 199 pagination: { 200 el: ".swiper-pagination", 201 dynamicBullets: false, 202 }, 203 } 204 ); 205 } 206 if (document.getElementsByClassName('swiper-container-nhome-page').length > 0) { 207 window.addEventListener('resize', initSwiper); 208 initSwiper(); 209 } 210})(window); 211 212// swiper function testimonial 213(function(window) { 214 function initSwiper() { 215 var swiper = new Swiper('.swiper-container-testimonial', 216 { 217 slidesPerView: 1, 218 loop:false, 219 autoplay: { 220 delay: 10000, 221 }, 222 pagination: { 223 el: ".swiper-pagination", 224 clickable: true, 225 }, 226 preventClicks: false, 227 navigation: { 228 nextEl: '.swiper-testimonials-next', 229 prevEl: '.swiper-testimonials-prev', 230 } 231 } 232 ); 233 } 234 if (document.getElementsByClassName('swiper-container-testimonial').length > 0) { 235 window.addEventListener('resize', initSwiper); 236 initSwiper(); 237 } 238 239})(window); 240 241(function(window) { 242 function initSwiper() { 243 var swiper = new Swiper('.swiper-container-events', 244 { 245 slidesPerView: 1, 246 loop:false, 247 preventClicks: false, 248 navigation: { 249 nextEl: '.swiper-events-next', 250 prevEl: '.swiper-events-prev', 251 } 252 } 253 ); 254 } 255 if (document.getElementsByClassName('swiper-container-events').length > 0) { 256 window.addEventListener('resize', initSwiper); 257 initSwiper(); 258 } 259})(window); 260 261(function(window) { 262 function initSwiper() { 263 var swiper = new Swiper('.swiper-container-profile', 264 { 265 slidesPerView: 4, 266 loop:false, 267 slidesPerColumnFill:'row', 268 slidesPerColumn: 2, 269 preventClicks: false, 270 slidesPerGroup:4, 271 navigation: { 272 nextEl: '.swiper-profile-next', 273 prevEl: '.swiper-profile-prev', 274 } 275 } 276 ); 277 } 278 if (document.getElementsByClassName('swiper-container-profile').length > 0) { 279 window.addEventListener('resize', initSwiper); 280 initSwiper(); 281 } 282})(window); 283 284 285(function(window) { 286 function initSwiper() { 287 var totalSlides = Math.floor($('.swiper-wrapper').width()/312); 288 if (totalSlides > 4) { 289 totalSlides = 4; 290 } else if (totalSlides < 1) { 291 totalSlides = 1; 292 } 293 var swiper = new Swiper('.single-col-swiper-container-profile', 294 { 295 slidesPerView: totalSlides, 296 loop:false, 297 slidesPerColumnFill:'row', 298 slidesPerColumn: 1, 299 preventClicks: false, 300 slidesPerGroup:1, 301 navigation: { 302 nextEl: '.swiper-profile-next', 303 prevEl: '.swiper-profile-prev', 304 } 305 } 306 ); 307 }
308 if (document.getElementsByClassName('single-col-swiper-container-profile').length > 0) { 309 window.addEventListener('resize', initSwiper); 310 initSwiper(); 311 } 312})(window); 313 314 315(function(window) { 316 function initSwiper() { 317 var totalSlides = Math.floor($('.swiper-wrapper').width()/312); 318 if (totalSlides > 4) { 319 totalSlides = 4; 320 } else if (totalSlides < 1) { 321 totalSlides = 1; 322 } 323 var swiper = new Swiper('.swiper-container-profile-tailwind', 324 { 325 slidesPerView: totalSlides, 326 navigation: { 327 nextEl: '.swiper-profile-next', 328 prevEl: '.swiper-profile-prev', 329 }, 330 pagination: { 331 el: ".swiper-pagination", 332 clickable: true, 333 } 334 } 335 ); 336 } 337 if (document.getElementsByClassName('swiper-container-profile-tailwind').length > 0) { 338 window.addEventListener('resize', initSwiper); 339 initSwiper(); 340 } 341})(window); 342 343// swiper function partner 344(function(window, $) { 345 function initSwiper() { 346 var numberOfSlider = $('.swiper-container-partner').data('count'); 347 var breakpoints = {}; 348 if(numberOfSlider > 6){ 349 breakpoints = { 350 1301:{ 351 slidesPerView:6, 352 }, 353 1300: { 354 slidesPerView:5, 355 }, 356 1024: { 357 slidesPerView:4, 358 }, 359 600: { 360 slidesPerView:3, 361 } 362 } 363 } else { 364 console.log("no need for swiper"); 365 return ; 366 } 367 console.log(breakpoints); 368 var swiper = new Swiper('.swiper-container-partner', 369 { 370 // slidesPerView: 6, 371 loop:false, 372 visibilityFullFit: true, 373 grabCursor:true, 374 preventClicks: false, 375 spaceBetween: 20, 376 slidesPerView: 2, 377 autoplay: { 378 delay: 3000, 379 disableOnInteraction:true 380 }, 381 navigation: { 382 nextEl: '.swiper-button-next-unique2', 383 prevEl: '.swiper-button-prev-unique2', 384 }, 385 breakpoints: breakpoints, 386 } 387 ); 388 389 } 390 if (document.getElementsByClassName('swiper-container-partner').length > 0) { 391 window.addEventListener('resize', initSwiper); 392 initSwiper(); 393 } 394})(window, jQuery); 395// sticky header function and scroll to top 396(function(window, screen, $) { 397 // Get the header 398 var header = document.getElementById("page-header"); 399 400 // Get the offset position of the navbar 401 var sticky = header.offsetTop; 402 var width = (window.innerWidth > 0) ? window.innerWidth : screen.width; 403 window.onscroll = function() {scrollFunction()}; 404 var scrollToTopBtn = document.getElementById('top'); 405 $(scrollToTopBtn).on('click', function(e){ 406 // $(this).hide("slide", { direction: "up" }, 1000); 407 $("html, body").animate({ scrollTop: 0 }, "fast"); 408 }) 409 function scrollFunction() { 410 if (window.pageYOffset > sticky) { 411 header.classList.add("sticky"); 412 } else { 413 header.classList.remove("sticky"); 414 } 415 if (scrollToTopBtn) { 416 if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { 417 if (width >= 1024) { 418 scrollToTopBtn.style.display = "block"; 419 } 420 } else { 421 scrollToTopBtn.style.display = "none"; 422 } 423 } 424 } 425})(window, screen, jQuery); 426// play videos 427(function($){ 428$(document).ready(function() { 429 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 430 type: 'iframe', 431 mainClass: 'mfp-fade', 432 removalDelay: 160, 433 preloader: false, 434 fixedContentPos: false 435 }); 436}); 437})(jQuery); 438 439 440// Leadership page popup 441(function($){ 442 $(document).ready(function() { 443 $('.open-popup-link').magnificPopup({ 444 type:'inline', 445 midClick: true, 446 showCloseBtn: true 447 }); 448 }); 449 })(jQuery); 450 451// accordion 452(function($){ 453 $(document).ready(function() { 454 var isLeadershipPage = document.getElementsByClassName('gethelp-content').length != 0; 455 if (!isLeadershipPage) { 456 console.log("returining"); 457 return; 458 } 459 $('.accordion-section').accordion({ 460 collapsible: true, 461 heightStyle: "content", 462 icons:{ 463 "header": "ui-icon-triangle-1-e", 464 "activeHeader": "ui-icon-triangle-1-s" 465 } 466 }); 467 }); 468})(jQuery); 469 470(function($){ 471 $(document).ready(function() { 472 $('#view-all-post').click(function(e){ 473 e.preventDefault(); 474 $('.blog_cat_section').show(); 475 $('#view-all-post').parent().hide(); 476 }); 477 }); 478})(jQuery); 479 480// accordion 481(function($){ 482 $(document).ready(function() { 483 var annualReportPage = document.getElementsByClassName('page-template-annual-report').length != 0; 484 if (!annualReportPage) { 485 console.log("returining"); 486 return; 487 } 488 $('.accordion-section').accordion({ 489 collapsible: true, 490 heightStyle: "content", 491 icons:{ 492 "header": "ui-icon-triangle-1-e", 493 "activeHeader": "ui-icon-triangle-1-s" 494 } 495 }); 496 }); 497})(jQuery); 498 499 500// swiper function for get involvoe 501(function(window) { 502 function initSwiper() { 503 console.log("here we go swiper"); 504 var swiper = new Swiper('.leadership-swiper-container', 505 { 506 slidesPerView: 3, 507 spaceBetween: 10, 508 visibilityFullFit: true, 509 preventClicks: false, 510 breakpoints: { 511 1024: { 512 slidesPerView:4, 513 grabCursor:true 514 }, 515 1400: { 516 slidesPerView:5, 517 grabCursor:true 518 } 519 } 520 } 521 ); 522 } 523 if (document.getElementsByClassName('leadership-swiper-container').length > 0) { 524 window.addEventListener('resize', initSwiper); 525 initSwiper(); 526 } 527})(window); 528 529// swiper function for get involvoe 530(function(window) { 531 function initSwiper() { 532 var swiper = new Swiper('.swiper-container-testomonials', 533 { 534 slidesPerView: 1, 535 centeredSlides: true, 536 spaceBetween: 20, 537 loopedSlides:1, 538 preventClicks:false, 539 loop:true, 540 navigation: { 541 nextEl: '.pillar-swiper-button-next', 542 prevEl: '.pillar-swiper-button-prev', 543 }, 544 pagination: { 545 el: ".swiper-pagination", 546 dynamicBullets: false, 547 }, 548 } 549 ); 550 } 551 if (document.getElementsByClassName('swiper-container-testomonials').length > 0) { 552 window.addEventListener('resize', initSwiper); 553 initSwiper(); 554 } 555})(window); 556 557 558(function($) { 559 $(document).on('click', '.press-archive .year-title', function(e) { 560 if (e.target.className != "month-link") { 561 e.preventDefault(); 562 $(this).toggleClass('down'); 563 } 564 }) 565 566})(jQuery); 567 568 569(function($) { 570 function updateClass(items) { 571 if (items.length % 3 != 0 ) { 572 $(".events-cards-wrapper").addClass("incoplete"); 573 $(".events-cards-wrapper").removeClass("incomplete"); 574 } else { 575 $(".events-cards-wrapper").addClass("incoplete"); 576 } 577 } 578 579 $(document).on('change', '#event-location', function(e){ 580 e.preventDefault(); 581 var city = $(this).val(); 582 $(".event-card:not([data-city='"+city+"'])").hide(); 583 $(".event-card[data-city='"+city+"']").show(); 584 $(".event-card[data-city='Virtual']").show(); 585 }); 586 $(document).on('change', '#event-keyword', function(e){ 587 e.preventDefault(); 588 var keywords = $(this).val(); 589 if (!keywords) { 590 $(".event-card").show(); 591 updateClass($(".event-card")); 592 } else{ 593 $(".event-card:not([data-keywords*='"+keywords+"'])").hide(); 594 var cards = $(".event-card[data-keywords*='"+keywords+"']"); 595 cards.show(); 596 updateClass(cards); 597 } 598 }); 599 $(document).on('click', '#find-events', function(e){ 600 e.preventDefault(); 601 var keywords = $('#event-keyword').val(); 602 var city = $('#event-location').val(); 603 if (keywords){ 604 $(".event-card:not([data-keywords*='"+keywords+"'])").hide(); 605 var cards = $(".event-card[data-keywords*='"+keywords+"']"); 606 cards.show(); 607 updateClass(cards); 608 } 609 if (city) { 610 $(".event-card:not([data-city='"+city+"'])").hide(); 611 $(".event-card[data-city='"+city+"']").show(); 612 $(".event-card[data-city='Virtual']").show(); 613 } 614 }); 615})(jQuery); 616 617// donation widget 618(function($){ 619 $(document).on('click', '.donation-amount-button', function(e){ 620 $('#donation-amount').val($(this).data('amount')); 621 }); 622 $(document).ready(function() { 623 var donationFrm = document.getElementById('donation-form-popup'); 624 if (donationFrm) { 625 $('#give-now-btn').magnificPopup({ 626 type:'inline', 627 preload: false 628 }); 629 } 630 }); 631 $(document).ready(function() { 632 var donationFrm = document.getElementById('housing-form-popup'); 633 if (donationFrm) { 634 $('.housing-form-popup-btn').magnificPopup({ 635 type:'inline', 636 preload: false 637 }); 638 } 639 }); 640 641 $(document).ready(function() { 642 var donationFrm = document.getElementById('vss-form-popup'); 643 644 if (donationFrm) { 645 if($('.vss-form-popup-btn').length != 0 && $('#input_16_17').length != 0) { 646 var email = $('.vss-form-popup-btn').data('email'); 647 if (!email) { 648 email = '[email protected]'; 649 } 650 $('#input_16_17').val(email); 651 } 652 $('.vss-form-popup-btn').magnificPopup({ 653 type:'inline', 654 preload: false 655 }); 656 } 657 }); 658 $(document).ready(function() { 659 var donationFrm = document.getElementById('form-eu-popup'); 660 if (donationFrm) { 661 $('.form-eu-popup-btn').magnificPopup({ 662 type:'inline', 663 preload: false 664 }); 665 } 666 }); 667 668 $(document).ready(function() { 669 var donationFrm = document.getElementById('form-cc-popup'); 670 if (donationFrm) { 671 $('.form-eu-popup-btn').magnificPopup({ 672 type:'inline', 673 preload: false 674 }); 675 } 676 }); 677 678 679 680 function clearAmount(amount) { 681 if(!amount) { 682 amount = "0"; 683 } 684 amount = String(amount); 685 amount = amount.replace(',','').replace(',','').replace(',','').replace(',','').replace(',','').replace(',','').replace(',',''); 686 amount = amount.replace('$',''); 687 return amount; 688 } 689 $(document).on('click', '#give-now-btn', function(e){ 690 var amountDonated = document.getElementById('donation-amount').value; 691 var amountNum = clearAmount(amountDonated); 692 $('#input_12_10_1').val(amountNum * 100); 693 $('#input_12_10_1').trigger('change'); 694 document.getElementById('input_12_9').value = amountNum * 100; 695 document.getElementById('input_12_10_1').value = amountNum * 100; 696 if (document.getElementById('donation-type-select')) { 697 document.getElementById('input_12_12').value = document.getElementById('donation-type-select').value; 698 } 699 700 $('.ginput_total_12').html("$"+amountDonated); 701 702 }); 703 704 $(document).on('change', '#donation-type-select', function(e){ 705 var selectedOption = $('#donation-type-select option:selected'); 706 var descriptionId = selectedOption.data('desc-id'); 707 $('#donation-txt-target').html($("#"+descriptionId).html()); 708 var bgImg = selectedOption.data('bg'); 709 $('#donation-wrapper-bg').css('background-image','url("'+bgImg+'")'); 710 }); 711})(jQuery); 712 713// donation page 714(function($){ 715 716 if (typeof getUrlParam !== "undefined") { 717 var donationAmount = getUrlParam("amount",0); 718 $('#amount').val(donationAmount); 719 var isRecurring = getUrlParam("recurring",0); 720 if (isRecurring==1){ 721 $('#choice_6_9_1').prop('checked', true); 722 } 723 } 724 function clearAmount(amount) { 725 if(!amount) { 726 amount = "0"; 727 } 728 amount = String(amount); 729 amount = amount.replace(',','').replace(',','').replace(',','').replace(',','').replace(',','').replace(',','').replace(',',''); 730 amount = amount.replace('$',''); 731 return amount; 732 } 733 function changeAmount(amount) { 734 amount = parseFloat(clearAmount(amount)) * 100; 735 if (isNaN(amount)) { 736 amount = 0; 737 } 738 $('#input_6_1_1').val(amount); 739 $('#input_6_1_1').trigger('change'); 740 $('#input_6_4').val(clearAmount(amount)); 741 $('#input_6_4').trigger('change'); 742 } 743 $('.donation-box button').click(function(e){ 744 e.preventDefault(); 745 $('.donation-box button').removeClass('active'); 746 $(this).addClass('active'); 747 amount = $(this).data('value'); 748 if(amount != 0) { 749 $('#amount').val(amount); 750 $('#amount').trigger('change'); 751 } else { 752 $('#amount').val(""); 753 $('#amount').focus(); 754 } 755 }); 756 $('#amount').on('change', function(){ 757 changeAmount($(this).val()); 758 }); 759 changeAmount($('#amount').val()); 760})(jQuery); 761 762(function($){ 763 $(document).ready(function() { 764 var isMFC = document.getElementsByClassName('page-template-mfc-landing').length == 1; 765 if (!isMFC) { 766 console.log("returining"); 767 return; 768 } 769 $('.open-popup-link').magnificPopup({ 770 type:'inline', 771 midClick: true, 772 showCloseBtn: true 773 }); 774 }); 775})(jQuery); 776 777 778(function($){ 779 $(document).on('click','#load-more-events', function(e) { 780 e.preventDefault(); 781 $('.event-month:hidden').slice(0,1).slideDown(); 782 if ($('.event-month:hidden').length == 0) { 783 $(this).fadeOut('slow'); 784 } 785 }); 786})(jQuery); 787 788 789(function(windo, $){ 790 function sticky_relocate() { 791 var window_top = $(window).scrollTop(); 792 var refernceItem = $('#reading-timer'); 793 if (refernceItem.length) { 794 var div_top = $('#blog-right-side').offset().top - 80; 795 if (window_top > div_top) { 796 $('#reading-timer').addClass('stick'); 797 } else { 798 $('#reading-timer').removeClass('stick'); 799 } 800 } 801 } 802 $(window).scroll(sticky_relocate); 803 sticky_relocate(); 804})(window, jQuery); 805 806(function(windo, $){ 807 $(document).on('click', '.site-branding .magnify', function(e) { 808 $( '#full-screen-search' ).addClass( 'open' ); 809 $( '#full-screen-search input' ).focus(); 810 }); 811})(window, jQuery); 812 813 814 815(function(window, $){ 816 $(document).on('change', '#location-dd', function(e) { 817 var selectedVal = $('#location-dd option:selected'); 818 var availableServices = selectedVal.data('fill-dropdown'); 819 var sendToEmail = selectedVal.data('email'); 820 var availableServiceOptions = []; 821 $("#interested-in-dd").empty(); 822 if (availableServices) { 823 availableServiceOptions = availableServices.split(','); 824 } 825 availableServiceOptions = availableServiceOptions.concat(['Receiving Services', 'Volunteering', 'Partnership', 'Donating', "Other"]); 826 availableServiceOptions.sort(); 827 for (var i =0; i<availableServiceOptions.length; i++) { 828 var o = new Option(availableServiceOptions[i], availableServiceOptions[i]); 829 $(o).html(availableServiceOptions[i]); 830 $("#interested-in-dd")
830.append(o); 831 } 832 if (sendToEmail) { 833 document.getElementById('input_13_11').value = sendToEmail; 834 } else { 835 document.getElementById('input_13_11').value = "[email protected]"; 836 } 837 }); 838 $(document).on('click', '#voulnteer-btn', function(e) { 839 e.preventDefault(); 840 var frm = $('#gform_15'); 841 var orginalFormId = ['first_name', 'last_name', 'email', 'phone', 'time-to-call', 'interested-in-dd', 'contact-msg']; 842 var hiddenFormId = ['input_15_1', 'input_15_2','input_15_3', 'input_15_4', 'input_15_5', 'input_15_6', 'input_15_7']; 843 for (var i=0; i<orginalFormId.length; i++) { 844 if (document.getElementById(hiddenFormId[i]) && document.getElementById(orginalFormId[i])) { 845 document.getElementById(hiddenFormId[i]).value = document.getElementById(orginalFormId[i]).value; 846 } 847 } 848 frm.submit(); 849 $('#voulnteer-btn').parent().parent().html("<h3 style='text-align: center;'>Thank you for volunteering!</h3>"); 850 }); 851 852 $(document).on('click', '#vol-with-us-btn', function(e) { 853 e.preventDefault(); 854 var frm = $('#gform_15'); 855 var orginalFormId = ['first_name', 'last_name', 'email', 'phone', 'time-to-call', 'interested-in-dd', 'contact-msg']; 856 var hiddenFormId = ['input_15_1', 'input_15_2','input_15_3', 'input_15_4', 'input_15_5', 'input_15_6', 'input_15_7']; 857 for (var i=0; i<orginalFormId.length; i++) { 858 if (document.getElementById(hiddenFormId[i]) && document.getElementById(orginalFormId[i])) { 859 document.getElementById(hiddenFormId[i]).value = document.getElementById(orginalFormId[i]).value; 860 } 861 } 862 frm.submit(); 863 $('#vol-with-us-btn').parent().parent().html("<h3 style='text-align: center;'>Thank you for volunteering!</h3>"); 864 }); 865 866 $(document).on('click', '#contact-us-btn', function(e) { 867 e.preventDefault(); 868 var frm = $('#gform_13'); 869 var submitId = "#gform_submit_button_13"; 870 if (frm.length) { 871 var orginalFormId = ['first_name', 'last_name', 'email', 'phone', 'location-dd', 'interested-in-dd', 'i-am-a', 'contact-msg']; 872 var hiddenFormId = ['input_13_1', 'input_13_2','input_13_3', 'input_13_15', 'input_13_12', 'input_13_13', 'input_13_14', 'input_13_8']; 873 } else { 874 var frm = $('#gform_21'); 875 var submitId = "#gform_submit_button_21"; 876 var orginalFormId = ['first_name', 'last_name', 'email', 'phone', 'contact-msg']; 877 var hiddenFormId = ['input_21_2', 'input_21_6','input_21_4', 'input_21_7', 'input_21_5']; 878 } 879 for (var i=0; i<orginalFormId.length; i++) { 880 if (document.getElementById(hiddenFormId[i]) && document.getElementById(orginalFormId[i])) { 881 document.getElementById(hiddenFormId[i]).value = document.getElementById(orginalFormId[i]).value; 882 } 883 } 884 var canSubmit = true; 885 var required = ['first_name', 'last_name', 'email', 'contact-msg'];; 886 for(var i=0; i<required.length; i++) { 887 if(!document.getElementById(required[i]).value) { 888 canSubmit = false; 889 $('#'+required[i]).parent().addClass('error'); 890 break; 891 } 892 } 893 894 if (canSubmit) { 895 $(submitId).trigger('click'); 896 } else { 897 $('form.contact-us-form').children('.validation_message').remove(); 898 $('.validation_message').each(function(index) { 899 $('form.contact-us-form').prepend(this); 900 }); 901 } 902 }); 903 $(document).on('click', '#cc-signup-btn', function(e){ 904 e.preventDefault(); 905 var frm = $('.ctct-form-custom'); 906 if (frm.length) { 907 $('#email_address_0').val($('#email_address').val()); 908 $('#first_name_0').val($('#first_name').val()); 909 $('#last_name_0').val($('#last_name').val()); 910 frm.submit(); 911 } 912 $(this).parent().parent().html("<h3 style='text-align: center;'>Thank You!</h3>"); 913 914 }); 915 $(document).on('change', '#vss-location', function(e){ 916 e.preventDefault(); 917 var selectedOption = $('#vss-location option:selected'); 918 var phone = selectedOption.data('phone'); 919 var addresss1 = selectedOption.data('address1'); 920 var address2 = selectedOption.data('address2'); 921 var name = selectedOption.data('name'); 922 var email = selectedOption.data('email'); 923 if (email && $('#field_16_17').length != 0) { 924 $('#input_16_17').val(email); 925 $('#input_16_16').val(name); 926 } else { 927 928 } 929 $('#location-name').html(name); 930 if (addresss1 != "") { 931 $('#location-address').html(addresss1 + "<br/>" + address2); 932 } 933 $('#location-phone').html("<a href='tel:"+phone+"'>"+phone+"</a>"); 934 }); 935})(window, jQuery); 936 937 938(function(window, $){ 939 $(document).on('click', '.glossaryLink', function(e){ 940 e.preventDefault(); 941 return false;
942 }) 943})(window, jQuery); 944 945 946(function(window, $){ 947 var imgMap = $('#image-map'); 948 if (!imgMap) { 949 return; 950 } 951 function placeImageTriggers() { 952 // 953 } 954 $(document).ready(function() { 955 imgMap.imageMapResize(); 956 placeImageTriggers(); 957 }); 958 959 $('#image-map area').on('click', function(e) { 960 e.preventDefault(); 961 var text = $(this).data('desc'); 962 var selectorClass = $(this).data('selector'); 963 $('#wheelText').fadeOut(500 , function(e) { 964 $(this).html(text).fadeIn(500); 965 }); 966 $('.'+selectorClass).fadeOut(500 , function(e) { 967 $('.wheel-nav li').removeClass('active'); 968 $(this).addClass('active'); 969 $(this).fadeIn(500); 970 }); 971 972 }); 973})(window, jQuery); 974 975(function(window, $){ 976 var minutes = $('.read-time .indicator div').length; 977 if (!minutes) { 978 return 0; 979 } 980 981 $( window ).scroll(function() { 982 var pageHeight = document.body.clientHeight; 983 var windowHeight = window.innerHeight; 984 var currentLocation = window.pageYOffset; 985 var progress = currentLocation + windowHeight; 986 $('.read-time .indicator div').removeClass('filled'); 987 if (progress >= pageHeight) { 988 $('.read-time .indicator div').addClass('filled'); 989 } else { 990 var currentProgress = Math.round((progress/pageHeight) * minutes) 991 $('.read-time .indicator div').each(function(index){ 992 if(index+1 <= currentProgress ) { 993 $(this).addClass('filled'); 994 } 995 }); 996 } 997 }); 998 999})(window, jQuery); 1000(function(window, $){ 1001 $('.calling-vol-boxes .vol-box').hover(function(e){ 1002 $(this).find('.vol-box-desc').fadeIn(); 1003 }, 1004 function(e) { 1005 $(this).find('.vol-box-desc').fadeOut(); 1006 }); 1007})(window, jQuery); 1008 1009(function(window, $){ 1010 $('.socail-feed-wrapper .social-box').hover(function(e){ 1011 $(this).find('.social-desc').fadeIn(); 1012 $(this).addClass('show-desc'); 1013 }, 1014 function(e) { 1015 $(this).find('.social-desc').fadeOut(); 1016 $(this).removeClass('show-desc'); 1017 }); 1018})(window, jQuery); 1019 1020(function(window, $){ 1021 $('.nwidget.pillars-section .pillars a').hover(function(e){ 1022 $(this).find('.the-pillar-title span').fadeOut(); 1023 $(this).find('.the-pillar-desc').fadeIn(); 1024 }, 1025 function(e) { 1026 $(this).find('.the-pillar-title span').fadeIn(); 1027 $(this).find('.the-pillar-desc').fadeOut(); 1028 }); 1029})(window, jQuery); 1030 1031 1032(function(window, $){ 1033 $(document).on('click', '#get-in-touch-button', function(e){ 1034 e.preventDefault(); 1035 $(this).parent().parent().html("<h3>Thank you!</h3><p style='color:#000'>Your submission has been sent.</p>"); 1036 }); 1037})(window, jQuery); 1038 1039(function(window, $){ 1040 function getLastSlideIndex() { 1041 var indeces = $('.myslider').length - 1; 1042 return indeces; 1043 } 1044 function selectCurrentActiveSlide() { 1045 var goingToActivate = $('.myslider.will-activate').length != 0; 1046 var index = 0; 1047 if (goingToActivate) { 1048 index = $('.myslider.will-activate').data('slide-index'); 1049 } else if($('.myslider.active').length ) { 1050 index = $('.myslider.active').data('slide-index'); 1051 } else { 1052 index = 0; 1053 } 1054 return index; 1055 } 1056 1057 function changeNavButtons() { 1058 var index = selectCurrentActiveSlide(); 1059 var activeNav = $('span[data-slide-index="'+index+'"]'); 1060 $('.myswiper-pagination .swiper-pagination-bullet').removeClass('swiper-pagination-bullet-active'); 1061 activeNav.addClass('swiper-pagination-bullet-active'); 1062 } 1063 1064 $(document).on('click','.myslider',function() { 1065 $('.myslider').stop(true, true); 1066 $('.myslider').removeClass('will-activate'); 1067 if ($(this).hasClass('active')) { 1068 return; 1069 } 1070 $('.myslider .img-title').show(); 1071 $(this).find('.img-title').hide(); 1072 $('.myslider:not(.active)').css('width', '120px'); 1073 var widthDifference = $('.myslider.active').width() - 120; 1074 $(this).addClass('will-activate'); 1075 changeNavButtons(); 1076 $('.myslider.active .veteran-slider-content').hide(); 1077 $('.myslider.active').animate({ 1078 width: '-='+widthDifference+'px' 1079 }, 1000); 1080 1081 $(this).animate({ 1082 width: '+='+widthDifference+'px' 1083 }, 1000); 1084 setTimeout(function(){ 1085 $('.myslider').removeClass('active'); 1086 $('.myslider.will-activate').addClass('active'); 1087 $('.myslider.active .veteran-slider-content').show(); 1088 },1000); 1089 1090 }); 1091 1092 $(document).on('click', '#go-to-next-slide', function(e){ 1093 var currentIndex = selectCurrentActiveSlide(); 1094 if (currentIndex == getLastSlideIndex() ) { 1095 currentIndex = 0; 1096 } else { 1097 currentIndex += 1; 1098 }
1099 var slider = $('.myslider[data-slide-index="'+currentIndex+'"'); 1100 slider.trigger('click'); 1101 1102 }); 1103 $(document).on('click', '#go-to-previous-slide', function(e){ 1104 var currentIndex = selectCurrentActiveSlide(); 1105 if (currentIndex == 0) { 1106 currentIndex = getLastSlideIndex(); 1107 } else { 1108 currentIndex -= 1; 1109 } 1110 var slider = $('.myslider[data-slide-index="'+currentIndex+'"'); 1111 slider.trigger('click'); 1112 }); 1113 1114 $(document).on('click', '.myswiper-pagination .swiper-pagination-bullet', function(e){ 1115 var currentIndex = selectCurrentActiveSlide(); 1116 var desiredIndex = $(this).data('slide-index'); 1117 if (currentIndex == desiredIndex) { 1118 return false; 1119 } 1120 1121 var slider = $('.myslider[data-slide-index="'+desiredIndex+'"'); 1122 slider.trigger('click'); 1123 }); 1124})(window, jQuery); 1125 1126(function(window, $) { 1127 $('.read-more-article').on('click', function(e){ 1128 e.preventDefault(); 1129 var readButton = $(this); 1130 var articleContainer = readButton.parent(); 1131 if (readButton.hasClass('is-open')) { 1132 readButton.toggleClass('is-open'); 1133 articleContainer.find('.long-description').hide(); 1134 articleContainer.find('short-desc').show(); 1135 } else { 1136 readButton.addClass('is-open'); 1137 articleContainer.find('short-desc').hide(); 1138 articleContainer.find('.long-description').show(); 1139 } 1140 1141 }); 1142})(window, jQuery); 1143 1144 1145 1146// (function(window, $) { 1147// $(document).ready(function() { 1148// var popUpItem = $('#popup-open-after'); 1149// if (popUpItem.length == 0) { 1150// return false; 1151// } else { 1152// var popupDataKey = popUpItem.data('storage') || 'popup-data-key'; 1153// var isShown = localStorage.getItem(popupDataKey); 1154// var timeout = popUpItem.data('timeout') || 5; 1155// if (!isShown || true) { 1156// setTimeout(function(){ 1157// $.magnificPopup.open({ 1158// items: { 1159// src: popUpItem 1160// }, 1161// preloader: true, 1162// type: 'inline' 1163// }); 1164// localStorage.setItem(popupDataKey, true); 1165// }, timeout); 1166// } else { 1167 1168// } 1169// } 1170// }); 1171// })(window, jQuery); 1172 1173 1174 1175 1176(function(window, $){ 1177 $('.fade-effect-wrapper').hover(function(e){ 1178 // $(this).find('.fade-effect').fadeIn(); 1179 var elem = $(this).find('.fade-effect'); 1180 // elem.fadeIn('slow'); 1181 elem.animate({opacity: 1}, 700); 1182 1183 }, 1184 function(e) { 1185 // $(this).find('.fade-effect').fadeOut(); 1186 // $(this).find('.fade-effect').fadeOut('slow'); 1187 var elem = $(this).find('.fade-effect'); 1188 elem.animate({opacity: 0}, 700); 1189 }); 1190 1191 if ($('#vwc-popup').length) { 1192 setTimeout(function(){ 1193 $.magnificPopup.open({ 1194 items: { 1195 src:$('#vwc-popup'), 1196 type:'inline' 1197 } 1198 }); 1199 },500); 1200 } 1201 1202 if ($('#vol-popup').length) { 1203 // if (localStorage.getItem('room-shown') === 'true') { 1204 // return; 1205 // } 1206 1207 setTimeout(function(){ 1208 $.magnificPopup.open({ 1209 items: { 1210 src:$('#vol-popup'), 1211 type:'inline' 1212 } 1213 }); 1214 localStorage.setItem('room-shown', 'true'); 1215 },500); 1216 } 1217 1218})(window, jQuery); 1219 1220 // $(document).ready(function() { 1221 // var isShown = localStorage.getItem('popStateKY'); 1222 // if (!isShown) { 1223 // setTimeout(function(){ 1224 // $.magnificPopup.open({ 1225 // items: { 1226 // src: '<div id="donate-tues" class="donate-tues-popup"><a href="https://endeavors.kindful.com/?campaign=1164741" target="_blank"><img style="max-height:80vh" src="/wp-content/themes/endeavors/assets/img/ky-tornado-popup.jpeg"></a></div>' 1227 // }, 1228 // preloader: true, 1229 // type: 'inline' 1230 // }); 1231 // localStorage.setItem('popStateKY', true); 1232 // }, 3000); 1233 // } else { 1234 1235 // } 1236 // }); 1237 1238 1239(function(window, $){
1240 $('.show-hide-trigger').click(function(e){ 1241 var parent = $(this).parent(); 1242 var target = parent.find('.show-hide-effect'); 1243 if (parent.hasClass('active')) { 1244 target.fadeOut('slow'); 1245 target.css('display', 'none'); 1246 } else { 1247 target.fadeIn('slow'); 1248 target.css('display', 'flex'); 1249 } 1250 parent.toggleClass('active'); 1251 1252 }); 1253 1254})(window, jQuery); 1255 1256 1257// (function(window, $){ 1258// $('.search-btn').click(function(e){ 1259// e.preventDefault(); 1260// let url = $('.select-cat').find(":selected").val(); 1261// if (url == "") { 1262// url = $('.select-loc').find(":selected").val(); 1263// } 1264// if (url == "") { 1265// url = '/job-opportunities/'; 1266// } 1267// window.location.href = url; 1268// return false; 1269 1270// }); 1271 1272// })(window, jQuery); 1273 1274 1275function animateFrom(elem, direction) { 1276direction = direction || 1; 1277var x = 0, 1278 y = direction * 100; 1279if(elem.classList.contains("gs_reveal_fromLeft")) { 1280 x = -100; 1281 y = 0; 1282} else if (elem.classList.contains("gs_reveal_fromRight")) { 1283 x = 100; 1284 y = 0; 1285} else if (elem.classList.contains("gs_reveal_fromTop")) { 1286 x = 0; 1287 y = -100; 1288} else if (elem.classList.contains("gs_reveal_fromBottom")) { 1289 x = 0; 1290 y = 100; 1291} 1292elem.style.transform = "translate(" + x + "px, " + y + "px)"; 1293elem.style.opacity = "0"; 1294gsap.fromTo(elem, {x: x, y: y, autoAlpha: 0}, { 1295 duration: 1.25, 1296 x: 0, 1297 y: 0, 1298 autoAlpha: 1, 1299 ease: "expo", 1300 overwrite: "auto" 1301}); 1302} 1303 1304function hideElem(elem) { 1305gsap.set(elem, {autoAlpha: 0}); 1306} 1307 1308document.addEventListener("DOMContentLoaded", function() { 1309gsap.registerPlugin(ScrollTrigger); 1310 1311gsap.utils.toArray(".gs_reveal").forEach(function(elem) { 1312 hideElem(elem); 1313 ScrollTrigger.create({ 1314 trigger: elem, 1315 markers: false, 1316 onEnter: function() { animateFrom(elem) }, 1317 onEnterBack: function() { animateFrom(elem, -1) }, 1318 onLeave: function() { hideElem(elem) } 1319 }); 1320}); 1321}); 1322 1323 1324 1325(function(window, $){ 1326 if (document.getElementsByClassName('play-circle-01').length != 1) { 1327 return; 1328 } 1329 gsap.set(".play-circle-01", { 1330 rotation: 90, 1331 transformOrigin: "center" 1332 }); 1333 1334 gsap.set(".play-circle-02", { 1335 rotation: -90, 1336 transformOrigin: "center" 1337 }); 1338 1339 gsap.set(".play-perspective", { 1340 xPercent: 2, 1341 yPercent: -17, 1342 scale: .12, 1343 transformOrigin: "center", 1344 perspective: 1 1345 }); 1346 1347 gsap.set(".play-video", { 1348 visibility: "hidden", 1349 opacity: 0 1350 }); 1351 1352 gsap.set(".play-triangle", { 1353 transformOrigin: "left center", 1354 transformStyle: "preserve-3d", 1355 rotationY: 10, 1356 scaleX: 2 1357 }); 1358 1359 const rotateTL = gsap.timeline({ paused: true }) 1360 .to(".play-circle-01", { duration: 0.7, opacity: 0.1, rotation: '+=360', strokeDasharray: "456 456", ease: "power1.inOut" }, 0) 1361 .to(".play-circle-02", { duration: 0.7, opacity: 0.1, rotation: '-=360', strokeDasharray: "411 411", ease: "power1.inOut" }, 0); 1362 1363 const openTL = gsap.timeline({ paused: true }) 1364 .to(".play-backdrop", { duration: 1, opacity: 0.95, visibility: "visible", ease: "power2.inOut" }, 0) 1365 .to(".play-close", { duration: 1, opacity: 1, ease: "power2.inOut" }, 0) 1366 .to(".play-perspective", { duration: 1, xPercent: 0, scale: 1, ease: "power2.inOut" }, 0) 1367 .to(".play-triangle", { duration: 1, scaleX: 1, ease: "expoScale(2, 1, power2.inOut)" }, 0) 1368 .to(".play-triangle", { duration: 1, rotationY: 0, ease: "expoScale(10, 0.01, power2.inOut)" }, 0) 1369 .to(".play-video", { duration: 1, visibility: "visible", opacity: 1 }, 0.5); 1370 1371 const button = document.querySelector(".play-button"); 1372 const backdrop = document.querySelector(".play-backdrop"); 1373 const close = document.querySelector(".play-close"); 1374 1375 button.addEventListener("mouseover", () => rotateTL.play()); 1376 button.addEventListener("mouseleave", () => rotateTL.reverse()); 1377 button.addEventListener("click", () => openTL.play()); 1378 backdrop.addEventListener("click", () => openTL.reverse()); 1379 close.addEventListener("click", (e) => { 1380 e.stopPropagation(); 1381 openTL.reverse(); 1382 }); 1383 1384})(window, jQuery); 1385 1386(function(window, $){ 1387 if (document.getElementsByClassName('page-template-job-opportunities').length !== 1 ) { 1388 return; 1389 } 1390 // Get references to elements 1391 const htmlItems = document.querySelectorAll('.job-posting'); 1392 const items = window.jobPosting; 1393 const categoryFilter = document.getElementById('job-category-filter'); 1394 const locationFilter = document.getElementById('job-location-filter'); 1395 const searchInput = document.getElementById('job-title'); 1396 var state = Flip.getState('.job-posting, .empty'); 1397 1398 // Loop through filter buttons and attach click event listeners 1399 categoryFilter.addEventListener('change', () => { 1400 filterItems(); 1401 }); 1402 1403 // Loop through filter buttons and attach click event listeners 1404 locationFilter.addEventListener('change', () => { 1405 filterItems(); 1406 }); 1407 1408 // Attach input event listener to the search input field 1409 searchInput.addEventListener('input', () => { 1410 filterItems(); 1411 }); 1412 1413 let timeout; 1414 function removeWithStyle(items) { 1415 $('.blog_cat_section').empty(); 1416 } 1417 1418 function addWithStyle(item) { 1419 $('.blog_cat_section').append(item); 1420 var htmlItem = $(".blog_cat_section").find("a:last-child"); 1421 gsap.to(htmlItem, { opacity: 1, duration:3 }); // Animate the opacity to 1 (fade in) 1422 } 1423 function filterItems() { 1424 const selectedCategory = categoryFilter.value; 1425 const selectedLocation = locationFilter.value; 1426 const searchText = searchInput.value.toLowerCase(); 1427 const activeFilter = selectedCategory != '' || selectedLocation != '' || searchText != ''; 1428 var startHeight = gsap.getProperty(".blog_cat_section", "height"); 1429 if (activeFilter) { 1430 debugger; 1431 removeWithStyle(htmlItems); 1432 // Loop through items and filter based on category and search text
1433 items.forEach(item => { 1434 const itemCategories = item.category; 1435 const itemLocations = item.location; 1436 const itemTitle = item.title.toLowerCase(); 1437 1438 const categoryMatch = selectedCategory === '' || itemCategories.includes(selectedCategory); 1439 const locationMatch = selectedLocation === '' || itemLocations.includes(selectedLocation); 1440 const titleMatch = searchText === '' || itemTitle.includes(searchText); 1441 if (categoryMatch && locationMatch && titleMatch) { 1442 var htmlItem = "<a style='opacity:0' class='blog-news-box job-posting' href='"+item.link+"'><div class='blog_news__img' style='background-image:url(\""+item.img+"\")'></div><div class='title'><h4>"+item.title+"</h4></div></a>"; 1443 addWithStyle(htmlItem); 1444 } 1445 1446 }); 1447 } else { 1448 removeWithStyle(htmlItems); 1449 items.forEach(function(item) { 1450 var htmlItem = "<a style='opacity:0' class='blog-news-box job-posting' href='"+item.link+"'><div class='blog_news__img' style='background-image:url(\""+item.img+"\")'></div><div class='title'><h4>"+item.title+"</h4></div></a>"; 1451 addWithStyle(htmlItem); 1452 }); 1453 } 1454 1455 1456 var endHeight = gsap.getProperty(".blog_cat_section", "height"); 1457 var flip = Flip.from(state, { 1458 duration: 0.2, 1459 ease: "power3.inOut", 1460 stagger: 0.08, 1461 absolute: true, 1462 onEnter: elements => gsap.fromTo(elements, {opacity: 0, scale: 0}, {opacity: 1, scale: 1, duration: .3}), 1463 onLeave: elements => gsap.fromTo(elements, {opacity: 1, scale: 1}, {opacity: 0, scale: 0, duration: .3}) 1464 }); 1465 flip.fromTo(".blog_cat_section", { 1466 height: startHeight 1467 }, { 1468 height: endHeight, 1469 clearProps: "height", 1470 duration: flip.duration() 1471 }, 0); 1472 1473 clearTimeout(timeout); // Clear previous timeout 1474 // timeout = setTimeout(() => { 1475 // gsap.to('.gsap-hidden', { opacity: 0, display: 'none', duration: 0.5 }); 1476 // gsap.to('.gsap-visible', { opacity: 1, display: 'block', duration: 0.5 }); 1477 // $('.job-posting').removeClass('gsap-hidden'); 1478 // $('.job-posting').removeClass('gsap-visible'); 1479 // }, 500); 1480 } 1481 1482})(window, jQuery); 1483 1484 1485// (function(window, $){ 1486// $(document).ready(function(e){ 1487// var settings = { 1488// "url": "https://endeavors.org/wp-admin/admin-post.php?action=city", 1489// "method": "POST", 1490// "timeout": 0, 1491// }; 1492 1493// $.ajax(settings).done(function (response) { 1494// if(response.city) { 1495// if (response.city == "San Antonio" || response.city=="New Braunfels") { 1496// $('#content').prepend("<div class='site-banner' style='display: flex;flex-direction: row;justify-content: center;align-items: center;background: #B1C9E8;height: 54px;color: #000;text-align: center;'><p style=' padding: 0px;margin: 0px auto;width: 1366px;max-width: calc(100% - 60px);font-size: 20px;line-height: 54px;'>For Cold Weather Shelter and Resources <a href='https://www.closetohomesa.org/find-help.html' target='_blank'>Click Here</a></p></div>"); 1497// } else { 1498// console.log("this is outside san antonio" + response.city); 1499// } 1500// } 1501// }); 1502// }); 1503// })(window, jQuery); 1504 1505 1506 1507(function(window){ 1508document.addEventListener("DOMContentLoaded", function() { 1509 const lazyBgElements = document.querySelectorAll(".mobile-lazy-bg"); 1510 1511 const lazyLoad = function() { 1512 lazyBgElements.forEach(element => { 1513 if (element.offsetTop < window.innerHeight + window.pageYOffset) { 1514 element.style.backgroundImage = `url(${element.getAttribute("data-bg")})`; 1515 } 1516 }); 1517 }; 1518 1519 // Call lazyLoad initially 1520 lazyLoad(); 1521 1522 // Call lazyLoad whenever the window is scrolled 1523 document.addEventListener("scroll", lazyLoad); 1524 }); 1525})(window); 1526 1527(function(window){ 1528document.addEventListener("DOMContentLoaded", function() { 1529 var video = document.getElementById("home-video"); 1530 1531 if (video) { 1532 video.play(); 1533 } 1534 }); 1535})(window); 1536 1537(function(window, $){ 1538 $(document).ready(function(e){ 1539 $('img[loading="lazy"]').each(function() { 1540 var img = $(this); 1541 img.attr('src', img.data('src')); 1542 }); 1543 }); 1544})(window, jQuery); 1545 1546 1547(function(window, $){ 1548 $(document).ready(function() { 1549 var url = window.location.href; 1550 if (url.indexOf('show=parade') !== -1) { 1551 1552 $.magnificPopup.open({ 1553 items: { 1554 src: '<style>.fiesta-wrapper{width:800px;max-width:calc(100% - 90px);margin:0 auto;position:relative;background-image:url(/static/img/popup-bg.jpeg?v=1);background-color:#004677;background-size:contain;background-position:center;background-repeat:no-repeat}#fiesta-popup{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff;padding:40px}#fiesta-popup h2{font-size:35px;color:#fff;margin:10px auto;padding-top:40px}#fiesta-popup h3{font-size:25px;color:#fff;margin:10px auto}.fiesta-social-set{display:flex;justify-content:center;align-items:center;margin:5px}
1554.fiesta-social-set a{display:block;background-size:contain;width:52px;height:52px;margin:10px;background-repeat:no-repeat}.mfp-close-btn-in .mfp-close{background:#ffffff88;border-radius:35px;font-weight:500}</style><div class=fiesta-wrapper><div id=fiesta-popup><h2>Letâs Connect!</h2><h3>@EndeavorsOrg</h3><div class=fiesta-social-set><a href=https://lp.constantcontactpages.com/sl/GtuKeoo style=background-image:url(/static/img/email.png) target=_blank class=mobile-lazy-bg></a> <a href=https://www.facebook.com/Endeavors.org style=background-image:url(/static/img/fb.png) target=_blank class=mobile-lazy-bg></a> <a href=https://www.instagram.com/endeavorsorg style=background-image:url(/static/img/insta.png) target=_blank class=mobile-lazy-bg></a> <a href=https://www.linkedin.com/company/endeavors-org/mycompany/ style=background-image:url(/static/img/linkedin.png) target=_blank class=mobile-lazy-bg></a></div><img alt="viva fiesta image"src=/static/img/viva-fiesta.jpeg><p>Click <a href="https://www.snapchat.com/lens/b29d16e31939465eb1e8ec98cfd05e3c?sender_web_id=433abbd3-233c-4824-b1b9-6cf0df67312c&device_type=desktop&is_copy_url=true"style=color:#fff target=_blank>here</a> to use our Fiesta Snapchat filter!</div></div>' 1555 }, 1556 preloader: true, 1557 type: 'inline' 1558 }); 1559 } 1560 }); 1561})(window, jQuery); 1562 1563(function(window, $){ 1564$(document).ready(function() { 1565 // // Check if the URL contains 'the-health-and-wellness-center/' 1566 // if (window.location.href.includes('the-health-and-wellness-center')) { 1567 // $.magnificPopup.open({ 1568 // items: { 1569 // // src: 'https://endeavors.org/static/img/clousre.jpg' 1570 // }, 1571 // type: 'image' 1572 // }); 1573 1574 1575 1576 // } 1577}); 1578})(window, jQuery); 1579 1580 1581 1582function createNotificationBanner(text) { 1583 // Check if banner already exists 1584 if (document.getElementById('notificationBanner')) { 1585 return; 1586 } 1587 1588 // Create banner HTML 1589 const bannerHTML = ` 1590 <div id="notificationBanner" class="notification-banner"> 1591 <div class="banner-content"> 1592 ${text} 1593 </div> 1594 <button class="close-btn" onclick="closeBanner()" aria-label="Close notification"> 1595 Ã 1596 </button> 1597 </div> 1598 `; 1599 1600 // Create banner element 1601 const bannerDiv = document.createElement('div'); 1602 bannerDiv.innerHTML = bannerHTML; 1603 const banner = bannerDiv.firstElementChild; 1604 1605 // Insert banner at the top of the page 1606 document.body.insertBefore(banner, document.body.firstChild); 1607 1608 1609 1610 // Trigger entrance animation 1611 setTimeout(() => { 1612 banner.classList.add('show'); 1613 }, 100); 1614} 1615 1616function closeBanner() { 1617 const banner = document.getElementById('notificationBanner'); 1618 if (banner) { 1619 banner.classList.add('hide'); 1620 setTimeout(() => { 1621 banner.remove(); 1622 }, 300); 1623 } 1624} 1625 1626// CEO Message Banner 1627// (function(window, $){ 1628// $(document).ready(function(e){ 1629// if ($('body').hasClass('page-template-new-home-page')) { 1630// $('#content').prepend("<div class='site-banner' style='display: flex;flex-direction: row;justify-content: center;align-items: center;background: #B1C9E8;height: 54px;color: #000;text-align: center;padding:10px 0'><p style=' padding: 0px;margin: 0px auto;width: 1366px;max-width: calc(100% - 60px);font-size: 18px;line-height: 1;'>Click <a href='/uncategorized/standing-together-in-service-celebrating-our-impact/' target='_blank'>Here</a> to read Endeavorsâ CEO message regarding recent media coverage</p></div>"); 1631// } 1632// }); 1633// })(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.