1var ytPlayers=[];var ready=false;var previousSlide=null;function onYouTubePlayerAPIReady(){initSlider();} 2$('.home-slider').on('init',function(){if($('.home-slider .slide-youtube').length>0){var tag=document.createElement('script');tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName('script')[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag);}else{initSlider();}}).on('beforeChange',function(event,slick,currentSlide,nextSlide){previousSlide=currentSlide;}).on('afterChange',function(event,slick,currentSlide){var previousSlide=window.previousSlide;console.log(previousSlide,currentSlide);if(previousSlide!=currentSlide){var previousSlide=slick.$slides[previousSlide];if($(previousSlide).hasClass('slide-youtube')){var id=parseInt($(previousSlide).data('player'));ytPlayers[id].stopVideo();console.log('stop');}else if($(previousSlide).hasClass('slide-video')){var video=previousSlide.querySelector('video');video.pause();video.currentTime=0;}}}).slick({dots:false,infinite:true,slidesToShow:1,arrows:false,slide:'.home-slider > .slide',adaptiveHeight:true,autoplay:true,speed:1000,pauseOnHover:false,autoplaySpeed:5000,});function initSlider(){var player_id=0;$('.home-slider .slide').each(function(){console.log();var key=$(this).data('key');if(typeof key==="undefined"||key===null||key===''){return} 3var videoInfo=videoData[key];if($(this).hasClass('slide-video')){ready=false;$(this).find('video').on("play",function(e){vidRescale() 4$(this).parents('.slide').find(".screen-cover, .play-video, .link-go-down, .flash-info-btn").addClass("hide");$("body.home .link-live-exp").stop().fadeOut();}).on("pause",function(){$(this).parents('.slide').find(".screen-cover, .play-video, .link-go-down, .flash-info-btn").removeClass("hide");$("body.home .link-live-exp").stop().fadeIn();});$(this).click(function(){var slick=$('.home-slider').slick('getSlick');if(slick.$slides[slick.currentSlide]===this){var video=$(this).find('video')[0] 5if(video.paused){video.play();}else{video.pause();}}});}else if($(this).hasClass('slide-youtube')){ytPlayers[player_id]=new YT.Player($(this).find('.screen')[0],{events:{'onReady':onPlayerReady,'onStateChange':function(e){if(e.data===1){$(e.target.getIframe()).parents('.slide').find(".screen-cover, .play-video, .link-go-down, .flash-info-btn").addClass("hide");$("body.home .link-live-exp").stop().fadeOut();$(".fullsize-embed-home").addClass("playing");vidRescale();}else{$(e.target.getIframe()).parents('.slide').find(".screen-cover, .play-video, .link-go-down, .flash-info-btn").removeClass("hide");$("body.home .link-live-exp").stop().fadeIn();$(".fullsize-embed-home").removeClass("playing");vidRescale();}}},playerVars:videoInfo.playerVars});$(this).data('player',player_id);player_id++;$(this).click(function(){var slick=$('.home-slider').slick('getSlick');if(slick.$slides[slick.currentSlide]===this){var id=parseInt($(this).data('player'));if(ytPlayers[id].getPlayerState()==YT.PlayerState.PLAYING){ytPlayers[id].pauseVideo()}else{ytPlayers[id].playVideo()}}});}});$(window).on('load resize',vidRescale);} 6function onPlayerReady(e){ready=true;var key=parseInt($(e.target.getIframe()).parents('.slide').data('key'));var vid={'videoId':videoData[key].id,'suggestedQuality':'hd1080','startSeconds':0};e.target.cueVideoById(vid).mute().setLoop($('body').hasClass('mobile')?false:true);vidRescale();} 7function vidRescale(){var dom=$(".fullsize-embed-home");var w=Math.max(dom.width(),(dom.height()+340)/0.5625),h=Math.max(dom.height()+340,dom.width()*0.5625);if(ready){for(var i in ytPlayers){if(ytPlayers.hasOwnProperty(i)){ytPlayers[i].setSize(w,h);}}} 8$('.home-slider .slide-video video').each(function(){if(h>$(this).height()){this.style.height=h+'px';} 9if(w>$(this).width()){this.style.width=w+'px';}});} 10$(".link-go-down").click(function(e){e.preventDefault();$('html, body').animate({scrollTop:$(".fullsize-embed-home").height()},1000);});
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.