/* 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,d,f){c.plugins.slideshowcaptions={defaultoptions:{captionclassname:"ssslidecaption"},initialize:function(b,c){var d=this;a.extend(c,a.extend({},d.defaultoptions,c));b.bind("attach-behavior",function(){d._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 d=this;a.extend(c,a.extend({},d.defaultoptions,c));b.bind("attach-behavior",function(){d._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,d=c.activeindex+1,f=c.$element.length;a._$sslplabels.each(function(){for(var a=b._findalltextnodes(this),c=a.length, h=0,g=function(a){return++h===1?d:h===2?f:a},n=0;n').css({left:0,top:0,width:"auto",height:"auto",padding:0,margin:0, zindex:"auto"}),o;d.fullscreen&&(o=a('
'),o.css({paddingleft:f.css("padding-left"),paddingright:f.css("padding-right"),paddingtop:f.css("padding-top"),paddingbottom:f.css("padding-bottom"),bordercolor:f.css("border-left-color"),borderstyle:f.css("border-left-style"),borderleftwidth:f.css("border-left-width"),borderrightwidth:f.css("border-right-width"),bordertopwidth:f.css("border-top-width"),borderbottomwidth:f.css("border-bottom-width")}),o.append(i),n.css({border:"none"})); f.removeattr("id");var s=a("
").insertbefore(j[0]);n.append(f.children().not("."+d.slideclassname));f.append(j);n.css({visibility:"hidden"}).appendto(document.body);var f=n.outerwidth(),u=n.outerheight();n.detach().css({visibility:""});i.css({position:d.fullscreen?"relative":"absolute",padding:0,left:0,top:0,borderwidth:0,background:"none"});d.fullscreen||i.css({width:l,height:p});d.transitionstyle==="fading"&&j.css({position:"absolute",left:0,top:0});var x;if(b._fstppositionslides|| b._csspresizefullscreenimages)x=function(a,c){b._fstppositionslides&&b._fstppositionslides(a,c);b._csspresizefullscreenimages&&b._csspresizefullscreenimages(b,b.slides.$element,d.herofitting)};l=-l/2;p=-p/2;i=a("
").css({position:"absolute"}).append(d.fullscreen?o:i).append(q).museoverlay({autoopen:!1,offsetleft:l,offsettop:p,overlayextrawidth:f,overlayextraheight:u,$overlayslice:n,$overlaywedge:s,onclose:function(){b.stop()},$fullscreencontent:o,resizeslidesfn:x}); if(a.browser.msie&&a.browser.version<9){var v=n[0];c.utils.needpie(function(){pie.detach(v);pie.attach(v)})}b._$sslbpoverlay=i;b._csspisimageslideshow||j.each(function(){c.utils.detachiframesandobjectstopausemedia(a(this))})},_openlightbox:function(b){var d=b._$sslbpoverlay;d.data("museoverlay").isopen||(d.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,fullscreen:!1},compositionoverrides:{slideshowclassname:"pamphletwidget",viewclassname:"containergroup",slideclassname:"container",slidelinkclassname:"thumb",slidelinkactiveclassname:"pamphletthumbselected",prevbtnclassname:"pamphletprevbutton",nextbtnclassname:"pamphletnextbutton",closebtnclassname:"pamphletclosebutton",lightboxpartsselector:".pamphletlightboxpart"},initialize:function(d,f){var g=this,j=d.$element.hasclass("slideshowwidget"),i=j?g.slideshowoverrides:g.compositionoverrides; d._csspisimageslideshow=j;d._csspisdynamicslideshow=j&&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";if(f.fullscreen)d._cssppositionimage=g._positionimage;j&&(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);if(f.contentlayout_runtime==="lightbox"){if(f.fullscreen)d._csspresizefullscreenimages=g._resizefullscreenimages;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 d=b.options,f=b._findwidgetelements("."+d.viewclassname);if(d.transitionstyle!=="fading"){var j=a('
'),i=b._findwidgetelements("."+d.slideclassname),m=i.outerwidth(),i=i.outerheight();if(d.fullscreen)j.addclass("fullscreen");else{var l={position:"relative",width:m+"px",height:i+"px",overflow:"hidden"},p=f.css("position");if(p==="absolute")l.position=p,l.left=f.css("left"), l.top=f.css("top");else if(p==="fixed"){var q=c.utils.getstylesheetrulebyid(c.utils.getpagestylesheet(),f.get(0).id);l.position=p;l.left=c.utils.getruleproperty(q,"left");l.top=c.utils.getruleproperty(q,"top");l.bottom=c.utils.getruleproperty(q,"bottom");l.right=c.utils.getruleproperty(q,"right")}j.css(l)}d.fullscreen||f.css({width:m+"px",height:i+"px"});f.css({position:"relative",top:"0",left:"0",margin:"0",overflow:"hidden"}).wrap(j)}else p=f.css("position"),!d.fullscreen&&p!=="fixed"&&f.css({width:"0", height:"0"});b._csspisdynamicslideshow&&this._layoutthumbs(b)},_attachbehavior:function(b){var f=this,g=b.options,j=b.tabs,i=b.slides.$element,m=g.slidelinkactiveclassname;b._csspisdynamicslideshow&&(f._setupimagepositioning(b,b.slides.$element,g.herofitting,g.fullscreen),f._setupimagepositioning(b,b.tabs.$element,g.thumbfitting,!1));if(g.fullscreen&&(f._resizefullscreenimages(b,b.slides.$element,g.herofitting),g.contentlayout_runtime!=="lightbox"))a(d).on("orientationchange resize",function(){f._resizefullscreenimages(b, b.slides.$element,g.herofitting)});if(j){var l=j.$element;g.event==="mouseover"&&l.bind("mouseenter",function(){var b=a(this);b.data("enter",!0);j.selecttab(l.index(b))});g.deactivationevent==="mouseout_trigger"?l.bind("mouseleave",function(){var c=a(this);c.data("enter",!1);b.slides.hidepanel(l.index(c))}):g.deactivationevent==="mouseout_both"&&(l.bind("mouseleave",function(){var c=a(this),d=l.index(c),f=i.eq(d);c.data("enter",!1);c.data("settimeout")||(c.data("settimeout",!0),settimeout(function(){!f.data("enter")&& !c.data("enter")&&b.slides.hidepanel(d);c.data("settimeout",!1)},300))}),i.bind("mouseenter",function(){a(this).data("enter",!0)}),i.bind("mouseleave",function(){var c=a(this),d=i.index(c),f=l.eq(d);c.data("enter",!1);f.data("settimeout")||(f.data("settimeout",!0),settimeout(function(){!c.data("enter")&&!f.data("enter")&&b.slides.hidepanel(d);f.data("settimeout",!1)},300))}))}j&&m&&(g.hideallcontentsfirst||j.$element.eq(j.options.defaultindex).addclass(m),b.slides.bind("wp-panel-show",function(a, b){j.$element.eq(b.panelindex).addclass(m)}).bind("wp-panel-hide",function(a,b){j.$element.eq(b.panelindex).removeclass(m)}));f._attachstoponclickhandler(b,b.$firstbtn);f._attachstoponclickhandler(b,b.$lastbtn);f._attachstoponclickhandler(b,b.$previousbtn);f._attachstoponclickhandler(b,b.$nextbtn);f._attachstoponclickhandler(b,b.$playbtn);f._attachstoponclickhandler(b,b.$stopbtn);f._attachstoponclickhandler(b,b.$closebtn);j&&g.contentlayout_runtime!=="lightbox"&&f._attachstoponclickhandler(b,j.$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 d=b.options,f=c.utils.getstylevalue;b._findwidgetelements("."+d.slidelinksclassname).each(function(){var b=a(this).find("."+d.slidelinkclassname);firstthumb=b[0];twidth=f(firstthumb,"width");theight=f(firstthumb,"height");gaph=f(firstthumb,"margin-right");gapv=f(firstthumb,"margin-bottom");borderl=f(firstthumb,"border-left-width");borderr=f(firstthumb,"border-right-width"); bordert=f(firstthumb,"border-top-width");borderb=f(firstthumb,"border-bottom-width");gwidth=f(this,"width");paddingl=f(this,"padding-left");paddingt=f(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.lengthfirstrownum&&(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,c,d){c.each(function(){a(this).find("img").each(function(){this.complete&& !a(this).hasclass(b.options.imageincludeclassname)&&b._cssppositionimage(this,d,!0)})})},_setupimagepositioning:function(b,c,d,f){var i=this;c.each(function(){a(this).find("img").each(function(){var b=this;b.complete?i._positionimage(b,d,f):a(b).load(function(){i._positionimage(b,d,f)})})})},_positionimage:function(b,k,g,j,i){var m=a(d),l=b.runtimestyle?b.runtimestyle:b.style,p=g?d.innerwidth?d.innerwidth:m.width():b.width,m=g?d.innerheight?d.innerheight:m.height():b.height,j=j!==f?j:c.utils.getnaturalwidth(b), i=i!==f?i:c.utils.getnaturalheight(b);g&&(b=a(b),j===0&&(j=b.data("imagewidth")),i===0&&(i=b.data("imageheight")));if(p==j&&m==i)l.margintop="0px",l.marginleft="0px";else{var q=j,b=i;if(k=="fillframeproportionally"){if(g||j>p&&i>m)k=j/p,g=i/m,kp||i>m))k=j/p,g=i/m,k>g?(b=i/k,q=j/k):(b=i/g,q=j/g);l.width=c.utils.pixelround(q)+"px";l.height=c.utils.pixelround(b)+"px";l.margintop=c.utils.pixelround((m-b)/2)+"px";l.marginleft=c.utils.pixelround((p- q)/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);