1 2$(function () { 3 // #region --- Clone sidebar buttons to mobile navigation ------------ 4 5 if ($(".sidebar-menu-buttons").length) { 6 $(".sidebar-menu-buttons").clone().removeClass('hit-test-elem-js').prependTo($(".mob-header-bottom__sidebar-icons")); 7 } 8 9 // #endregion 10 11 12 // #region --- SVG convert ------------------------------ 13 14 convertSvgImg.initialize(); 15 16 // #region --- Bg color white ---------------------------- 17 18 if ($(".bg-color").length) { 19 20 var bgColorTrigger = true; 21 22 $("#access-content > .bg-color").each(function () { 23 24 if ($(this).prev().hasClass("bg-color-none")) { 25 bgColorTrigger = !bgColorTrigger; 26 } 27 if ($(this).hasClass("bg-color-twin") && $(this).prev().hasClass("bg-color-twin")) { 28 if (!bgColorTrigger) { 29 $(this).prev().nextUntil(':not(.bg-color-twin)').addBack().wrapAll('<div class="section-wrapper_bg-white" />'); 30 } 31 bgColorTrigger = !bgColorTrigger; 32 $(this).find('.module-header').css('display', 'none'); 33 } 34 if (bgColorTrigger) { 35 $(this).addClass("section-wrapper_bg-white"); 36 } else { 37 $(this).removeClass("section-wrapper_bg-white"); 38 } 39 bgColorTrigger = !bgColorTrigger; 40 }); 41 42 } 43 44 // #endregion --- Svg convert 45 youtubeIframeWrapper.initialize(); 46 47 48 // #endregion --- Bg color white 49 contentTableWrapper.initialize(); 50 51 52 // #region --- Top image module gradient over 53 54 if ($('.top-image-module + .about-short-module.section-wrapper_bg-white').length) { 55 $('.top-image-module').addClass('gradient-over'); 56 } 57 58 // #endregion 59 60 61 if ($('.breadcrumbs-wrapper').length) { 62 topMenuCurrent.initialize(); 63 } 64 65 if ($('.header-search__wrapper').length) { 66 mobileSearchReposition(); 67 68 $(window).on('resize', mobileSearchReposition); 69 } 70 71 72}); // End on document load 73 74function mobileSearchReposition() { 75 if (window.matchMedia('(min-width: 1280px)').matches) { 76 if ($('.header-search__wrapper').hasClass('search-mobile')) { 77 $('.header-nav').append($('.header-search__wrapper')); 78 $('.header-search__wrapper').removeClass('search-mobile'); 79 } 80 } else { 81 if (!$('.header-search__wrapper').hasClass('search-mobile')) { 82 $('.header-nav').prepend($('.header-search__wrapper')); 83 $('.header-search__wrapper').addClass('search-mobile'); 84 } 85 } 86} 87 88var convertSvgImg = (function () { 89 90 var initialize = function () { 91 $('img.svg-convert[src$=".svg"],img.svg-convert[data-src$=".svg"], a[class*=sv-content-link] > img[src$=".svg"]').each(function (index, element) { 92 var $img = $(element); 93 var imgID = $img.attr('id'); 94 var imgClass = $img.attr('class'); 95 var imgURL = $img.attr('data-src'); 96 if (!imgURL) { 97 imgURL = $img.attr('src'); 98 } 99 //console.log(imgID); 100 101 if (imgURL.endsWith(".svg")) { 102 $.get(imgURL, function (data) { 103 // Get the SVG tag, ignore the rest 104 var $svg = $(data).find('svg'); 105 // Add replaced image's ID to the new SVG 106 107 if (typeof imgID !== 'undefined') { 108 $svg = $svg.attr('id', imgID); 109 } 110 // Add replaced image's classes to the new SVG 111 if (typeof imgClass !== 'undefined') { 112 $svg = $svg.attr('class', imgClass + ' svg-converted'); 113 } 114 // Remove any invalid XML tags as per http://validator.w3.org 115 $svg = $svg.removeAttr('xmlns width height version'); 116 // Replace image with new SVG 117 $img.replaceWith($svg); 118 119 }, 'xml').fail(function () { 120 // alert('woops'); // or whatever 121 }); 122 } else { 123 $img.attr('src', imgURL); 124 } 125 }); 126 } 127 128 return { 129 initialize: initialize 130 } 131 132}()); 133 134var youtubeIframeWrapper = (function () { 135 136 var initialize = function () { 137 $('iframe[src*="youtube.com"]').each(function () { 138 $(this).wrap('<div class="iframe-yt-wrapper"></div>'); 139 }); 140 }; 141 142 return { 143 initialize: initialize 144 } 145 146}()); 147 148var contentTableWrapper = (function () { 149 150 var initialize = function () { 151 $('#access-content table').each(function () { 152 $(this).addClass('table').wrap('<div class="table-responsive"></div>'); 153 }); 154 }; 155 156 return { 157 initialize: initialize 158 } 159 160}()); 161 162var topMenuCurrent = (function () { 163 164 var initialize = function () { 165 166 var breadcrumbsList = []; 167 168 $('.breadcrumbs-wrapper .breadcrumbs__item a span').each(function () { 169 breadcrumbsList.push($.trim($(this).text().toString())); 170 }); 171 $('.navbar .first-level-link').each(function () { 172 173 if ($.trim($(this).text()).toString() == breadcrumbsList[1] || $.trim($(this).text()).toString() == breadcrumbsList[2]) { 174 $(this).addClass('current'); 175 } 176 }); 177 178 }; 179 180 return { 181 initialize: initialize 182 }; 183 184}()); 185 186 187 188function toggleChat() { 189 const chatPopup = document.getElementById("chatPopup"); 190 const chatPopupButton = document.getElementById("img-chat"); 191 const iframeChat = document.querySelector(".iframe-chat"); 192 if (chatPopup.style.display === "block") { 193 chatPopupButton.style.display = "block"; 194 chatPopup.style.display = "none" 195 iframeChat.src = ""; 196 } else { 197 chatPopupButton.style.display = "none"; 198 chatPopup.style.display = "block"; 199 iframeChat.src = "https://bot.rambam.health.gov.il/dof/app_page/rambam_appointments/km/he"; 200 } 201} 202 203
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.