lagautrie.com
Open in
urlscan Pro
199.204.248.169
Public Scan
Submitted URL: http://lagautrie.com/assets/gallery/script.js
Effective URL: https://lagautrie.com/assets/gallery/script.js
Submission: On August 30 via api from US — Scanned from DE
Effective URL: https://lagautrie.com/assets/gallery/script.js
Submission: On August 30 via api from US — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(function(b){function y(a){b(a.target).closest(".mbr-slider").hasClass("in")&&a.target.playVideo()}function m(a){a=b(a.target);"undefined"!==typeof b.fn.masonry&&a.outerFind(".mbr-gallery").each(function(){var a=b(this).find(".mbr-gallery-row").masonry({itemSelector:".mbr-gallery-item:not(.mbr-gallery-item__hided)",percentPosition:!0,horizontalOrder:!0});a.masonry("reloadItems");a.on("filter",function(){a.masonry("reloadItems");a.masonry("layout");b(window).trigger("update.parallax")}.bind(this,a)); a.imagesLoaded().progress(function(){a.masonry("layout")})})}function q(a,b,d,c,g){var f=a.find("img");if(f[0].complete&&50<f[0].naturalWidth&&50<f[0].naturalHeight)r(f,a,b,d,c,g);else f.one("load",function(){r(f,a,b,d,c,g)})}function r(a,b,d,c,g,f){var l=a[0].naturalWidth,p=a[0].naturalHeight;c=c/d>l/p?(d-2*f)*l/p:c-2*f;c=c>=l?l:c;d=(d-c*p/l)/2;a.css({width:parseInt(c),height:c*p/l});b.css("top",d+g)}function z(a,e,d,c,g,f){a.find(".modal-dialog .carousel-item").each(function(){if(!f&&!b(this)[0].classList.contains("carousel-item-next")&& !b(this)[0].classList.contains("carousel-item-prev")||f&&!b(this)[0].classList.contains("active"))b(this)[0].classList.contains("video-container")?b(this).css({top:c,height:d-2*c-2*g}):q(b(this),d,e,c,g)})}function t(){var a=b(window).width()-0,e=b(window).height()-0;if(h){var d,c=!1;h.find(".modal-dialog .carousel-item.carousel-item-next, .modal-dialog .carousel-item.carousel-item-prev").length?d=h.find(".modal-dialog .carousel-item.carousel-item-next, .modal-dialog .carousel-item.carousel-item-prev"): (d=h.find(".modal-dialog .carousel-item.active"),c=!0);d[0].classList.contains("video-container")?d.css({top:0,height:e-0-20}):q(d,e,a,0,10);clearTimeout(u);u=setTimeout(z,200,h,a,e,0,10,c)}}var k=b("html").hasClass("is-builder");if(!k){var v=document.createElement("script");v.src="https://www.youtube.com/iframe_api";var w=document.getElementsByTagName("script")[0];w.parentNode.insertBefore(v,w);var n=[];b(".carousel-item.video-container img").css("display","none");window.onYouTubeIframeAPIReady= function(){var a=a||{};a.YTAPIReady||(a.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"));b(".video-slide").each(function(a){b(".video-container").eq(a).append('<div id ="mbr-video-'+a+'" class="mbr-background-video" data-video-num="'+a+'"></div>').append('<div class="item-overlay"></div>');b(this).attr("data-video-num",a);if(-1!==b(this).attr("data-video-url").indexOf("vimeo.com")){var d={id:b(this).attr("data-video-url"),width:"100%",height:"100%",loop:!0};a=new Vimeo.Player("mbr-video-"+a, d);a.playVideo=Vimeo.play}else{var d=YT.Player,c;c=b(this).attr("data-video-url");c="false"===c?!1:(c=/(?:\?v=|\/embed\/|\.be\/)([-a-z0-9_]+)/i.exec(c)||/^([-a-z0-9_]+)$/i.exec(c))?c[1]:!1;a=new d("mbr-video-"+a,{height:"100%",width:"100%",videoId:c,events:{onReady:y},playerVars:{rel:0}})}n.push(a)})}}b(document).on("add.cards",function(a){var e=b(a.target);e.on("click",".mbr-gallery-filter li",function(a){a.preventDefault();var c=b(this).closest("li");c.parent().find("li").removeClass("active"); c.addClass("active");a=c.closest("section").find(".mbr-gallery-row");var g=b(this)[0].textContent.trim();e.find(".mbr-gallery-item").each(function(a,e){var d=b(this),h=d.attr("data-tags").split(",").map(function(a){return a.trim()});-1!==b.inArray(g,h)||c.hasClass("mbr-gallery-filter-all")?d.removeClass("mbr-gallery-item__hided"):(d.addClass("mbr-gallery-item__hided"),d.css("left","300px"))});a.closest(".mbr-gallery-row").trigger("filter")})});if(k)b(document).on("changeButtonColor.cards",function(a){var e= b(a.target);if(0<e.find(".mbr-gallery-filter").length&&b(a.target).find(".mbr-gallery-filter").hasClass("gallery-filter-active")){var d=(e.find(".mbr-gallery-filter .mbr-gallery-filter-all").find("a").attr("class")||"").replace(/(^|\s)active(\s|$)/," ").trim();e.find(".mbr-gallery-filter ul li:not(.mbr-gallery-filter-all) a").attr("class",d)}m(a)});b(document).on("add.cards changeParameter.cards",function(a){var e=b(a.target),d=[];e.find(".mbr-gallery-item").each(function(a){(b(this).attr("data-tags")|| "").trim().split(",").map(function(a){a=a.trim();-1===b.inArray(a,d)&&d.push(a)})});if(0<e.find(".mbr-gallery-filter").length&&b(a.target).find(".mbr-gallery-filter").hasClass("gallery-filter-active")){var c="";e.find(".mbr-gallery-filter ul li:not(.mbr-gallery-filter-all)").remove();var g=(e.find(".mbr-gallery-filter .mbr-gallery-filter-all").find("a").attr("class")||"").replace(/(^|\s)active(\s|$)/," ").trim();d.map(function(a){c+='<li><a class="'+g+'" href>'+a+"</a></li>"});e.find(".mbr-gallery-filter ul").append(c)}m(a)}); b(document).on("change.cards",function(a){m(a)});b(document).on("lazyload",function(a){m(a);b(window).scrollEnd(function(){m(a)},250)});b(".mbr-gallery-item").on("click","a",function(a){a.stopPropagation()});var x,u,h,k=b(document).find(".mbr-gallery");k.on("show.bs.modal",function(a){clearTimeout(x);x=setTimeout(function(){var e=b(a.relatedTarget).parent().index(),e=b(a.target).find(".carousel-item").eq(e).find(".mbr-background-video");b(a.target).find(".carousel-item .mbr-background-video");0<e.length&& (e=n[+e.attr("data-video-num")],e.playVideo?e.playVideo():e.play())},500);h=b(a.target);t()});k.on("slide.bs.carousel",function(a){a=b(a.target).find(".carousel-item.active .mbr-background-video");0<a.length&&(a=n[+a.attr("data-video-num")],a.pauseVideo?a.pauseVideo():a.pause())});b(window).on("resize load",t);k.on("slid.bs.carousel",function(a){a=b(a.target).find(".carousel-item.active .mbr-background-video");0<a.length&&(a=n[+a.attr("data-video-num")],a.playVideo?a.playVideo():a.play())});k.on("hide.bs.modal", function(a){n.map(function(a,b){a.pauseVideo?a.pauseVideo():a.pause()});h=null})})(jQuery);