/*
 Copyright 2011-2017 Adobe Systems Incorporated. All Rights Reserved.
*/
(function(c){"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery","museutils"],c):c(jQuery)})(function(c){c.fn.museOverlay=function(b){var d=c.extend({autoOpen:!0,offsetLeft:0,offsetTop:0,$overlaySlice:c(),$slides:c(),$overlayWedge:c(),duration:300,overlayExtraWidth:0,overlayExtraHeight:0,$elasticContent:c()},b);return this.each(function(){var a=c(this).data("museOverlay");if(a&&a[b]!==void 0)return a[b].apply(this,Array.prototype.slice.call(arguments,1));var a=d.slideshow.options.isResponsive,
f=(d.slideshow.options.slideClassName=="Container"||d.slideshow.options.slideClassName=="SSSlide")&&a,h=c("body"),g=c("<div/>").appendTo(h).css({position:"fixed",top:0,left:0,zIndex:100001}).hide(),i=c("<div/>").append(d.$overlaySlice).appendTo(g).css({position:"absolute",top:0,left:0});c(this).css({position:"absolute",left:0,top:0,outline:"none"}).attr({role:"dialog",tabindex:"0"});Muse.Utils.appendChildren(g,c(this));var m=c(this);a&&(Muse.Utils.moveElementsOutsideViewport(d.slideshow.$element.parents()),
m.css({width:d.slideshow.$element.width()+"px"}),Muse.Utils.moveElementsInsideViewport(d.slideshow.$element.parents()));var j=g.siblings("div"),k=c(window),l,n,q=null,a=g.find("a, button, [tabindex], input, textarea, [contenteditable]"),o=a[0],p=a[a.length-1],r=d.$elasticContent,s=r.length?parseInt(r.css("padding-left"))+parseInt(r.css("padding-right"))+parseInt(r.css("border-left-width"))+parseInt(r.css("border-right-width")):0,v=r.length?parseInt(r.css("padding-top"))+parseInt(r.css("padding-bottom"))+
parseInt(r.css("border-top-width"))+parseInt(r.css("border-bottom-width")):0,y=d.$overlaySlice.outerWidth(),w=d.$overlaySlice.outerHeight(),t={isOpen:!1,reuseAcrossBPs:function(){d.reuseAcrossBPs=!0},handleClose:function(){t.close()},open:function(){if(!t.isOpen){if(!d.reuseAcrossBPs&&d.slideshow.$bp){if(!d.slideshow.$bp.hasClass("active"))return;d.slideshow.breakpoint.swapPlaceholderNodesRecursively(g);d.slideshow.breakpoint.activateIDs(g);c(window).trigger("lightboxresize")}Muse.Utils.showWidgetsWhenReady(g);
l=k.width();n=k.height();t.positionContent(l,n);g.show();i.css({opacity:0}).stop(!0);m.css({opacity:0}).stop(!0);j.attr("aria-hidden","true");window.setTimeout(function(){i.bind("click",t.handleClose)},300);i.animate({opacity:0.99},{queue:!1,duration:d.duration,complete:function(){i.css({opacity:""});m.animate({opacity:1},{queue:!1,duration:d.duration,complete:function(){m.css({opacity:""});t.applyPageDimensions();window.setTimeout(function(){m[0].focus()},void 0)}})}});c(document).bind("keydown",
t.onKeyDown);t.doLayout(l,n);t.isOpen=!0;k.bind("resize",t.onWindowResize);c("body").bind("muse_bp_deactivate",t.onBreakpointChange);t.onWindowResize(null,!0)}},close:function(a){i.unbind("click",t.handleClose);k.unbind("resize",t.onWindowResize);c("body").unbind("muse_bp_deactivate",t.onBreakpointChange);c(document).unbind("keydown",t.onKeyDown);if(d.onClose)d.onClose();i.css({opacity:0.99}).stop(!0);m.css({opacity:0.99}).stop(!0);m.animate({opacity:0},{queue:!1,duration:a?0:d.duration,complete:function(){i.animate({opacity:0},
{queue:!1,duration:a?0:d.duration,complete:function(){g.hide();m.css({opacity:""});i.css({opacity:""});j.removeAttr("aria-hidden")}})}});t.isOpen=!1},next:function(){if(d.onNext)d.onNext()},previous:function(){if(d.onPrevious)d.onPrevious()},focusTrap:function(a){a.keyCode===9&&(a.shiftKey?a.target===o&&p.focus():a.target===p&&o.focus())},onBreakpointChange:function(){t.close(!0)},onKeyDown:function(a){switch(a.which||a.keyCode){case 37:case 38:m.is(":focus")&&t.previous();break;case 39:case 41:m.is(":focus")&&
t.next();break;case 27:t.close()}t.focusTrap(a)},onWindowResize:function(a,b){var c=k.width(),d=k.height();(b||l!=c||n!=d)&&q==null&&(q=setTimeout(function(){l=k.width();n=k.height();t.doLayout(l,n);t.positionContent(l,n);q=null},10))},doLayout:function(a,b){g.css({width:0,height:0});d.$overlayWedge.css({width:0,height:0});var c=a-s,f=b-v;r.length&&r.hasClass("fullwidth")&&(r.width(c),d.resizeSlidesFn&&d.resizeSlidesFn(c,f));t.applyPageDimensions();Muse.Utils.updateSlideshow_fstpOffsetSize(d.slideshow)},
applyPageDimensions:function(){function a(){var b=document.createElement("div");b.style.overflow="scroll";b.style.visibility="hidden";b.style.position="absolute";b.style.width="100px";b.style.height="100px";document.body.appendChild(b);var c=b.offsetWidth-b.clientWidth;document.body.removeChild(b);return{width:c}}var b=c(document),h=b.width(),i=b.height(),b=m[0],k=c(b).find("."+d.slideshow.options.viewClassName),k=c(k[0]),j=document.documentElement||document.body;j.clientWidth!=j.offsetWidth&&(h=
j.scrollWidth-1);j.clientHeight!=j.offsetHeight&&i<j.scrollHeight&&(i=j.scrollHeight-1);g.css({width:h,height:i});d.$overlayWedge.css({width:h-y,height:i-w});f||m.css("height","");Muse.Utils.moveElementsOutsideViewport(d.slideshow.slides.$element);Muse.Utils.resizeImages(m,d.slideshow.$element.attr("id"));Muse.Utils.adjustTargetAndSlideHeights(k,d.slideshow.options.contentLayout_runtime);d.slideshow.options.elastic!="fullScreen"&&(h=k.closest(".popup_anchor"),i=c(h.children()[0]),h.height(i.outerHeight()));
Muse.Utils.moveElementsInsideViewport(d.slideshow.slides.$element);h=m.css("width");f?(Muse.Utils.moveElementsOutsideViewport(d.slideshow.$element.parents()),m.css("width",c("#page").width()*m.attr("lightbox-Ratio-WithPage")/100+"px"),Muse.Utils.moveElementsInsideViewport(d.slideshow.$element.parents())):(m.css("width",d.slideshow.$element.width()+"px"),m.css("height",d.slideshow.$element.height()+"px"));var i=d.$elasticContent,o,p;d.slideshow.options.contentLayout_runtime=="lightbox"&&i.length&&
i.hasClass("fullwidth")&&(o=i.length?parseInt(i.css("padding-left"))+parseInt(i.css("padding-right"))+parseInt(i.css("border-left-width"))+parseInt(i.css("border-right-width")):0,p=i.length?parseInt(i.css("padding-top"))+parseInt(i.css("padding-bottom"))+parseInt(i.css("border-top-width"))+parseInt(i.css("border-bottom-width")):0,o=c(window).width()-o,p=c(window).height()-p);d.slideshow.$clip&&c(d.slideshow.$clip[0]).height(d.slideshow.slides.$element.outerHeight()+"px");d.slideshow.$view&&d.slideshow.$view.height(d.slideshow.slides.$element.outerHeight()+
"px");d.slideshow._fstpPositionSlides&&(d.slideshow.options.contentLayout_runtime=="lightbox"&&i.length&&i.hasClass("fullwidth")?d.slideshow._fstpPositionSlides(o,p):d.slideshow._fstpPositionSlides());o=d.slideshow.options.isResponsive;b=c(c(b).find("."+d.slideshow.options.viewClassName)[0]);if(b.length)o?(b.attr("data-slidewidth"),p=c(m[0]).width()*parseFloat(b.attr("data-slidewidth"))/100):p=d.slideshow.slides.$element.outerWidth(),i=d.slideshow.slides.$element.outerHeight(),d.slideshow.options&&
d.slideshow.options.transitionStyle&&d.slideshow.options.transitionStyle!=="vertical"&&i&&i>c(window).height()?(i=a(),o?(o=(p+i.width)/c(m[0]).width()*100+"%",b.width(o),b.parent().hasClass("wp-slideshow-clip")?b.parent().css({maxHeight:"100vh",overflowY:"auto"}):b.css({maxHeight:"100vh",overflowY:"auto"})):(m[0].childNodes[0].style.width=p+i.width+"px",m[0].childNodes[0].style.maxHeight="100vh",m[0].childNodes[0].style.overflowY="auto")):o?b.width(p/c(m[0]).width()*100+"%"):m[0].childNodes[0].style.width=
p+"px";h!=m.css("width")&&(c(window).trigger("lightboxresize"),t.doLayout(l,n),t.positionContent(l,n))},positionContent:function(a,b){var c=0,g=0;d.slideshow.options.isResponsive?(g=d.$slides.filter(".wp-panel-active"),f&&g!==void 0&&g.length>0?(c=-(d.$slides.outerWidth()/2+(g.offset().left-m.offset().left)),g=-(d.$slides.outerHeight()/2+(g.offset().top-m.offset().top))):(c=-m.outerWidth()/2,g=-m.outerHeight()/2)):(c=-d.$slides.outerWidth()/2,g=-d.$slides.outerHeight()/2);c=Math.max(0,a/2+c);g=Math.max(0,
b/2+g);d.$slides.outerHeight()>b&&(g=0);m.css({top:g,left:c});r.length&&r.hasClass("fullwidth")&&r.css("left",-c);c=a-s;g=b-v;r.length&&(r.width(c),r.hasClass("fullscreen")&&r.height(g),d.resizeSlidesFn&&d.resizeSlidesFn(c,g))}};m.data("museOverlay",t);d.autoShow&&t.open()})}});
;(function(){if(!("undefined"==typeof Muse||"undefined"==typeof Muse.assets)){var a=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]==b)return c;return-1}(Muse.assets.required,"jquery.museoverlay.js");if(-1!=a){Muse.assets.required.splice(a,1);for(var a=document.getElementsByTagName("meta"),b=0,c=a.length;b<c;b++){var d=a[b];if("generator"==d.getAttribute("name")){"2017.1.0.379"!=d.getAttribute("content")&&Muse.assets.outOfDate.push("jquery.museoverlay.js");break}}}}})();
