1 2; /* Start:"a:4:{s:4:"full";s:60:"/local/templates/rscf/static/js/about_page.js?17737443774947";s:6:"source";s:45:"/local/templates/rscf/static/js/about_page.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3 4$(document).ready(function() { 5 $('.principles-slider').slick({ 6 dots: true, 7 arrows: true, 8 infinite: true, 9 speed: 300, 10 slidesToShow: 1, 11 adaptiveHeight: true, 12 appendDots: $('.principles-dots'), 13 prevArrow: '.principles-arrow-prev', 14 nextArrow: '.principles-arrow-next' 15 }); 16 17 $('.quotes-slider').slick({ 18 dots: true, 19 arrows: true, 20 infinite: true, 21 speed: 300, 22 slidesToShow: 1, 23 adaptiveHeight: true, 24 appendDots: $('.quotes-dots'), 25 prevArrow: '.quotes-arrow-prev', 26 nextArrow: '.quotes-arrow-next' 27 }); 28 29 $('.infographics-slider').slick({ 30 dots: true, 31 arrows: true, 32 infinite: true, 33 speed: 300, 34 slidesToShow: 1, 35 adaptiveHeight: true, 36 appendDots: $('.infographics-dots'), 37 prevArrow: '.infographics-arrow-prev', 38 nextArrow: '.infographics-arrow-next' 39 }); 40 41 function initActivityGallery() { 42 $('.activity-gallery').each(function() { 43 var $gallery = $(this); 44 if ($gallery.data('activity-initialized')) { 45 return; 46 } 47 $gallery.data('activity-initialized', true); 48 49 var $thumbs = $gallery.find('.activity-gallery__thumb'); 50 if ($thumbs.length === 0) { 51 return; 52 } 53 54 var $mainImage = $gallery.find('.activity-gallery__main-image'); 55 var $mainLink = $gallery.find('.activity-gallery__main-link'); 56 var $mainButton = $gallery.find('.activity-gallery__main-button'); 57 58 function setActiveThumb($thumb) { 59 $thumbs.removeClass('is-active').attr('aria-selected', 'false'); 60 $thumb.addClass('is-active').attr('aria-selected', 'true'); 61 62 var mainSrc = $thumb.attr('data-main-src'); 63 var link = $thumb.attr('data-link'); 64 var title = $thumb.attr('data-title') || ''; 65 66 if (mainSrc) { 67 $mainImage.attr('src', mainSrc); 68 } 69 $mainImage.attr('alt', title); 70 71 if (link) { 72 $mainLink 73 .attr('href', link) 74 .attr('target', '_blank') 75 .removeClass('is-disabled') 76 .attr('aria-disabled', 'false') 77 .removeAttr('tabindex'); 78 $mainButton 79 .attr('href', link) 80 .attr('target', '_blank') 81 .removeClass('is-disabled') 82 .attr('aria-disabled', 'false') 83 .removeAttr('tabindex'); 84 } else { 85 $mainLink 86 .removeAttr('href') 87 .addClass('is-disabled') 88 .attr('aria-disabled', 'true') 89 .attr('tabindex', '-1'); 90 $mainButton 91 .removeAttr('href') 92 .addClass('is-disabled') 93 .attr('aria-disabled', 'true') 94 .attr('tabindex', '-1'); 95 } 96 } 97 98 $thumbs.on('click', function(e) { 99 e.preventDefault();
100 setActiveThumb($(this)); 101 }); 102 103 var $initial = $thumbs.filter('.is-active').first(); 104 setActiveThumb($initial.length ? $initial : $thumbs.first()); 105 }); 106 } 107 108 function initActivityDigest() { 109 $('.activity-digest').each(function() { 110 var $digest = $(this); 111 if ($digest.data('activity-digest-initialized')) { 112 return; 113 } 114 $digest.data('activity-digest-initialized', true); 115 116 var $slides = $digest.find('.activity-digest__slide'); 117 if ($slides.length === 0) { 118 return; 119 } 120 121 var currentIndex = $slides.index($slides.filter('.is-active').first()); 122 if (currentIndex < 0) { 123 currentIndex = 0; 124 } 125 126 function showSlide(index) { 127 $slides.removeClass('is-active').attr('aria-hidden', 'true'); 128 $slides.eq(index).addClass('is-active').attr('aria-hidden', 'false'); 129 } 130 131 showSlide(currentIndex); 132 133 var $nextButton = $digest.find('[data-activity-next]'); 134 if ($slides.length <= 1) { 135 $nextButton.addClass('is-hidden').attr('aria-hidden', 'true'); 136 return; 137 } 138 139 $nextButton.on('click', function() { 140 currentIndex = (currentIndex + 1) % $slides.length; 141 showSlide(currentIndex); 142 }); 143 }); 144 } 145 146 initActivityGallery(); 147 initActivityDigest(); 148 149 if (window.BX) { 150 BX.addCustomEvent('onAjaxSuccess', function() { 151 setTimeout(function() { 152 initActivityGallery(); 153 initActivityDigest(); 154 }, 100); 155 }); 156 } 157}); 158 159/* End */ 160;; /* /local/templates/rscf/static/js/about_page.js?17737443774947*/
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.