LightboxOptions = Object.extend({iFrameHeight: 400,iFrameWidth: 600,onClose: function() {}
}, LightboxOptions);var LightboxExtension = Class.create(Lightbox, {initialize: function($super) {$super();$("imageContainer").appendChild(Builder.node("iframe", {id: "lightboxIframe",scrolling: "auto",frameBorder: 0,width: "100%",height: "100%"
}));this.lightboxIframe = $("lightboxIframe");},changeImage: function($super, imageNum) {this.activeImage = imageNum;this.lightboxImage.hide();this.lightboxIframe.hide();if (this.imageArray[this.activeImage][0].match(/\.(gif|jpg|png)$/)){this.contentType = "image";return $super(imageNum);}
this.contentType = "iframe";this.lightboxImage = this.lightboxIframe;if (LightboxOptions.animate) this.loading.show();this.lightboxImage.hide();this.hoverNav.hide();this.prevLink.hide();this.nextLink.hide();this.imageDataContainer.setStyle({opacity: .0001});this.numberDisplay.hide();this.lightboxIframe.src = this.imageArray[this.activeImage][0];this.resizeImageContainer(LightboxOptions.iFrameWidth, LightboxOptions.iFrameHeight);},resizeImageContainer: function($super, imgWidth, imgHeight) {this.lightboxIframe.setStyle({height: LightboxOptions.iFrameHeight + "px"});$super(imgWidth, imgHeight);},showImage: function(){this.loading.hide();new Effect.Appear("image" == this.contentType ? this.lightboxImage : this.lightboxIframe, {duration: this.resizeDuration,queue: 'end',afterFinish: (function(){ this.updateDetails(); }).bind(this) 
});this.preloadNeighborImages();},updateNav: function($super) {if ("image" == this.contentType) {$super();}
},end: function($super) {$super();this.lightboxIframe.src = "";LightboxOptions.onClose(this.imageArray[this.activeImage][0]);}
});document.observe('dom:loaded', function () { new LightboxExtension(); });
