!function(t){if("undefined"==typeof YT||void 0===YT.Player){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}t(document).ready(function(){var e,a,r={};var i=document.createElement("video");function n(t){d(),t.target.mute(),t.target.playVideo()}function o(t){0===t.target.getPlayerState()&&t.target.playVideo()}function d(){t(".parallax-container-inner iframe.to-para-youtube").each(function(){var e,a=t(this),r=a.parent().width(),i=a.parent().height();if(a.data("youtube-ratio")?e=a.attr("data-youtube-ratio"):(e=this.height/this.width,a.attr("data-youtube-ratio",e)),a.removeAttr("height width"),r*e>=i)a.height(r*e).width("100%").css("margin-top",-(r*e-i)/2).css("margin-left",0);else{var n=-(i/e-r)/2;a.height(i).width(i/e).css("margin-left",n).css("margin-top",0)}})}e=i.canPlayType?1:0,window.onYouTubeIframeAPIReady=function(){a=1,t(".to-para-youtube").each(function(i){var d,u,c=t(this),s=(u=(d=c).attr("data-youtube-url").match(/(\?v=|\&v=|\/\d\/|\/embed\/|\/v\/|\.be\/)([a-zA-Z0-9\-\_]+)/)[2],d.attr("id","player"+a),u);t(this).attr("id");r[a]=new YT.Player("player"+a,{videoId:s,playerVars:{autoplay:1,modestbranding:1,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:3,html5:e},events:{onReady:n,onStateChange:o}}),a++})},t(window).on("resize",function(){d()})})}(jQuery,window);