1(function(){jQuery(function(){if(typeof $==='undefined')$=jQuery;greyd.backgrounds.init();greyd.lazyload.init();greyd.cssAnims.init()})})(jQuery);function onYouTubeIframeAPIReady(){greyd.backgrounds.initYoutubeVideos();if(typeof icons!=='undefined'&&typeof icons.initYoutubeVideos==='function'){icons.initYoutubeVideos()}} 2greyd.backgrounds=new function(){this.bgs={};this.init=function(){if($('.greyd-background').length==0){return} 3var youtubefound=!1;$('.greyd-background').each(function(){var id=$(this).attr('id');var that=$(this);while(typeof id==='undefined'){that=that.parent();if(that.length==0)id="";else id=that.attr('id')} 4if(id=="")return;var resize=!1;if($(this).hasClass('bg_full')||$(this).hasClass('bg_window')) 5resize=!0;var scroll=[];$('#'+id+' .bg_vparallax').each(function(){scroll.push({container:this,scroll:'vparallax',speed:$(this).data('bg_parallax_speed'),enable_mobile:$(this).data('bg_parallax_enable_mobile')})});$('#'+id+' .bg_hparallax').each(function(){scroll.push({container:this,scroll:'hparallax',speed:$(this).data('bg_parallax_speed'),enable_mobile:$(this).data('bg_parallax_enable_mobile')})});var video=!1;$('#'+id+' .bg_video').each(function(){video={src:$(this).children(0).data('bg_video_src'),video_id:$(this).children(0).data('bg_video_id'),video_aspect:$(this).children(0).data('bg_video_ar'),container_id:$(this).children(0).children(0).attr('id'),};if(video.src=="youtube")youtubefound=!0});if(!greyd.backgrounds.bgs[id]){greyd.backgrounds.bgs[id]={container:this,resize:resize,scroll:scroll,video:video}}});if(youtubefound){if(typeof YT==='undefined'){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 this.initYoutubeVideos()} 6this.addEvents()} 7this.initYoutubeVideos=function(){for(var id in greyd.backgrounds.bgs){var bg=greyd.backgrounds.bgs[id];if(bg.video&&bg.video.src=="youtube"){bg.video.player=new YT.Player(bg.video.container_id,{height:'100%',width:'100%',videoId:bg.video.video_id,playerVars:{autoplay:'1',loop:'1',controls:'0',modestbranding:'1',disablekb:'1'},events:{'onReady':greyd.backgrounds.onPlayerReady,'onStateChange':greyd.backgrounds.onPlayerStateChange}})}}} 8this.onPlayerReady=function(event){event.target.mute();event.target.playVideo();greyd.backgrounds.resize()} 9this.onPlayerStateChange=function(event){if(event.data==YT.PlayerState.ENDED){event.target.seekTo(0);event.target.playVideo()}} 10this.addEvents=function(){$(window).scroll(this.scroll);$(window).resize(this.resize);this.resize()} 11this.resize=function(){for(var id in greyd.backgrounds.bgs){var bg=greyd.backgrounds.bgs[id];if(bg.resize){greyd.backgrounds.resizeBackground(bg)} 12if(bg.video){greyd.backgrounds.resizeVideo(bg)}} 13greyd.backgrounds.scroll()} 14this.resizeBackground=function(bg){var margin=-($(bg.container).parent()[0].getBoundingClientRect().left);margin+=$('body')[0].getBoundingClientRect().left;if(Math.abs(parseInt(margin))*2<=window.innerWidth){if(Math.abs(parseInt(margin))!==0){$(bg.container).css('left',margin);$(bg.container).css('right',margin)}}} 15this.resizeVideo=function(bg){var pheight=$(bg.container).css('height').replace("px","");var pwidth=$(bg.container).css('width').replace("px","");var ar=bg.video.video_aspect.split("/");ar=ar[0]/ar[1];var height=pheight;var width=height*(ar);var margin_left=margin_top=0;if(width>=pwidth){margin_left=(pwidth-width)/2}else{width=pwidth;height=width/(ar);margin_top=(pheight-height)/2} 16var iframe=typeof bg.video.container_id==='undefined'?$(bg.container).find('iframe'):$("#"+bg.video.container_id);console.log(iframe);if(iframe&&iframe.length){iframe.css('height',height+"px");iframe.css('width',width+"px");iframe.css('margin-left',margin_left+"px");iframe.css('margin-top',margin_top+"px")}else{setTimeout(function(){iframe=$(bg.container).find('iframe');bg.video.container_id=iframe.attr('id');iframe.css('height',height+"px");iframe.css('width',width+"px");iframe.css('margin-left',margin_left+"px");iframe.css('margin-top',margin_top+"px")},100)}} 17this.scroll=function(){var is_mobile=($('html').hasClass('ios')||$('html').hasClass('android'));var viewportTop=$(window).scrollTop();
17var viewportHeight=$(window).height();var viewportBottom=viewportTop+viewportHeight;for(var id in greyd.backgrounds.bgs){if(greyd.backgrounds.bgs[id].scroll.length>0){var background=greyd.backgrounds.bgs[id];for(var i=0;i<background.scroll.length;i++){var bg=background.scroll[i].container;var scroll=background.scroll[i].scroll;var speed=background.scroll[i].speed;var enable_mobile=background.scroll[i].enable_mobile;if(!is_mobile||(is_mobile&&enable_mobile)){var elementTop=$(bg).offset().top;var elementHeight=$(bg).outerHeight();if(viewportBottom-elementTop>0&&viewportTop-elementTop<elementHeight){var delta=(viewportHeight-elementHeight)/2;var pos=((viewportBottom-elementTop-elementHeight-delta)*(speed/100.0));if(scroll=="vparallax"){if($(bg).hasClass('div_parallax')) 18$(bg).children(0).css('transform','translateY('+pos.toFixed(2)+'px)');else $(bg).css('background-position-y',pos.toFixed(2)+'px')} 19if(scroll=="hparallax"){if($(bg).hasClass('div_parallax')) 20$(bg).children(0).css('transform','translateX('+pos.toFixed(2)+'px)');else $(bg).css('background-position-x',pos.toFixed(2)+'px')}}}}}}}} 21greyd.lazyload=new function(){this.setup={lazyload:'false',};this.observer=!1;this.init=function(){if(typeof greyd.setup.lazyload!=='undefined'){this.setup.lazyload=greyd.setup.lazyload} 22if(this.setup.lazyload=='false'&&document.querySelectorAll('video[data-src]:not([src])')===0)return;var elements=document.querySelectorAll('.bg_image:not(.visible), video[data-src]:not([src])');if(elements.length===0){return} 23if(!greyd.lazyload.observer){greyd.lazyload.observer=new IntersectionObserver(function onIntersection(entries,opts){entries.forEach(entry=>{if(entry.isIntersecting){if(entry.target.classList.contains('bg_image')){var bg=entry.target;if(typeof bg.dataset.srcset!=='undefined'){var srcset=JSON.parse(bg.dataset.srcset);var newset={src:getComputedStyle(bg,!1).backgroundImage.replace('url("','').replace('")',''),newsrc:''};var width=window.screen.width*window.devicePixelRatio;for(var i in srcset){if(i>width&&newset.src!=srcset[i]){newset.newsrc=srcset[i];break}} 24if(newset.newsrc==''&&newset.src!=srcset.full){newset.newsrc=srcset.full} 25if(typeof newset.newsrc!=='undefined'&&newset.newsrc!=''){bg.style.backgroundImage='url('+newset.newsrc+')';elements.forEach((element)=>{if(!element.classList.contains('visible')){var src=getComputedStyle(element,!1).backgroundImage.replace('url("','').replace('")','');if(src==newset.src){element.style.backgroundImage='url('+newset.newsrc+')';element.classList.add('visible');greyd.lazyload.observer.unobserve(element)}}})}} 26bg.classList.add('visible');greyd.lazyload.observer.unobserve(bg)} 27if(entry.target.tagName.toLowerCase()=="video"){entry.target.src=entry.target.dataset.src;entry.target.load();delete entry.target.dataset.src;greyd.lazyload.observer.unobserve(entry.target)}}})},{threshold:0,})} 28elements.forEach((element)=>{greyd.lazyload.observer.observe(element)})}} 29greyd.cssAnims=new function(){this.observer=!1;this.init=function(){var objs=document.querySelectorAll('.animate-when-almost-visible');if(objs.length===0){return} 30if(!greyd.cssAnims.observer){greyd.cssAnims.observer=new IntersectionObserver(function onIntersection(entries,opts){entries.forEach(entry=>{var triggerClass="start-animation";if(entry.isIntersecting&&!entry.target.classList.contains(triggerClass)){entry.target.classList.add(triggerClass);entry.target.classList.add("animated");greyd.cssAnims.observer.unobserve(entry.target)}})},{threshold:0,})} 31objs.forEach((element)=>{greyd.cssAnims.observer.observe(element)})}}
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.