!function(o,n){var l={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2},s=["Large","Medium"];function a(t,e){var i=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){i.loaded=!0,e._onLoaded()},this.image.src=t.src,this.label=t.label||!1,this.credit=t.credit||!1}function d(t,e){var i=this;this.image=new Image,this.loaded=!1,this.image.onload=function(){i.loaded=!0,e._onLoaded()},this.flickrID=this.getFlickrID(t.src),this.callFlickrAPI(this.flickrID,i),this.label=t.label||!1,this.credit=t.credit||!1}function e(t){if(t.naturalWidth&&t.naturalHeight)return{width:t.naturalWidth,height:t.naturalHeight};var e=new Image;return e.src=t.src,{width:e.width,height:e.height}}function r(t){return{width:e(t).width,height:e(t).height,aspect:function(){return this.width/this.height}}}function c(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function p(t,i){t.className=t.className.replace(/(\S+)\s*/g,function(t,e){return e===i?"":t}).replace(/^\s+/,"")}function i(t,e){o.body.textContent?t.textContent=e:t.innerText=e}function g(t){return n.getComputedStyle?{width:parseInt(getComputedStyle(t).width,10),height:parseInt(getComputedStyle(t).height,10)}:(w=t.getBoundingClientRect().right-t.getBoundingClientRect().left,h=t.getBoundingClientRect().bottom-t.getBoundingClientRect().top,{width:parseInt(w,10)||0,height:parseInt(h,10)||0})}function u(t){return-1!=t.indexOf("flickr.com/photos/")}function m(t,e){if("string"==typeof e||"number"==typeof e)leftPercent=parseInt(e,10);else{var i=t.getBoundingClientRect(),r=(i.top,o.body.scrollTop,i.left+o.body.scrollLeft),s=t.offsetWidth,a=(n=e).pageX?n.pageX:n.touches?n.touches[0].pageX:n.clientX+o.body.scrollLeft+o.documentElement.scrollLeft;leftPercent=(a-r)/s*100}var n;return leftPercent}function f(t,e){if("string"==typeof e||"number"==typeof e)topPercent=parseInt(e,10);else{var i=t.getBoundingClientRect(),r=i.top+o.body.scrollTop,s=(i.left,o.body.scrollLeft,t.offsetHeight),a=(n=e).pageY?n.pageY:n.touches?n.touches[0].pageY:n.clientY+o.body.scrollTop+o.documentElement.scrollTop;topPercent=(a-r)/s*100}var n;return topPercent}d.prototype={getFlickrID:function(t){var e=t.indexOf("flickr.com/photos/")+"flickr.com/photos/".length,i=t.substr(e);return-1==i.indexOf("/")?null:(0===i.indexOf("/")&&(i=i.substr(1)),id=i.split("/")[1],id)},callFlickrAPI:function(t,e){var i="https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key=d90fc2d1f4acc584e08b8eaea5bf4d6c&photo_id="+t+"&format=json&nojsoncallback=1",r=new XMLHttpRequest;r.open("GET",i,!0),r.onload=function(){if(200<=r.status&&r.status<400){data=JSON.parse(r.responseText);var t=e.bestFlickrUrl(data.sizes.size);e.setFlickrImage(t)}else console.error("There was an error getting the picture from Flickr")},r.onerror=function(){console.error("There was an error getting the picture from Flickr")},r.send()},setFlickrImage:function(t){this.image.src=t},bestFlickrUrl:function(t){for(var e={},i=0;iPhoto Credits:",this.imgBefore.credit&&(text+=" Before "+this.imgBefore.credit),this.imgAfter.credit&&(text+=" After "+this.imgAfter.credit),credit.innerHTML=text,this.wrapper.appendChild(credit)},setStartingPosition:function(t){this.options.startingPosition=t},checkImages:function(){return r(this.imgBefore.image).aspect()==r(this.imgAfter.image).aspect()},calculateDims:function(t,e){var i=r(this.imgBefore.image).aspect();return t?e=t/i:e&&(t=e*i),{width:t,height:e,ratio:i}},responsivizeIframe:function(t){return t.heightn.innerHeight&&(t=this.calculateDims(0,n.innerHeight),this.wrapper.style.paddingLeft=parseInt((n.innerWidth-t.width)/2)+"px"),this.options.showCredits&&(t.height-=13),t},setWrapperDimensions:function(){var t=g(this.wrapper).width,e=g(this.wrapper).height,i=this.calculateDims(t,e);n.location===n.parent.location||this.options.makeResponsive||(i=this.responsivizeIframe(i)),this.slider.style.height=parseInt(i.height)+"px",this.slider.style.width=parseInt(i.width)+"px"},optimizeWrapper:function(t){var e=l.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=t&&this.imgAfter.image.naturalWidth>=t?(this.wrapper.style.width=t+"px",e=l.OPTIMIZATION_WAS_CONSTRAINED):this.imgAfter.image.naturalWidth