1(function($, $doc, $wnd, $body) { 2 var $overlay = $('.popup-overlay'), 3 $newsletterPopup = $('.newsletter-section-lightbox'), 4 $html = $('html'); 5 6 $(function() { 7 initSlider(); 8 initEventsSlider(); 9 initVideoSlider(); 10 initVideoFancybox(); 11 initEventPopup(); 12 initScrollBar(); 13 eventsHandling(); 14 }); 15 16 $wnd.on('resize orientationchange', function () { 17 initMatchHeight(); 18 }); 19 20 $wnd.on('load', function () { 21 initMatchHeight(); 22 }); 23 24 function eventsHandling() { 25 $('.newsletter-popup a').on('click', function (e) { 26 e.preventDefault(); 27 openNewsletterPopup(); 28 }); 29 $('.fancybox-close').on('click', function () { 30 closeNewsletterPopup(); 31 }); 32 $('.popup-overlay').on('click', function () { 33 closeNewsletterPopup(); 34 }); 35 $('html').keydown(function (e) { 36 if (e.keyCode == 27) { 37 closeNewsletterPopup(); 38 } 39 }); 40 } 41 42 /** 43 * function to init top homepage slider 44 */ 45 function initSlider() { 46 var $topSlider = $('.home-top-slider'); 47 $topSlider.bxSlider({ 48 auto: true, 49 mode: 'fade', 50 speed: 1000, 51 pause: 7000, 52 nextText: '<i class="icon-right-arrow"></i>', 53 prevText: '<i class="icon-left-arrow"></i>' 54 }); 55 } 56 57 function openNewsletterPopup() { 58 $html.addClass('newsletter-opened'); 59 $overlay.addClass('opened'); 60 $newsletterPopup.addClass('opened'); 61 } 62 63 function closeNewsletterPopup() { 64 $html.removeClass('newsletter-opened'); 65 $overlay.removeClass('opened'); 66 $newsletterPopup.removeClass('opened'); 67 } 68 69 function initMatchHeight() { 70 if (!$('.socials-section').length) return false; 71 var $itemSmall = $('.soc-item-small'), 72 $socCol = $('.soc-col'); 73 $itemSmall.height($itemSmall.find('.img-wrap').width()); 74 $socCol.matchHeight(); 75 if ($(document).width() <= 800) { 76 $socCol.matchHeight({ remove: true }); 77 $('.soc-col.col-3').height($itemSmall.find('.img-wrap').width()); 78 } 79 } 80 81 function initEventsSlider() { 82 var $eventsSlider = $('.events-slider'); 83 if (!$eventsSlider.length) return false; 84 $eventsSlider.on('init', function (event, slick) { 85 $eventsSlider.append('<span class="space left"></span><span class="space right"></span>'); 86 $('.events-carousel-holder').css('opacity', 1); 87 }) 88 var eventSlick = $eventsSlider.slick({ 89 dots: false, 90 infinite: false, 91 speed: 300, 92 slidesToShow: 3, 93 slidesToScroll: 1, 94 prevArrow: '<span class="events-slider-arrows prev icon-left-arrow"></span>', 95 nextArrow: '<span class="events-slider-arrows next icon-right-arrow"></span>', 96 responsive: [ 97 { 98 breakpoint: 900, 99 settings: { 100 slidesToShow: 2 101 } 102 }, 103 { 104 breakpoint: 641, 105 settings: { 106 slidesToShow: 1 107 } 108 } 109 ] 110 }); 111 } 112 113 function initVideoSlider() { 114 var $videoSlider = $('.fullwidth-video-slider'); 115 if (!$videoSlider.length) return false; 116 $videoSlider.slick({ 117 dots: false, 118 infinite: true, 119 speed: 300, 120 slidesToShow: 1, 121 slidesToScroll: 1, 122 prevArrow: '<span class="events-slider-arrows prev icon-left-arrow"></span>', 123 nextArrow: '<span class="events-slider-arrows next icon-right-arrow"></span>', 124 }); 125 } 126 127 function initVideoFancybox() { 128 var $parent = $('.fullwidth-video-popup-wrap'); 129 $(".video-link").click(function (e) { 130 e.preventDefault(); 131 var urlMp4 = $(this).data('video-mp4'), 132 urlOgg = $(this).data('video-ogg'), 133 urlWebm = $(this).data('video-webm'), 134 content; 135 var myPlayer; 136 $.fancybox({ 137 type: 'html', 138 scrolling: 'no', 139 loop: false, 140 fitToView: true, 141 openEffect: 'fade', 142 closeEffect: 'fade', 143 nextEffect: 'fade', 144 prevEffect: 'fade', 145 openSpeed: 400, 146 closeSpeed: 300, 147 parent: $parent, 148 149 beforeLoad: function () { 150 content = '<div class="video-js-box">' + 151 '<video id="video_player" class="video-js" controls preload>' + 152 '<source src="' + urlMp4 + '" type="video/mp4"><source src="' + urlWebm + '" type="video/webm"><source src="' + urlOgg + '" type="video/ogg">' + 153 '</video>' + 154 '</div>'; 155 }, 156 afterLoad: function(){ 157 this.content = content; 158 }, 159 beforeShow: function() { 160 var options = { 161 controlBar: { 162 volumeMenuButton: { 163 inline: false, 164 vertical: true 165 } 166 } 167 }; 168 videojs("video_player", options).ready(function(){ 169 myPlayer = this; 170 myPlayer.play(); 171 172 }); 173 }, 174 afterClose: function () {
175 myPlayer.dispose(); 176 }, 177 helpers : { 178 media : {} 179 } 180 181 }); 182 }); 183 } 184 185 function initEventPopup() { 186 var $parent = $('.events-fancybox-wrap'); 187 $('.various').fancybox({ 188 scrolling: 'no', 189 loop: false, 190 fitToView: true, 191 openEffect: 'fade', 192 closeEffect: 'fade', 193 nextEffect: 'fade', 194 prevEffect: 'fade', 195 openSpeed: 400, 196 closeSpeed: 300, 197 parent: $parent 198 }); 199 } 200 201 function initScrollBar() { 202 $('.custom-scroll').mCustomScrollbar({theme: 'dark'}); 203 } 204 205}(jQuery, jQuery(document), jQuery(window), $('body')));
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.