/*
 Copyright 2011-2016 Adobe Systems Incorporated. All Rights Reserved.
*/
(function(c){"function"===typeof define&&define.amd&&define.amd.jQuery?define(["jquery","webpro","museutils"],c):c(jQuery)})(function(c){Muse.Plugins.SlideShowCaptions={defaultOptions:{captionClassName:"SSSlideCaption"},initialize:function(b,d){var a=this;c.extend(d,c.extend({},a.defaultOptions,d));b.bind("attach-behavior",function(){a._attachBehavior(b)})},_attachBehavior:function(b){var c=b._sscpCaptions?b._sscpCaptions:b._findWidgetElements("."+b.options.captionClassName);if(c.length)b._sscpCaptions=
c,c.css("display","none"),b.slides.bind("wp-panel-show",function(a,b){c.eq(b.panelIndex).css("display","block")}),b.slides.bind("wp-panel-hide",function(a,b){c.eq(b.panelIndex).css("display","none")}),b.bind("ready",function(){-1!=b.slides.activeIndex&&c.eq(b.slides.activeIndex).css("display","block")})}};Muse.Plugins.SlideShowLabel={defaultOptions:{labelClassName:"SlideShowLabel"},initialize:function(b,d){var a=this;c.extend(d,c.extend({},a.defaultOptions,d));b.bind("attach-behavior",function(){a._attachBehavior(b)})},
_attachBehavior:function(b){var c=this,a=b._$sslpLabels?b._$sslpLabels:b._findWidgetElements("."+b.options.labelClassName);if(a.length)b._$sslpLabels=a,b.slides.bind("wp-panel-show",function(){c._updateLabels(b)}),b.bind("ready",function(){c._updateLabels(b)})},_findAllTextNodes:function(b,c){c=c||[];switch(b.nodeType){case 3:c.push(b);break;case 1:if(b.nodeName.toLowerCase()!=="script")for(var a=b.firstChild;a;)this._findAllTextNodes(a,c),a=a.nextSibling}b.nextSibling&&this._findAllTextNodes(b.nextSibling,
c);return c},_updateLabels:function(b){var c=this,a=b.slides,f=a.activeIndex+1,h=a.$element.length;b._$sslpLabels.each(function(){for(var a=c._findAllTextNodes(this),b=a.length,j=0,k=function(a){return++j===1?f:j===2?h:a},i=0;i<b;i++){var m=a[i],n=m.nodeValue,q=n.replace(/\d+/g,k);if(q!==n)m.nodeValue=q}})}};Muse.Plugins.Lightbox={defaultOptions:{lightboxPartsSelector:".PamphletLightboxPart",closeBtnClassName:"PamphletCloseButton"},initialize:function(b,d){var a=this;c.extend(d,c.extend({},a.defaultOptions,
d));b._sslbpAutoPlay=d.autoPlay;d.autoPlay=!1;b.bind("before-transform-markup",function(){a._beforeTransformMarkup(b)});b.bind("attach-behavior",function(){a._attachBehavior(b)});d.autoActivate_runtime&&b.bind("ready",function(){a._openLightbox(b)})},_beforeTransformMarkup:function(b){b._sslbpShownInitially=!0;var c=b._findWidgetElements("."+b.options.slideClassName);if(c.filter(":hidden").length==0)b._sslbpSlideOffset=c.offset();else{b._sslbpShownInitially=!1;var a=b._findWidgetElements("."+b.options.viewClassName);
b._sslbpSlideOffset={top:Muse.Utils.getCSSIntValue(a,"top")+Muse.Utils.getCSSIntValue(c,"top"),left:Muse.Utils.getCSSIntValue(a,"left")+Muse.Utils.getCSSIntValue(c,"left")}}},_attachBehavior:function(b){var c=this,a=b.options;b.tabs.$element.unbind(a.event).bind(a.event,function(){c._openLightbox(b)});b.slides.unbind("wp-panel-before-show").bind("wp-panel-before-show",function(){c._openLightbox(b)});if(Muse.Browser.Features.Touch&&a.elastic==="fullScreen")b.slides.$element.not("a[href]").off("click").on("click",
function(){c._closeLightbox(b)});b._$sslbpCloseBtn=b._findWidgetElements("."+a.closeBtnClassName).unbind("click").bind("click",function(){c._closeLightbox(b)});c._initializeMarkup(b)},_initializeMarkup:function(b){function d(a){var b=a.parent();if(!(b.children().length<2)){var c=0,c=b.children().index(a);c!=b.children().length-1&&(c==0?c=0:(c=a.prev(),c=c.offset().top-b.offset().top+c.height()),a=a.next(),b=a.offset().top-b.offset().top-c,a.css("margin-top",b))}}function a(a,b,c,d){var f=b.width()/
a.width(),g=b.height(),h=(b.offset().left-a.offset().left)*100/a.width()+"%",i=0;if(d&&c)switch(d){case "page_fixedLeft":c=b.offset().left-a.offset().left;c>=0&&(h=c+"px");break;case "page_fixedRight":i=b.offset().left-a.offset().left;b=1;a=a.width();if(c==="fluidWidth"||c==="fluidWidthHeight")b=1-f;h=b*100+"%";i=i-b*a+"px";break;case "page_fixedCenter":i=b.offset().left-a.offset().left;b=0.5;a=a.width();if(c==="fluidWidth"||c==="fluidWidthHeight")b=0.5-f/2;h=b*100+"%";i=i-b*a+"px"}return{width:f*
100+"%",height:g,"margin-left":h,left:i}}function f(a){for(var b=Number.MAX_VALUE,d=0,f=Number.MAX_VALUE,g=0,h,i=0;i<a.children().length;i++){var j=c(a.children()[i]);if(!j.hasClass("popup_anchor")||!Muse.Utils.isElementBrowserPinned(c(j.children()[0]))){h=j.offset().left-a.offset().left;var l=h+j.width(),k=j.offset().top-a.offset().top,j=k+j.height();b>h&&(b=h);d<l&&(d=l);f>k&&(f=k);g<j&&(g=j)}}d=a.hasClass("fullwidth")?a.width():d-b;if(c(a.children()[0]).hasClass("colelem")){if(h=b,k=f,g=c(a.children()[0]),
!g.hasClass("popup_anchor")||!Muse.Utils.isElementBrowserPinned(c(g.children()[0]))){i=g.offset().top-a.offset().top;g.css({"margin-top":i-k+"px",top:0});for(k=0;k<a.children().length;k++)if(g=c(a.children()[k]),!g.hasClass("popup_anchor")||!Muse.Utils.isElementBrowserPinned(c(g.children()[0])))i=g.offset().left-a.offset().left,g.offset(),a.offset(),g.css({width:parseFloat(g.css("width"))*100/d+"%","margin-left":Muse.Utils.isLeftInPercentForLightbox(g)?(i-h)*100/d+"%":i-h+"px",left:0})}}else{h=b;
k=f;for(g=0;g<a.children().length;g++)if(i=c(a.children()[g]),!i.hasClass("popup_anchor")||!Muse.Utils.isElementBrowserPinned(c(i.children()[0])))l=i.offset().left-a.offset().left,j=i.offset().top-a.offset().top,i.css({width:parseFloat(i.css("width"))*100/d+"%","margin-top":j-k+"px",top:0,"margin-left":Muse.Utils.isLeftInPercentForLightbox(i)?(l-h)*100/d+"%":l-h+"px",left:0})}a.hasClass("LightboxContent")?(b=d*100/c("#page").width(),a.attr("lightbox-Ratio-WithPage",b),a.css({width:b*c("#page").width()/
100+"px"})):(h=a.offset().left-a.parent().offset().left,k=a.offset().top-a.parent().offset().top,a.hasClass("colelem")&&a.parent().children().index(a)>0&&(k=a.offset().top-(a.prev().offset().top+a.prev().height)),a.css({"margin-top":k+f+"px",top:0,width:a.hasClass("fullwidth")?"100%":d*100/a.parent().width()+"%","margin-left":Muse.Utils.isLeftInPercentForLightbox(a)?(h+b)*100/a.parent().width()+"%":h+b+"px",left:0}))}var h=c("#page");h!==void 0&&h.css("max-width")!=="none"&&h.css("width",h.css("max-width"));
var g=b.options,l=g.elastic!=="off",j=b._findWidgetElements("."+g.viewClassName),k=b.slides.$element,i=j,m=b._sslbpSlideOffset,n=k.outerWidth(),q=g.slideClassName=="Container",p=g.contentLayout_runtime=="lightbox",o=!l&&p&&g.isResponsive;k.parent().outerWidth();g.isResponsive=g.isResponsive&&!l;Muse.Utils.moveElementsOutsideViewport(b.$element.parents());Muse.Utils.moveElementsOutsideViewport(j.children());Muse.Utils.resizeImages(b.$element,b.$element.attr("id"));Muse.Utils.moveElementsInsideViewport(j.children());
Muse.Utils.moveElementsInsideViewport(b.$element.parents());var r=k.outerHeight(),s=b._findWidgetElements(g.lightboxPartsSelector);g.isResponsive&&(s=s.map(function(){var a=c(this).parent();return a.hasClass("popup_anchor")?a[0]:this}));if(0==j.length){if(!b._$sslbpOverlay)b._$sslbpOverlay=c(".LightboxContent"),b._$sslbpOverlay.museOverlay("reuseAcrossBPs")}else{i=c(j[0].parentNode).filter("."+g.clipClassName);i.length===0&&(i=j);s.each(function(a,d){var f=c(d);if(f.css("position")!=="fixed")if(g.isResponsive)o||
f.css({top:0});else{var h=b._sslbpShownInitially?f.offset():{top:Muse.Utils.getCSSIntValue(f,"top"),left:Muse.Utils.getCSSIntValue(f,"left")},i={top:h.top-m.top};l?i.top+=Muse.Utils.getCSSIntValue(j,"padding-top"):i.left=h.left-m.left;f.css(i)}}).addClass("popup_element");var v=c("<div/>").attr("id",j.attr("id")||"").css({left:0,top:0,width:"auto",height:"auto",padding:0,margin:0,zIndex:"auto"}),x;l&&(x=c("<div/>"),g.elastic==="fullScreen"?x.addClass("fullscreen"):g.elastic==="fullWidth"&&x.addClass("fullwidth"),
x.css({borderColor:j.css("border-left-color"),borderStyle:j.css("border-left-style"),borderLeftWidth:j.css("border-left-width"),borderRightWidth:j.css("border-right-width"),borderTopWidth:j.css("border-top-width"),borderBottomWidth:j.css("border-bottom-width")}),g.elastic!=="fullScreen"&&x.css({paddingLeft:j.css("padding-left"),paddingRight:j.css("padding-right"),paddingTop:j.css("padding-top"),paddingBottom:j.css("padding-bottom")}),x.append(Muse.Utils.includeMEditableTags(i)),x.append(Muse.Utils.includeMEditableTags(s)),
v.css({border:"none"}));var w=c("<div/>").addClass("overlayWedge").insertBefore(Muse.Utils.includeMEditableTags(k)[0]);v.append(Muse.Utils.includeMEditableTags(j.children().not("."+g.slideClassName)));Muse.Utils.appendChildren(j,Muse.Utils.includeMEditableTags(k));v.css({visibility:"hidden"}).appendTo(document.body);v.detach().css({visibility:""});Muse.Utils.moveElementsOutsideViewport(i.parents());i.css({position:g.elastic==="fullScreen"?"relative":"absolute",padding:o?i.css("padding"):0,left:g.elastic===
"fullWidth"?"":o?i.css("left"):0,top:o?i.css("top"):0,borderWidth:0,background:"none",width:o?i.width()*100/i.parent().width()+"%":g.elastic==="fullScreen"?"100%":i.css("width"),height:!o&&g.elastic==="fullScreen"?"100%":i.css("height")});Muse.Utils.moveElementsInsideViewport(i.parents());j.removeAttr("id");if(!o&&g.elastic!=="fullScreen"){var t=o?i.parent().width():b.$element.width();i.css({width:g.isResponsive?n/t*100+"%":n+"px",height:r});g.isResponsive&&(i.attr("data-slidewidth",n/t*100+"%"),
i.children().each(function(){c(this).css({width:"100%"})}),j.children().each(function(){c(this).css({width:"100%"})}))}(!p||!q||!g.isResponsive)&&g.transitionStyle==="fading"&&k.css({position:"absolute",left:0,top:0});var y;if(b._fstpPositionSlides||b._csspResizeFullScreenImages)y=function(a,c){b._fstpPositionSlides&&b._fstpPositionSlides(a,c);b._csspResizeFullScreenImages&&b._csspResizeFullScreenImages(b,b.slides.$element,g.heroFitting)};n=c("<div/>").addClass("LightboxContent").css({position:"absolute"});
if(!o||l)n.append(l?x:i);!o&&!l&&n.append(Muse.Utils.includeMEditableTags(s));var z;if(o){i=b.$element;z=i.attr("data-sizePolicy");p=i.attr("data-pintopage");q?(q=b._findWidgetElements("."+g.slideLinksClassName),r=q.attr("data-sizePolicy"),t=q.attr("data-pintopage")):(t=b.$element.find("."+g.slideLinksClassName),q=t.closest(".popup_anchor"),r=t.attr("data-sizePolicy"),t=t.attr("data-pintopage"));var u;r===void 0&&t===void 0?(r=z,t=p):r==="fixed"&&t==="page_fluidx"&&(t=p);q&&q.length>0&&(u=a(i,q,r,
t));q.hasClass("colelem")&&(Muse.Utils.moveElementsOutsideViewport(b.$element.parents()),d(q),Muse.Utils.moveElementsInsideViewport(b.$element.parents()));l?x.append(i.children()):Muse.Utils.appendChildren(n,i.children());z=q.parent();i.append(q);q&&q.length>0&&q.css(u)}n.museOverlay({autoOpen:!1,$slides:k,$overlaySlice:v,$overlayWedge:w,slideshow:b,onNext:function(){b.next()},onPrevious:function(){b.previous()},onClose:function(){b.stop();b.slides.hidePanel(b.slides.activeElement);b.tabs.activeElement&&
b.tabs.activeElement.focus()},$elasticContent:x,resizeSlidesFn:y});if(c.browser.msie&&c.browser.version<9){Muse.Assert.assert(!Muse.Utils.isIBE(),"IBE doesn't support <IE10, so how did we get here?");var B=v[0];Muse.Utils.needPIE(function(){PIE.detach(B);PIE.attach(B)})}if(o){Muse.Utils.moveElementsOutsideViewport(n.parents());for(Muse.Utils.moveElementsOutsideViewport(n.children());!z.hasClass("LightboxContent");)f(c(z)),z=z.parent();f(c(z));Muse.Utils.applyPinningToLightboxParts(n,s);Muse.Utils.moveElementsInsideViewport(n.parents());
Muse.Utils.moveElementsInsideViewport(n.children())}b._$sslbpOverlay=n}h.css("width","")},_openLightbox:function(b){var c=b._$sslbpOverlay;c.data("museOverlay").isOpen||(c.museOverlay("open"),b._sslbpAutoPlay&&b.play())},_closeLightbox:function(b){b=b._$sslbpOverlay;b.data("museOverlay").isOpen&&b.museOverlay("close")}};Muse.Plugins.ContentSlideShow={defaultOptions:{displayInterval:3E3,transitionDuration:500,transitionStyle:"fading",contentLayout_runtime:"stack",event:"click",deactivationEvent:"none",
hideAllContentsFirst:!1,shuffle:!1,resumeAutoplay:!1,resumeAutoplayInterval:3E3,elastic:"off",autoActivate_runtime:!1},slideShowOverrides:{slideshowClassName:"SlideShowWidget",viewClassName:"SlideShowContentPanel",slideClassName:"SSSlide",slideLinksClassName:"SSSlideLinks",slideLinkClassName:"SSSlideLink",slideLinkActiveClassName:"SSSlideLinkSelected",slideCountClassName:"SSSlideCount",firstBtnClassName:"SSFirstButton",lastBtnClassName:"SSLastButton",prevBtnClassName:"SSPreviousButton",nextBtnClassName:"SSNextButton",
playBtnClassName:"SSPlayButton",stopBtnClassName:"SSStopButton",closeBtnClassName:"SSCloseButton",heroFitting:"fitContentProportionally",thumbFitting:"fillFrameProportionally",slideShowCaptionPanel:"SlideShowCaptionPanel",lightboxPartsSelector:".SlideShowCaptionPanel, .SSFirstButton, .SSPreviousButton, .SSNextButton, .SSLastButton, .SlideShowLabel, .SSCloseButton",lightboxEnabled_runtime:!1},compositionOverrides:{slideshowClassName:"PamphletWidget",viewClassName:"ContainerGroup",slideClassName:"Container",
slideLinksClassName:"ThumbGroup",slideLinkClassName:"Thumb",slideLinkActiveClassName:"PamphletThumbSelected",prevBtnClassName:"PamphletPrevButton",nextBtnClassName:"PamphletNextButton",closeBtnClassName:"PamphletCloseButton",lightboxPartsSelector:".PamphletLightboxPart"},initialize:function(b,d){var a=this,f=b.$element.hasClass("SlideShowWidget"),h=f?a.slideShowOverrides:a.compositionOverrides;b._csspIsImageSlideShow=f;this._restartTimer=0;c.extend(d,c.extend({},a.defaultOptions,h,d));if(b.$element.hasClass("HeroFillFrame"))d.heroFitting=
"fillFrameProportionally";if(d.lightboxEnabled_runtime)d.contentLayout_runtime="lightbox";if(d.contentLayout_runtime=="lightbox"&&!d.autoActivate_runtime)d.hideAllContentsFirst=!0;if(d.hideAllContentsFirst)d.defaultIndex=-1;if(d.elastic!=="off")b._csspPositionImage=a._positionImage;f&&(WebPro.Widget.ContentSlideShow.slideImageIncludePlugin.initialize(b,d),Muse.Plugins.SlideShowLabel.initialize(b,d),Muse.Plugins.SlideShowCaptions.initialize(b,d));d.transitionStyle=="fading"?WebPro.Widget.ContentSlideShow.fadingTransitionPlugin.initialize(b,
d):WebPro.Widget.ContentSlideShow.filmstripTransitionPlugin.initialize(b,d);WebPro.Widget.ContentSlideShow.alignPartsToPagePlugin.initialize(b,d);if(d.contentLayout_runtime==="lightbox"){if(d.elastic!=="off")b._csspResizeFullScreenImages=a._resizeFullScreenImages;if(0<c(".LightboxContent").length)d.autoActivate_runtime=!1;Muse.Plugins.Lightbox.initialize(b,d)}d.shuffle===!0&&WebPro.Widget.ContentSlideShow.shufflePlayPlugin.initialize(b,d);b.bind("transform-markup",function(){var f=c("#page");d.contentLayout_runtime===
"lightbox"&&f!==void 0&&f.css("max-width")!=="none"&&f.css("width",f.css("max-width"));a._transformMarkup(b);d.contentLayout_runtime==="lightbox"&&f!==void 0&&f.css("width","")});c("body").on("muse_bp_activate",function(c,f,h){h.is(b.$bp)&&a._onBPActivate(a,b,d)}).on("muse_bp_deactivate",function(c,f,h){h.is(b.$bp)&&a._onBPDeactivate(a,b,d)});b.bind("attach-behavior",function(){a._attachBehavior(b)})},_onBPActivate:function(b,c,a){a.transitionStyle!=="fading"&&this._updateClipElement(c);c._attachBehavior();
c.trigger("attach-behavior");"lightbox"!==a.contentLayout_runtime&&(a=c.slides.$element.eq(c.slides.activeIndex)[0],a={panel:a,panelIndex:c.slides._getElementIndex(a)},c.options.hideAllContentsFirst||c.slides.trigger("wp-panel-show",a),(c.options.autoPlay||c._sslbpAutoPlay)&&c.options.resumeAutoplay&&0<c.options.resumeAutoplayInterval?b._startRestartTimer(c):c._wasPlaying&&c.play(!0))},_onBPDeactivate:function(b,d){c(window).off("orientationchange resize",b._onResize);c(window).off("pageWidthChanged",
b._onResize);(d.$element.attr("data-inside-lightbox")==="true"||Muse.Utils.widgetInsideLightbox(d.$element.parents(".PamphletWidget")))&&c(window).off("lightboxresize",b._onResize);d._wasPlaying=d.isPlaying();d._wasPlaying&&d.stop();b._stopRestartTimer()},_updateClipElement:function(b,d){var a=b.options,f=b._findWidgetElements("."+a.viewClassName),h=b.$clipElement?b.$clipElement:c("<div/>").addClass(a.clipClassName),g=b._findWidgetElements("."+a.slideClassName);d===!0&&a.contentLayout_runtime!=="lightbox"&&
a.isResponsive&&(h.css("width",""),f.css("width",""),f.children().each(function(){c(this).css("width","")}));a.contentLayout_runtime==="lightbox"||a.elastic==="fullScreen"||(h.addClass("has_updated_clip_width"),f.addClass("has_updated_clip_width"),f.children().addClass("has_updated_clip_width"));var l=g.outerWidth(),g=g.outerHeight();if(a.elastic==="fullScreen")h.addClass("fullscreen");else{var j={position:"relative",width:l+"px",height:g+"px",overflow:"hidden"},k=f.css("position");if(k==="absolute")j.position=
k,j.left=f.css("left"),j.top=f.css("top");else if(k==="fixed"){var i=Muse.Utils.getStyleSheetRulesById(Muse.Utils.getPageStyleSheets(),f.get(0).id);j.position=k;j.left=Muse.Utils.getRuleProperty(i,"left");j.top=Muse.Utils.getRuleProperty(i,"top");j.bottom=Muse.Utils.getRuleProperty(i,"bottom");j.right=Muse.Utils.getRuleProperty(i,"right")}h.css(j);!a.isResponsive&&a.transitionStyle==="fading"&&k!=="fixed"&&(g=l=0);f.css({width:l+"px",height:g+"px"});g=!1;a.isResponsive&&a.contentLayout_runtime===
"lightbox"&&f.length>0&&(g=!Muse.Utils.isPropertyInPercent(f.closest(".popup_anchor"),"width"));!g&&a.isResponsive&&f.children().each(function(){if(a.contentLayout_runtime==="lightbox"||a.elastic==="fullWidth")c(this).hasClass("borderbox")||c(this).addClass("borderbox"),c(this).css("width","100%");else if(c(this).hasClass("borderbox"))c(this).css("width",l+"px");else{var b=c(this).outerWidth()-c(this).innerWidth();c(this).css("width",l-b+"px")}})}a.isResponsive&&a.contentLayout_runtime!="lightbox"&&
a.elastic!="fullScreen"&&(f=f.closest(".popup_anchor"),g=c(f.children()[0]),f.height(g.outerHeight()));b.$element&&h&&b.$element.hasClass("PamphletWidget")&&b.$element.hasClass("allow_click_through")&&h.css("pointer-events","none");b._fstpPositionSlides&&b._fstpPositionSlides();return h},_syncTargetHeights:function(b){var d=b.options,a=b._findWidgetElements("."+d.viewClassName),f=b._findWidgetElements("."+d.clipClassName);b._findWidgetElements("."+d.slideClassName);d.transitionStyle!=="fading"&&d.isResponsive&&
(a.css("width",""),f.css("width",""),a.children().css("width",""));d.contentLayout_runtime==="lightbox"||d.elastic==="fullScreen"||(f=b.$element.parents().filter(".has_updated_clip_width"),f.css("width",""),f.removeClass("has_updated_clip_width"));Muse.Utils.moveElementsOutsideViewport(a.children());Muse.Utils.resizeImages(b.$element,b.$element.attr("id"));Muse.Utils.adjustTargetAndSlideHeights(a,d.contentLayout_runtime);d.contentLayout_runtime!="lightbox"&&d.elastic!="fullScreen"&&(b=a.closest(".popup_anchor"),
d=c(b.children()[0]),b.height(d.outerHeight()));Muse.Utils.moveElementsInsideViewport(a.children())},_syncSlideShowTriggerHeights:function(b){var d=b._findWidgetElements("."+b.options.slideLinkClassName),b=b._findWidgetElements("."+b.options.slideLinksClassName),a,f,h;d.each(function(){a=c(this);a.css("height","");a.css("height",parseInt(window.getComputedStyle(this).getPropertyValue("height")))});b.each(function(){a=c(this);a.css("height","");var b=parseInt(window.getComputedStyle(this).getPropertyValue("padding-top")),
d=parseInt(window.getComputedStyle(this).getPropertyValue("padding-bottom")),j=a.innerHeight(),k=a.innerWidth(),i=0;a.attr("data-height-width-ratio")!==void 0&&(i=a.attr("data-height-width-ratio"));a.css("height",Math.max(k*i,j)-(b+d));f=a.closest(".popup_anchor");h=c(f.children()[0]);h.css("position")!="fixed"&&f.height(h.outerHeight())})},_syncCompositionTriggerHeights:function(b){var d=b._findWidgetElements("."+b.options.slideLinkClassName),b=b._findWidgetElements("."+b.options.slideLinksClassName),
a,f,h;d.each(function(){a=c(this);a.css("height","");a.css("height",parseInt(window.getComputedStyle(this).getPropertyValue("height")));f=a.closest(".popup_anchor");a.attr("data-iscompressed")?(h=c("#"+c(this).attr("id").substr(1)))&&f.height(h.innerHeight()):(h=c(f.children()[0]),h.css("position")!=="fixed"&&f.height(h.outerHeight()))});b.each(function(){a=c(this);a.css("height","");a.css("height",parseInt(window.getComputedStyle(this).getPropertyValue("height")))})},_syncLightBoxPartHeights:function(b){var d=
b._findWidgetElements("."+b.options.captionClassName),b=b._findWidgetElements(b.options.lightboxPartsSelector),a=0,f,h;d.length&&(d.each(function(){c(this).css("height","");a=Math.max(a,c(this).outerHeight())}),d.parent().css("height",a+"px"));b.each(function(){f=c(this).closest(".popup_anchor");h=c(f.children()[0]);h.css("position")!="fixed"&&f.height(h.outerHeight())})},_transformMarkup:function(b){var d=b.options,a=b._findWidgetElements("."+d.viewClassName),f=b._findWidgetElements("."+d.slideLinkClassName),
h=b._findWidgetElements(d.lightboxPartsSelector);$element=a;if(b.$element&&b.$element.hasClass("PamphletWidget")&&b.$element.hasClass("allow_click_through")){for(;$element&&$element.length&&!$element.hasClass("PamphletWidget");)$element.css("pointer-events","none"),$element=$element.parent();if(f)for(var g=0;g<f.length;g++)for($element=c(f[g]).parent();$element&&$element.length&&!$element.hasClass("PamphletWidget");)$element.css("pointer-events","none"),$element=$element.parent();if(h)for(g=0;g<h.length;g++)for($element=
c(h[g]).parent();$element&&$element.length&&!$element.hasClass("PamphletWidget");)$element.css("pointer-events","none"),$element=$element.parent()}Muse.Utils.addWidgetIDToImages(b.$element,b.$element.attr("id"));d.transitionStyle!=="fading"?(d.isResponsive&&(Muse.Utils.moveElementsOutsideViewport(b.$element.parents()),Muse.Utils.moveElementsOutsideViewport(a.children()),Muse.Utils.resizeImages(b.$element,b.$element.attr("id")),Muse.Utils.moveElementsInsideViewport(a.children()),Muse.Utils.moveElementsInsideViewport(b.$element.parents())),
f=!d.elastic&&d.isResponsive&&d.contentLayout_runtime=="lightbox",h=this._updateClipElement(b),b.$clipElement=a.css({position:"relative",top:f?"":"0",left:f?"":"0",margin:f?"":"0",overflow:"hidden"}).wrap(h).parent(),this._updateClipElement(b)):d.isResponsive||(b=a.css("position"),d.elastic!=="fullScreen"&&b!=="fixed"&&a.css({width:"0",height:"0"}));d&&d.elastic==="fullWidth"&&a&&a.parent().hasClass("popup_anchor")&&a.parent().css("width","0px")},_scopedFind:function(b,c){return WebPro.findInWidgetScope(b,
c)},_setMinWidthForComposition:function(b,d){function a(a){a>0&&(n=Math.max(n,a))}function f(a,b){a>0&&b.css("min-width",a)}var h=b.attr("data-contentlayout"),g=h==="lightbox",l=g?c(".LightboxContent"):b,j=g?"LightboxContent":"PamphletWidget";this._scopedFind(l,".ContainerGroup",j);this._scopedFind(b,".ThumbGroup","PamphletWidget");var k=this._scopedFind(l,".PamphletPrevButton",j),i=this._scopedFind(l,".PamphletNextButton",j),m=this._scopedFind(l,".PamphletCloseButton",j),n=-1,q=h==="loose";if(!(d&&
Muse.Utils.getMinWidthOfElem(b)>0)){this._scopedFind(b,".Thumb","PamphletWidget").forEach(function(c){var g=-1;d?(g=Muse.Utils.getMinWidthOfParts(c,b),a(g,c)):(g=Muse.Utils.getMinWidthForElement(c,d),f(g,c))});if(!g||!d){var p=-1,o=-1,r=[];this._scopedFind(l,".Container",j).forEach(function(c){r.push(c);d?(o=Muse.Utils.getMinWidthOfParts(c,b,!0),o>0&&a(o,c)):(o=Muse.Utils.getMinWidthForElement(c,d),q&&o>0?f(o,c):o>0&&(p=Math.max(p,o)))});!d&&!q&&r.forEach(function(a){p>0&&f(p,a)});k&&(h=-1,k=k[0],
d?(h=Muse.Utils.getMinWidthOfParts(k,b),a(h,k)):(h=Muse.Utils.getMinWidthForElement(k,d),f(h,k)));i&&(k=-1,i=i[0],d?(k=Muse.Utils.getMinWidthOfParts(i,b),a(k,i)):(k=Muse.Utils.getMinWidthForElement(i,d),f(k,i)));m&&(i=-1,m=m[0],d?(i=Muse.Utils.getMinWidthOfParts(m,b),a(i,m)):(i=Muse.Utils.getMinWidthForElement(m,d),f(i,m)))}d&&n>0&&b.css("min-width",n)}},_setMinWidthForSlideShow:function(b,d){function a(a){s=Math.max(s,a)}function f(a,b){a>0&&b.css("min-width",a)}var h=b.attr("data-contentlayout")===
"lightbox",g=h?c(".LightboxContent"):b,l=h?"LightboxContent":"SlideShowWidget",j=this._scopedFind(g,".SlideShowContentPanel",l),k=this._scopedFind(b,".SSSlideLinks","SlideShowWidget"),i=".SSSlideLink",m=this._scopedFind(g,".SlideShowCaptionPanel",l),n=this._scopedFind(g,".SSPreviousButton",l),q=this._scopedFind(g,".SSNextButton",l),p=this._scopedFind(g,".SSSlideCount",l),o=this._scopedFind(g,".SSFirstButton",l),r=this._scopedFind(g,".SSLastButton",l),i=".SSSlideLink",s=-1;if(!(d&&Muse.Utils.getMinWidthOfElem(b)>
0)){var v=-1;Muse.Utils.isElementFixedSize(k[0])?(k=k[0],d?(v=Muse.Utils.getMinWidthOfParts(k,b),a(v,k)):(v=Muse.Utils.getMinWidthForElement(k,d),f(v,k))):d&&this._scopedFind(b,i,"SlideShowWidget").forEach(function(c){var d=-1,d=Muse.Utils.getMinWidthOfParts(c,b);a(d,c)});if(!h||!d){var x=0,w=0;this._scopedFind(g,".SSSlide",l).forEach(function(c){d?(x=Muse.Utils.getMinWidthOfParts(c,b,!0),x>0&&a(x,c)):(x=Muse.Utils.getMinWidthForElement(c,d),x>0&&(w=Math.max(w,x)))});d||f(w,j[0]);m&&(h=-1,m=m[0],
d?(h=Muse.Utils.getMinWidthOfParts(m,b),a(h,m)):(h=Muse.Utils.getMinWidthForElement(m,d),f(h,m)));n&&(m=-1,n=n[0],d?(m=Muse.Utils.getMinWidthOfParts(n,b),a(m,n)):(m=Muse.Utils.getMinWidthForElement(n,d),f(m,n)));q&&(n=-1,q=q[0],d?(n=Muse.Utils.getMinWidthOfParts(q,b),a(n,q)):(n=Muse.Utils.getMinWidthForElement(q,d),f(n,q)));p&&(q=-1,p=p[0],d?(q=Muse.Utils.getMinWidthOfParts(p,b),a(q,p)):(q=Muse.Utils.getMinWidthForElement(p,d),f(q,p)));o&&(p=-1,o=o[0],d?(p=Muse.Utils.getMinWidthOfParts(o,b),a(p,o)):
(p=Muse.Utils.getMinWidthForElement(o,d),f(p,o)));r&&(o=-1,r=r[0],d?(o=Muse.Utils.getMinWidthOfParts(r,b),a(o,r)):(o=Muse.Utils.getMinWidthForElement(r,d),f(o,r)))}d&&s>0&&b.css("min-width",s)}},_setMinWidth:function(b,c){var a=b.attr("data-sizePolicy"),f=b.hasClass("SlideShowWidget"),h=b.hasClass("PamphletWidget");if(c||a!=="fixed")h?this._setMinWidthForComposition(b,c):f&&this._setMinWidthForSlideShow(b,c)},_onResize:function(b){var c=b.data.plugin,a=b.data.slideshow,b=b.data.isLightbox,f=a.options;
Muse.Utils.moveElementsOutsideViewport(a.$element.parents());f.isResponsive&&(c._syncTargetHeights(a),a.$element.hasClass("PamphletWidget")?c._syncCompositionTriggerHeights(a):c._syncSlideShowTriggerHeights(a),c._syncLightBoxPartHeights(a));f.transitionStyle!=="fading"&&c._updateClipElement(a,!0);Muse.Utils.moveElementsInsideViewport(a.$element.parents());!b&&f.elastic!=="off"&&c._resizeFullScreenImages(a,a.slides.$element,f.heroFitting);Muse.Utils.updateSlideshow_fstpOffsetSize(a);f.elastic==="fullScreen"&&
f.transitionStyle!=="fading"&&(c=function(){a._fstpPositionSlides()},window.requestIdleCallback&&window.requestIdleCallback(c,{timeout:1E3}),window.setTimeout(c,50))},_attachBehavior:function(b){var d=this,a=b.options,f=b.tabs,h=b.slides.$element,g=a.slideLinkActiveClassName,l=a.contentLayout_runtime==="lightbox";a.elastic!=="off"&&d._resizeFullScreenImages(b,b.slides.$element,a.heroFitting);var j={plugin:d,slideshow:b,isLightbox:l};c(window).on("pageWidthChanged",j,d._onResize);b.$element.attr("data-contentlayout",
a.contentLayout_runtime);b.$element.attr("data-transitionStyle",a.transitionStyle);a.isResponsive&&(Muse.Utils.setPageToMaxWidth(),d._setMinWidth(b.$element,!1),Muse.Utils.resetPageWidth());c(window).on("orientationchange resize",j,d._onResize);d._onResize({data:j});if(b.$element.attr("data-inside-lightbox")==="true"||Muse.Utils.widgetInsideLightbox(b.$element.parents(".PamphletWidget")))b.$element.attr("data-inside-lightbox","true"),c(window).on("lightboxresize",j,d._onResize);b.$element.attr("data-visibility")==
"changed"&&(b.$element.css("visibility",""),b.$element.removeAttr("data-visibility"));if(l&&!a.autoActivate_runtime)a.hideAllContentsFirst=!0;if(f){var k=f.$element;a.event==="mouseover"&&k.bind("mouseenter",function(){var a=c(this);a.data("enter",!0);f.selectTab(k.index(a))});a.deactivationEvent==="mouseout_trigger"?k.bind("mouseleave",function(){var a=c(this);a.data("enter",!1);b.slides.hidePanel(k.index(a));b.options.contentLayout_runtime==="lightbox"&&d._closeLightbox(b)}):a.deactivationEvent===
"mouseout_both"&&(k.bind("mouseleave",function(){var a=c(this),f=k.index(a),g=h.eq(f);a.data("enter",!1);a.data("setTimeout")||(a.data("setTimeout",!0),setTimeout(function(){!g.data("enter")&&!a.data("enter")&&b.slides.hidePanel(f);a.data("setTimeout",!1)},300));b.options.contentLayout_runtime==="lightbox"&&d._closeLightbox(b)}),h.bind("mouseenter",function(){c(this).data("enter",!0)}),h.bind("mouseleave",function(){var a=c(this),f=h.index(a),g=k.eq(f);a.data("enter",!1);g.data("setTimeout")||(g.data("setTimeout",
!0),setTimeout(function(){!a.data("enter")&&!g.data("enter")&&b.slides.hidePanel(f);g.data("setTimeout",!1)},300));b.options.contentLayout_runtime==="lightbox"&&d._closeLightbox(b)}))}f&&g&&(a.hideAllContentsFirst||f.$element.each(function(a){a==b.slides.activeIndex?c(this).addClass(g):c(this).removeClass(g)}),b._findWidgetElements("a."+g).each(function(){c(this).data("default-active",!0)}),b.slides.bind("wp-panel-show",function(a,b){f.$element.eq(b.panelIndex).addClass(g)}).bind("wp-panel-hide",
function(a,b){var c=f.$element.eq(b.panelIndex);c.data("default-active")||c.removeClass(g)}));d._attachStopOnClickHandler(b,b.$firstBtn);d._attachStopOnClickHandler(b,b.$lastBtn);d._attachStopOnClickHandler(b,b.$previousBtn);d._attachStopOnClickHandler(b,b.$nextBtn);d._attachStopOnClickHandler(b,b.$playBtn);d._attachStopOnClickHandler(b,b.$stopBtn);d._attachStopOnClickHandler(b,b.$closeBtn);f&&!l&&d._attachStopOnClickHandler(b,f.$element);b._csspIsImageSlideShow||(b.slides.bind("wp-panel-hide",function(a,
b){Muse.Utils.detachIframesAndObjectsToPauseMedia(c(b.panel))}).bind("wp-panel-show",function(a,d){setTimeout(function(){Muse.Utils.attachIframesAndObjectsToResumeMedia(c(d.panel))},b.options.transitionDuration)}),h.each(function(){this!=b.slides.activeElement||a.hideAllContentsFirst?Muse.Utils.detachIframesAndObjectsToPauseMedia(c(this)):Muse.Utils.attachIframesAndObjectsToResumeMedia(c(this))}));b.bind("wp-swiped",function(){(b.options.autoPlay||b._sslbpAutoPlay)&&b.options.resumeAutoplay&&0<b.options.resumeAutoplayInterval&&
d._startRestartTimer(b)})},_startRestartTimer:function(b){this._stopRestartTimer();this._restartTimer=setTimeout(function(){b.play(!0)},b.options.resumeAutoplayInterval+b.options.transitionDuration)},_stopRestartTimer:function(){this._restartTimer&&clearTimeout(this._restartTimer);this._restartTimer=0},_attachStopOnClickHandler:function(b,d){var a=this;d.bind(b.options.event==="click"?"click":"mouseover",function(){b.stop();if((b.options.autoPlay||b._sslbpAutoPlay)&&b.options.resumeAutoplay&&0<b.options.resumeAutoplayInterval)c(this).hasClass(b.options.closeBtnClassName)?
a._stopRestartTimer(b):a._startRestartTimer(b)})},_closeLightbox:function(b){b=b._$sslbpOverlay;b.data("museOverlay").isOpen&&b.museOverlay("close")},_hitTest:function(b,c){c.outerWidth()===0&&(c=c.children(".popup_anchor").children(".popup_element").eq(0));var a=c.offset(),a={x:a.left,y:a.top,width:c.outerWidth(),height:c.outerHeight()};return b.pageX>=a.x&&b.pageX<=a.x+a.width&&b.pageY>=a.y&&b.pageY<=a.y+a.height},_layoutThumbs:function(b){var d=b.options,a=Muse.Utils.getStyleValue;b._findWidgetElements("."+
d.slideLinksClassName).each(function(){var b=c(this).find("."+d.slideLinkClassName);firstThumb=b[0];tWidth=a(firstThumb,"width");tHeight=a(firstThumb,"height");gapH=a(firstThumb,"margin-right");gapV=a(firstThumb,"margin-bottom");borderL=a(firstThumb,"border-left-width");borderR=a(firstThumb,"border-right-width");borderT=a(firstThumb,"border-top-width");borderB=a(firstThumb,"border-bottom-width");gWidth=a(this,"width");paddingL=a(this,"padding-left");paddingT=a(this,"padding-top");maxNumThumb=Math.floor((gWidth+
gapH)/(tWidth+borderL+borderR+gapH));gStyle=this.runtimeStyle?this.runtimeStyle:this.style;numRow=Math.ceil(b.length/maxNumThumb);firstRowNum=b.length<maxNumThumb?b.length:maxNumThumb;leftPos=leftMostPos=Muse.Utils.pixelRound((gWidth-(tWidth+borderL+borderR)*firstRowNum-gapH*(firstRowNum-1))/2)+paddingL;topPos=paddingT;numInRow=1;gStyle.height=(tHeight+borderT+borderB)*numRow+gapV*(numRow-1)+"px";b.each(function(){numInRow>firstRowNum&&(numInRow=1,leftPos=leftMostPos,topPos+=tHeight+borderT+borderB+
gapV);numInRow++>1&&(leftPos+=tWidth+borderL+borderR+gapH);var a=this.runtimeStyle?this.runtimeStyle:this.style;a.marginRight="0px";a.marginBottom="0px";a.left=leftPos+"px";a.top=topPos+"px"})})},_resizeFullScreenImages:function(b,d,a){d.each(function(){c(this).find("img").each(function(){this.complete&&!c(this).hasClass(b.options.imageIncludeClassName)&&b._csspPositionImage(this,a,b.options.elastic)})})},_setupImagePositioning:function(b,d,a,f){var h=this;d.each(function(){c(this).find("img").each(function(){var b=
this;b.complete?h._positionImage(b,a,f):c(b).load(function(){h._positionImage(b,a,f)})})})},_positionImage:function(b,d,a,f,h){var g=c(window),l=b.runtimeStyle?b.runtimeStyle:b.style,j=a==="fullWidth"||a==="fullScreen",k=a==="fullHeight"||a==="fullScreen",i=d=="fitContentProportionally";$img=c(b);j=j?window.innerWidth?window.innerWidth:g.width():i?$img.data("width"):$img.parent().parent().hasClass("rounded-corners")&&$img.parent().parent().hasClass("SSSlide")&&$img.parent().hasClass("clip_frame")?
$img.parent().parent().closest(":not(.bc_ch_wrapper)").width():$img.parent().closest(":not(.bc_ch_wrapper)").width();g=k?window.innerHeight?window.innerHeight:g.height():i?$img.data("height"):$img.parent().parent().hasClass("rounded-corners")&&$img.parent().parent().hasClass("SSSlide")&&$img.parent().hasClass("clip_frame")?$img.parent().parent().closest(":not(.bc_ch_wrapper)").height():$img.parent().closest(":not(.bc_ch_wrapper)").height();f=f!==void 0?f:Muse.Utils.getNaturalWidth(b);b=h!==void 0?
h:Muse.Utils.getNaturalHeight(b);a!=="off"&&(f===0&&(f=$img.data("imageWidth")),b===0&&(b=$img.data("imageHeight")));if(j==f&&g==b)l.marginTop="0px",l.marginLeft="0px";else{k=f;h=b;if(d=="fillFrameProportionally"){if(a!=="off"||f>j&&b>g)d=f/j,a=b/g,d<a?(h=b/d,k=j):(h=g,k=f/a)}else if(d=="fitContentProportionally"&&(a!=="off"||f>j||b>g))d=f/j,a=b/g,d>a?(h=b/d,k=f/d):(h=b/a,k=f/a);l.width=Muse.Utils.pixelRound(k)+"px";l.height=Muse.Utils.pixelRound(h)+"px";l.marginTop=Muse.Utils.pixelRound((g-h)/2)+
"px";l.marginLeft=Muse.Utils.pixelRound((j-k)/2)+"px"}}};c.extend(WebPro.Widget.ContentSlideShow.slideImageIncludePlugin.defaultOptions,{imageIncludeClassName:"ImageInclude",slideLoadingClassName:"SSSlideLoading"});WebPro.Widget.ContentSlideShow.prototype.defaultPlugins=[Muse.Plugins.ContentSlideShow];WebPro.Widget.ContentSlideShow.prototype._getAjaxSrcForImage=function(b){for(var d=c(window).data("ResolutionManager").getDataSrcAttrName(),a=d.length,f,h=0;h<a;h++)if((f=b.data(d[h]))&&f.length)return f;
return b.data("src")}});
;(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,"musewpslideshow.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")){"2018.0.0.379"!=d.getAttribute("content")&&Muse.assets.outOfDate.push("musewpslideshow.js");break}}}}})();
