1/* accessibility skip blocks */ 2$(function() { 3 var i = 0; 4 5 $(".skip").click(function(e){ 6 e.preventDefault(); 7 8 var focusableElements = $(":focusable"); 9 10 var block = $("#" + $(this).data("block")); 11 var last = block.find(":focusable").last(); 12 var index = focusableElements.index(last); 13 14 console.log(index); 15 16 if (index < focusableElements.length - 1) { 17 focusableElements.eq(index+1).focus(); 18 } 19 else { 20 focusableElements.eq(0).focus(); 21 $("html, body").animate({ scrollTop: 0 }, "slow"); 22 } 23 }); 24 25 $(".skip").focus(function(){ 26 var block = $(this).data("block"); 27 $("#" + block).addClass("mark-block"); 28 }).blur(function(){ 29 var block = $(this).data("block"); 30 $("#" + block).removeClass("mark-block"); 31 }); 32}); 33 34/* pdf viewer */ 35$(function(){ 36 $("a.pdf").each(function(){ 37 var href = $(this).attr('href'); 38 39 var ratio = 210 / 297; 40 41 if ($(this).data("ratio")) { 42 ratio = eval($(this).data("ratio")); 43 } 44 45 var height = $(window).width() * ratio + 200; 46 47 if ($(this).data("height")) { 48 height = $(this).data("height"); 49 } 50 51 var iframe = '<iframe src="pdfjs/web/?pdf='+encodeURIComponent(href)+'" frameborder="0" width="100%" height="'+height+'"></iframe>'; 52 var icon = '<em class="fa fa-chevron-circle-left"></em>'; 53 54 $(this).wrap('<div class="pdf-holder"></div>'); 55 $(this).before(iframe); 56 57 $(this).html(icon + $(this).html()); 58 }); 59}); 60 61/* ajax forms */ 62$(function() { 63 var options = { 64 success: function (responseText, statusText, xhr, $form) { 65 responseArray = $.parseJSON(responseText); 66 if (responseArray['status'] == 1) { 67 $form.html("<div class='sent'>× ×©×× ××צ×××!</div>"); 68 $form.focus(); 69 } 70 else { 71 alert("×ש ×××× ×ת ×× ×ש××ת ××ס××× ×× ×××××"); 72 } 73 } 74 }; 75 76 $('.ajax-form').ajaxForm(options); 77}); 78 79/* 16-9 */ 80$(function() { 81 function fit_lcd() { 82 $(".fit-lcd").each(function(){ 83 var width = $(this).width(); 84 var dest_height = width / (16 / 9); 85 86 $(this).height(dest_height); 87 }); 88 } 89 $(document).ready(function(){ 90 fit_lcd(); 91 }); 92 $(window).resize(function(){ 93 fit_lcd(); 94 }); 95}); 96 97/* slick toggle */ 98(function($){ 99 var pauseSlick = function($pauseBtn){ 100 $($pauseBtn.data("slickname")).slick('slickPause'); 101 $pauseBtn.addClass('paused'); 102 $pauseBtn.html( 103 '<span class="offset">' + 104 $pauseBtn.data("playcaption") + 105 '</span>' + 106 '<em class="fa fa-play" title="' + $pauseBtn.data("playcaption") + '"></em>' 107 ); 108 }; 109 var playSlick = function($pauseBtn){ 110 $($pauseBtn.data("slickname")).slick('slickPlay'); 111 $pauseBtn.removeClass('paused'); 112 $pauseBtn.html( 113 '<span class="offset">' + 114 $pauseBtn.data("pausecaption") + 115 '</span>' + 116 '<em class="fa fa-pause" title="' + $pauseBtn.data("pausecaption") + '"></em>' 117 ); 118 }; 119 120 $.fn.slickToggleButton = function() { 121 122 if ($(this).hasClass('paused')){ 123 pauseSlick($(this)); 124 } else { 125 playSlick($(this)); 126 } 127 128 $(this).on('click', function(){ 129 if ($(this).hasClass('paused')){ 130 playSlick($(this)); 131 } else { 132 pauseSlick($(this)); 133 } 134 }); 135 136 return this; 137 }; 138})(jQuery); 139 140/* Smart Forms Errors */ 141 142$(".input.error").each(function(){ 143 $(this).find("input").addClass('form-control-danger'); 144}); 145 146/* pages gallery */ 147 148$(document).ready(function() { 149 $('.magnificPopup-gallery').magnificPopup({ 150 delegate: 'a', 151 type: 'image', 152 tLoading: 'Loading image #%curr%...', 153 mainClass: 'mfp-img-mobile', 154 gallery: { 155 enabled: true, 156 navigateByImgClick: true, 157 preload: [0,1] // Will preload 0 - before current, and 1 after the current image 158 }, 159 image: { 160 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.', 161 titleSrc: function(item) { 162 return item.el.attr('title'); 163 } 164 } 165 }); 166 167 $('.magnificPopup-picture').magnificPopup({ 168 type: 'image', 169 closeOnContentClick: true, 170 closeBtnInside: false, 171 fixedContentPos: true, 172 mainClass: 'mfp-no-margins mfp-with-zoom', 173 image: { 174 verticalFit: true 175 }, 176 zoom: { 177 enabled: true, 178 duration: 300 179 } 180 }); 181}); 182 183// external link 184$(".external-link").each(function(){ 185 var html = $(this).html(); 186 html += ' <em class="fa fa-external-link"></em><span class="offset">× ×¤×ª× ××××× ××ש</span>'; 187 $(this).html(html); 188}); 189 190// tables 191$(".rich-content table:not([class]").addClass("table table-responsive"); 192 193// mobile friendly tables 194$(".table-mobile-friendly").each(function(){ 195 var i = 0; 196 197 $(this).find("thead th").each(function(){ 198 i++; 199 200 $(this).parents("table").first().find("tbody tr").find("td:nth-child("+i+")").prepend("<strong class='table-mobile-friendly-caption'>" + $(this).text() + ":</strong> "); 201 }); 202}); 203 204// marquee toggle button 205$('.marquee-toggle-btn').each(function(){ 206 207 var $toggleButton = $(this); 208 var $marquee = $($toggleButton.data('marquee'));
209 var moduleName = $toggleButton.data('module-name'); 210 211 $(this).attr('aria-label', 'עצ×ר ×ª× ×עת ' + moduleName); 212 $(this).html('<em class="fa fa-pause"></em>'); 213 214 let isPaused = false; 215 216 $toggleButton.on('click', function() { 217 if (isPaused) { 218 $marquee.marquee('resume'); 219 $(this).attr('aria-label', 'עצ×ר ×ª× ×עת ' + moduleName); 220 $(this).html('<em class="fa fa-pause"></em>'); 221 } else { 222 $marquee.marquee('pause'); 223 $(this).attr('aria-label', '××¤×¢× ×ª× ×עת ' + moduleName); 224 $(this).html('<em class="fa fa-play"></em>'); 225 } 226 isPaused = !isPaused; 227 }); 228});
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.