var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,d,c){b instanceof String&&(b=String(b));for(var e=b.length,a=0;athis.status){var a=JSON.parse(this.responseText);b(a[0].thumbnail_large)}};f.send();f=null}var e=function(){var a={};return function(b){var f=$.Deferred();b in a?a[b]?f.resolve(a[b]):f.reject("Preview image not found."):$("").on("load",function(){if(120===(this.naturalWidth||this.width)){var c=this.src.split("/").pop();switch(c){case "maxresdefault.jpg":this.src= this.src.replace(c,"sddefault.jpg");break;case "sddefault.jpg":this.src=this.src.replace(c,"hqdefault.jpg");break;case "hqdefault.jpg":this.src=this.src.replace(c,"default.jpg");break;default:a[b]=null,f.reject("Preview image not found.")}}else f.resolve(a[b]=this.src)}).attr("src","https://img.youtube.com/vi/"+b+"/maxresdefault.jpg");return f}}();if(!$("html").hasClass("is-builder"))$(document).on("add.cards",function(a){if($(a.target).hasClass("carousel")){var h=$("html").hasClass("desktop");$(a.target).outerFind("[data-bg-video-slide]").each(function(){var a= d($(this).attr("data-bg-video-slide"));if(a){var k=$('
').css({display:"none",backgroundSize:"cover",backgroundPosition:"center"});$(".container-slide",this).before(k);var l=b($(this).attr("data-bg-video-slide")),g=$(this).find(".mbr-overlay");"youtube"===l?(e(a).done(function(a){k.css("background-image",'url("'+a+'")').show()}),h&&$.fn.YTPlayer&&!$(this).find(".playerBox").length&&($(".container-slide",this).before('
').prev().YTPlayer({videoURL:a, containment:"self",showControls:!1,mute:!0}),g.length&&$(".YTPOverlay",this).css({opacity:g.css("opacity"),backgroundColor:g.css("background-color")}),$(this).find(".image_wrapper img").css("opacity","0"),$(this).find(".image_wrapper .mbr-overlay").css("opacity","0"))):(c(a,function(a){k.css("background-image",'url("'+a+'")').show()}),h&&$.fn.vimeo_player&&!$(this).find(".playerBox").length&&($(".container-slide",this).before('
').prev().vimeo_player({videoURL:a, containment:"self",showControls:!1,mute:!0}),g.length&&$(".vimeo_player_overlay",this).css({opacity:g.css("opacity"),backgroundColor:g.css("background-color")})))}});$(a.target).find(".carousel-item iframe").css({transitionProperty:"opacity",transitionDuration:"1000ms"});$(this).on("slide.bs.carousel","section.carousel",function(a){$(a.target).find(".carousel-item.active .mb_YTPlayer").each(function(){$(this).YTPPause()});$(a.target).find(".carousel-item.active .vimeo_player").each(function(){$(this).v_pause()}); $(a.target).find(".carousel-item:not(.active) iframe").css("opacity",0)});$(this).on("slid.bs.carousel","section.carousel",function(a){$(a.target).find(".carousel-item.active .mb_YTPlayer").each(function(){$(this).YTPPlay()});$(a.target).find(".carousel-item.active .vimeo_player").each(function(){$(this).v_play()});$(a.target).find(".carousel-item.active iframe").resize().css("opacity",1)})}})})();