/*
 ADOBE CONFIDENTIAL
 ___________________

 Copyright 2012 Adobe Systems Incorporated
 All Rights Reserved.

 NOTICE:  All information contained herein is, and remains
 the property of Adobe Systems Incorporated and its suppliers,
 if any.  The intellectual and technical concepts contained
 herein are proprietary to Adobe Systems Incorporated and its
 suppliers and may be covered by U.S. and Foreign Patents,
 patents in process, and are protected by trade secret or copyright law.
 Dissemination of this information or reproduction of this material
 is strictly forbidden unless prior written permission is obtained
 from Adobe Systems Incorporated.
*/
(function(a,b,c){c.Plugins.SlideShowCaptions={defaultOptions:{captionClassName:"SSSlideCaption"},initialize:function(b,c){var g=this;a.extend(c,a.extend({},g.defaultOptions,c));b.bind("attach-behavior",function(){g._attachBehavior(b)})},_attachBehavior:function(a){var b=a._findWidgetElements("."+a.options.captionClassName);if(b.length)a._sscpCaptions=b,b.css("display","none"),a.slides.bind("wp-panel-show",function(a,c){b.eq(c.panelIndex).css("display","block")}),a.slides.bind("wp-panel-hide",function(a,
c){b.eq(c.panelIndex).css("display","none")}),a.bind("ready",function(){b.eq(a.slides.activeIndex).css("display","block")})}};c.Plugins.SlideShowLabel={defaultOptions:{labelClassName:"SlideShowLabel"},initialize:function(b,c){var g=this;a.extend(c,a.extend({},g.defaultOptions,c));b.bind("attach-behavior",function(){g._attachBehavior(b)})},_attachBehavior:function(a){var b=this,c=a._findWidgetElements("."+a.options.labelClassName);if(c.length)a._$sslpLabels=c,a.slides.bind("wp-panel-show",function(){b._updateLabels(a)}),
a.bind("ready",function(){b._updateLabels(a)})},_findAllTextNodes:function(a,b){b=b||[];switch(a.nodeType){case 3:b.push(a);break;case 1:if(a.nodeName.toLowerCase()!=="script")for(var c=a.firstChild;c;)this._findAllTextNodes(c,b),c=c.nextSibling}a.nextSibling&&this._findAllTextNodes(a.nextSibling,b);return b},_updateLabels:function(a){var b=this,c=a.slides,h=c.activeIndex+1,i=c.$element.length;a._$sslpLabels.each(function(){for(var a=b._findAllTextNodes(this),c=a.length,d=0,g=function(a){return++d===
1?h:d===2?i:a},o=0;o<c;o++){var p=a[o],r=p.nodeValue,q=r.replace(/\d+/g,g);if(q!==r)p.nodeValue=q}})}};c.Plugins.Lightbox={defaultOptions:{lightboxPartsSelector:".PamphletLightboxPart",closeBtnClassName:"PamphletCloseButton"},initialize:function(b,c){var g=this;a.extend(c,a.extend({},g.defaultOptions,c));b._sslbpAutoPlay=c.autoPlay;c.autoPlay=!1;b.bind("before-transform-markup",function(){g._beforeTransformMarkup(b)});b.bind("attach-behavior",function(){g._attachBehavior(b)})},_beforeTransformMarkup:function(a){a._sslbpShownInitially=
!0;var b=a._findWidgetElements("."+a.options.slideClassName);if(b.filter(":hidden").length==0)a._sslbpSlideOffset=b.offset();else{a._sslbpShownInitially=!1;var g=a._findWidgetElements("."+a.options.viewClassName);a._sslbpSlideOffset={top:c.Utils.getCSSIntValue(g,"top")+c.Utils.getCSSIntValue(b,"top"),left:c.Utils.getCSSIntValue(g,"left")+c.Utils.getCSSIntValue(b,"left")}}},_attachBehavior:function(a){var b=this,c=a.options;a.tabs.$element.bind(c.event,function(){b._openLightbox(a)});a.slides.bind("wp-panel-before-show",
function(){b._openLightbox(a)});a._$sslbpCloseBtn=a._findWidgetElements("."+c.closeBtnClassName).bind("click",function(){b._closeLightbox(a)});b._initializeMarkup(a)},_initializeMarkup:function(b){var f=b.options,g=b._findWidgetElements("."+f.viewClassName),h=b.slides.$element,i=g,j=b._sslbpSlideOffset,k=h.outerWidth(),l=h.outerHeight(),m=b._findWidgetElements(f.lightboxPartsSelector),i=a(g[0].parentNode).filter("."+f.clipClassName);i.length===0&&(i=g);m.each(function(f,g){var h=a(g),i=b._sslbpShownInitially?
h.offset():{top:c.Utils.getCSSIntValue(h,"top"),left:c.Utils.getCSSIntValue(h,"left")};h.css({left:i.left-j.left,top:i.top-j.top})}).addClass("popup_element");var o=a('<div id="'+(g.attr("id")||"")+'"></div>').css({left:0,top:0,width:"auto",height:"auto",padding:0,margin:0,zIndex:"auto"});g.removeAttr("id");var p=a("<div class='overlayWedge'></div>").insertBefore(h[0]);o.append(g.children().not("."+f.slideClassName));g.append(h);o.css({visibility:"hidden"}).appendTo(document.body);var g=o.outerWidth(),
r=o.outerHeight();o.detach().css({visibility:""});i.css({padding:0,left:0,top:0,width:k,height:l,borderWidth:0,background:"none",position:"absolute"});f.transitionStyle==="fading"&&h.css({left:0,top:0,position:"absolute"});f=-k/2;l=-l/2;i=a("<div class='LightboxContent'></div>").css({position:"absolute"}).append(i).append(m).museOverlay({autoOpen:!1,offsetLeft:f,offsetTop:l,overlayExtraWidth:g,overlayExtraHeight:r,$overlaySlice:o,$overlayWedge:p,onClose:function(){b.stop()}});if(a.browser.msie&&a.browser.version<
9){var q=o[0];c.Utils.needPIE(function(){PIE.detach(q);PIE.attach(q)})}b._$sslbpOverlay=i;b._csspIsImageSlideShow||h.each(function(){c.Utils.detachIframesAndObjectsToPauseMedia(a(this))})},_openLightbox:function(b){var f=b._$sslbpOverlay;f.data("museOverlay").isOpen||(f.museOverlay("open"),b._sslbpAutoPlay&&b.play());b._csspIsImageSlideShow||c.Utils.attachIframesAndObjectsToResumeMedia(a(b.slides.activeElement))},_closeLightbox:function(b){b._$sslbpOverlay.data("museOverlay").isOpen&&(b.stop(),b._$sslbpOverlay.museOverlay("close"),
b._csspIsImageSlideShow||c.Utils.detachIframesAndObjectsToPauseMedia(a(b.slides.activeElement)))}};c.Plugins.ContentSlideShow={defaultOptions:{displayInterval:3E3,transitionDuration:500,transitionStyle:"fading",contentLayout_runtime:"stack",event:"click",deactivationEvent:"none",hideAllContentsFirst:!1,shuffle:!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",lightboxPartsSelector:".SlideShowCaptionPanel, .SSFirstButton, .SSPreviousButton, .SSNextButton, .SSLastButton, .SlideShowLabel, .SSCloseButton",
lightboxEnabled_runtime:!1},compositionOverrides:{slideshowClassName:"PamphletWidget",viewClassName:"ContainerGroup",slideClassName:"Container",slideLinkClassName:"Thumb",slideLinkActiveClassName:"PamphletThumbSelected",prevBtnClassName:"PamphletPrevButton",nextBtnClassName:"PamphletNextButton",lightboxPartsSelector:".PamphletLightboxPart"},initialize:function(d,f){var g=this,h=d.$element.hasClass("SlideShowWidget"),i=h?g.slideShowOverrides:g.compositionOverrides;d._csspIsImageSlideShow=h;d._csspIsDynamicSlideshow=
h&&d.$element.parent().hasClass("mu-query");a.extend(f,a.extend({},g.defaultOptions,i,f));if(f.hideAllContentsFirst)f.defaultIndex=-1;if(f.lightboxEnabled_runtime)f.contentLayout_runtime="lightbox";h&&(b.Widget.ContentSlideShow.slideImageIncludePlugin.initialize(d,f),c.Plugins.SlideShowLabel.initialize(d,f),c.Plugins.SlideShowCaptions.initialize(d,f));f.transitionStyle=="fading"?b.Widget.ContentSlideShow.fadingTransitionPlugin.initialize(d,f):c.Browser.Features.Touch&&c.Browser.Features.Touch.Start==
"touchstart"&&f.enableSwipe===!0?b.Widget.ContentSlideShow.swipeTransitionPlugin.initialize(d,f):b.Widget.ContentSlideShow.filmstripTransitionPlugin.initialize(d,f);f.contentLayout_runtime==="lightbox"&&c.Plugins.Lightbox.initialize(d,f);f.shuffle===!0&&b.Widget.ContentSlideShow.shufflePlayPlugin.initialize(d,f);d.bind("transform-markup",function(){g._transformMarkup(d)});d.bind("attach-behavior",function(){g._attachBehavior(d)})},_transformMarkup:function(b){var c=b.options,g=b._findWidgetElements("."+
c.viewClassName);if(c.transitionStyle!=="fading"){var h=a('<div class="'+c.clipClassName+'"/>'),i=b._findWidgetElements("."+c.slideClassName),c=i.outerWidth(),i=i.outerHeight(),j={position:"relative",width:c+"px",height:i+"px",overflow:"hidden"};if(g.css("position")==="absolute")j.position="absolute",j.left=g.css("left"),j.top=g.css("top");h.css(j);g.css({position:"relative",top:"0",left:"0",width:c+"px",height:i+"px",margin:"0",padding:"0",overflow:"hidden"}).wrap(h)}else g.css({width:"0",height:"0"});
b._csspIsDynamicSlideshow&&this._layoutThumbs(b)},_attachBehavior:function(b){var f=b.options,g=b.tabs,h=b.slides.$element,i=f.slideLinkActiveClassName;b._csspIsDynamicSlideshow&&(this._setupImagePositioning(b,b.slides.$element,f.heroFitting),this._setupImagePositioning(b,b.tabs.$element,f.thumbFitting));if(g&&(f.event==="mouseover"||f.event==="mouseover_canRollout")){var j=g.$element,k=this._hitTest;j.bind("mouseenter",function(){var c=a(this),i=j.index(c);g.selectTab(i);if(f.deactivationEvent===
"mouseout_trigger"||f.deactivationEvent==="mouseout_both"){var o=h.eq(i),p=function(g){var h=k(g,c);f.deactivationEvent==="mouseout_both"&&(h=h||k(g,o));h||(a(document).unbind("mousemove",p),b.slides.hidePanel(i))};a(document).bind("mousemove",p)}})}g&&i&&(f.hideAllContentsFirst||g.$element.eq(g.options.defaultIndex).addClass(i),b.slides.bind("wp-panel-show",function(a,b){g.$element.eq(b.panelIndex).addClass(i)}).bind("wp-panel-hide",function(a,b){g.$element.eq(b.panelIndex).removeClass(i)}));this._attachStopOnClickHandler(b,
b.$firstBtn);this._attachStopOnClickHandler(b,b.$lastBtn);this._attachStopOnClickHandler(b,b.$previousBtn);this._attachStopOnClickHandler(b,b.$nextBtn);this._attachStopOnClickHandler(b,b.$playBtn);this._attachStopOnClickHandler(b,b.$stopBtn);g&&f.contentLayout_runtime!=="lightbox"&&this._attachStopOnClickHandler(b,g.$element);b._csspIsImageSlideShow||b.slides.bind("wp-panel-hide",function(b,d){c.Utils.detachIframesAndObjectsToPauseMedia(a(d.panel))}).bind("wp-panel-show",function(b,d){c.Utils.attachIframesAndObjectsToResumeMedia(a(d.panel))})},
_attachStopOnClickHandler:function(a,b){b.bind(a.options.event==="click"?"click":"mouseover",function(){a.stop()})},_hitTest:function(a,b){b.outerWidth()===0&&(b=b.children(".popup_anchor").children(".popup_element").eq(0));var c=b.offset(),c={x:c.left,y:c.top,width:b.outerWidth(),height:b.outerHeight()};return a.pageX>=c.x&&a.pageX<=c.x+c.width&&a.pageY>=c.y&&a.pageY<=c.y+c.height},_layoutThumbs:function(b){var f=b.options,g=c.Utils.getStyleValue;b._findWidgetElements("."+f.slideLinksClassName).each(function(){var b=
a(this).find("."+f.slideLinkClassName);firstThumb=b[0];tWidth=g(firstThumb,"width");tHeight=g(firstThumb,"height");gapH=g(firstThumb,"margin-right");gapV=g(firstThumb,"margin-bottom");borderL=g(firstThumb,"border-left-width");borderR=g(firstThumb,"border-right-width");borderT=g(firstThumb,"border-top-width");borderB=g(firstThumb,"border-bottom-width");gWidth=g(this,"width");paddingL=g(this,"padding-left");paddingT=g(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=c.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"})})},_setupImagePositioning:function(b,c,g){var h=this;c.each(function(){var b=this;a(b).find("img").each(function(){var c=this;c.complete?h._positionImage(c,b,g):a(c).load(function(){h._positionImage(c,b,g)})})})},_positionImage:function(a,b,g){var b=a.width,h=a.height,i=c.Utils.getNaturalWidth(a),j=c.Utils.getNaturalHeight(a);if(!(b==i&&
h==j)){var k=i,l=j;if(g=="fillFrameProportionally")i>b&&j>h&&(g=i/b,k=j/h,g<k?(l=j/g,k=b):(l=h,k=i/k));else if(g=="fitContentProportionally"&&(i>b||j>h))g=i/b,k=j/h,g>k?(l=j/g,k=i/g):(l=j/k,k=i/k);a=a.runtimeStyle?a.runtimeStyle:a.style;a.width=c.Utils.pixelRound(k)+"px";a.height=c.Utils.pixelRound(l)+"px";a.marginTop=c.Utils.pixelRound((h-l)/2)+"px";a.marginLeft=c.Utils.pixelRound((b-k)/2)+"px"}}};a.extend(b.Widget.ContentSlideShow.slideImageIncludePlugin.defaultOptions,{imageIncludeClassName:"ImageInclude",
slideLoadingClassName:"SSSlideLoading"});b.Widget.ContentSlideShow.prototype.defaultPlugins=[c.Plugins.ContentSlideShow]})(jQuery,WebPro,Muse,window);
