if (typeof YHCollage == 'undefined') {

	if (typeof console != 'undefined') {
		//console.log ('ShadowboxCollage hack activated');
	}
	
	var YHCollage = function (b, c, d, e, f, g, h, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) {
		document.id(b).setStyle('display', 'none');
		this.wrapperId = b;
		this.width = c;
		this.height = d;
		this.gridEnable = e;
		this.columns = f;
		this.marginX = g;
		this.marginY = h;
		this.titleEnable = j;
		this.titleColor = k;
		this.titleSize = l;
		this.titleFont = m;
		this.titleOffsetX = n;
		this.titleOffsetY = o;
		this.subtitleEnable = p;
		this.subtitleColor = q;
		this.subtitleSize = r;
		this.subtitleFont = s;
		this.subtitleOffsetX = t;
		this.subtitleOffsetY = u;
		this.lbEnable = v;
		this.lbSlideshowEnable = w;
		this.lbSlideshowSpeed = x;
		this.lbControlCloseURL = y;
		this.lbControlNextURL = z;
		this.lbControlPauseURL = A;
		this.lbControlPlayURL = B;
		this.lbControlPrevURL = C;
		this.lbControlBoxURL = D;
		this.lbLoadingURL = E;
		this.lbBackgroundColor = I;
		this.lbBorderColor = G;
		this.lbBorderWidth = F;
		this.hvEnable = J;
		this.hvWidth = K;
		this.hvHeight = L;
		this.hvBackgroundColor = M;
		this.hvBorderWidth = N;
		this.hvBorderColor = O;
		this.hvPadding = P;
		this.hvColor = Q;
		this.hvFontSize = R;
		this.hvFont = S;
		this.myChain = 0;
		this.preloadOver = [];
		this.hvTotalWidth = this.hvWidth + 2 * this.hvBorderWidth + 2 * this.hvPadding;
		this.overlayOpacity = H;
		this.items = $$('#' + this.wrapperId + ' .collageItem');
		this.images = $$('#' + this.wrapperId + ' .collageImage');
		this.anchors = $$('#' + this.wrapperId + ' .collageAnchor');
		this.titles = $$('#' + this.wrapperId + ' .collageTitle');
		this.subtitles = $$('#' + this.wrapperId + ' .collageSubtitle');
		this.hovers = $$('#' + this.wrapperId + ' .collageHover');
		this.mainItems = [];
		this.rollovers = [];
		this.newimages = [];
		this.srcs = [];
		this.images.each(function (a, i) {
			a.style.behavior = '0';
			a.style.filter = '0';
			this.srcs[i] = a.src
		}.bind(this));
		window.addEvent('domready', function () {
			this.go()
		}.bind(this));
		return this
	};
	YHCollage.prototype.go = function () {
		var b = new Element('div', {
			'class': 'collage-main',
			'id': this.wrapperId + '-main'
		}).injectBefore(document.id(this.wrapperId));
		this.baseStyle(b);
		b.setStyle('position', 'relative');
		b.setStyle('margin-left', 'auto');
		b.setStyle('margin-right', 'auto');
		b.setStyle('overflow', 'hidden');
		if (this.gridEnable) {
			b.setStyle('width', this.width * this.columns + this.marginX * (this.columns - 1) + 'px')
		} else {
			b.setStyle('width', '95%')
		}
		this.items.each(function (a, i) {
			this.styleItems(a, i, b)
		}.bind(this));
		this.bdy = "content";
		if (this.hvEnable) {
			this.hover = [];
			this.fxHVHover = [];
			this.images.each(function (e, i) {
				if (this.hovers[i]) {
					this.hover[i] = new Element('div', {
						'class': 'CollageHVBox'
					}).injectInside(document.body);
					this.hover[i].setStyle('display', 'block');
					this.hover[i].setStyle('opacity', 0);
					this.hover[i].style.width = this.hvWidth + 'px';
					this.hover[i].style.height = this.hvHeight + 'px';
					this.hover[i].style.border = this.hvBorderWidth + 'px solid ' + this.hvBorderColor;
					this.hover[i].style.padding = this.hvPadding + 'px';
					this.hover[i].style.color = this.hvColor;
					this.hover[i].style.fontSize = this.hvFontSize + 'px';
					this.hover[i].style.fontFamily = this.hvFont;
					this.hover[i].style.backgroundColor = this.hvBackgroundColor;
					this.hover[i].innerHTML = this.hovers[i].innerHTML;
					this.fxHVHover[i] = new Fx.Morph(this.hover[i], {
						link: 'cancel',
						duration: 300,
						transition: Fx.Transitions.Quad.easeInOut
					});
					this.mainItems[i].addEvent("mouseenter", function () {
						this.HVFadeIn(i)
					}.bind(this));
					this.mainItems[i].addEvent("mouseleave", function () {
						this.HVFadeOut(i)
					}.bind(this))
				}
			}.bind(this))
		}
		if (this.lbEnable) {
			this.overlay = new Element('div', {
				'id': 'CollageLBOverlay'
			}).injectInside(document.body);
			this.overlay.setStyle('display', 'none');
			this.overlay.setStyle('backgroundColor', this.lbBackgroundColor);
			this.overlay.setOpacity(0);
			this.isOpen = 0;
			this.image = new Element('img', {
				'id': 'CollageLBImage'
			}).injectInside(document.body);
			this.image.style.display = 'none';
			this.image.setStyle('borderColor', this.lbBorderColor);
			this.image.setStyle('borderWidth', this.lbBorderWidth);
			this.image.setOpacity(0);
			this.image.style.behavior = '0';
			this.loading = new Element('img', {
				'id': 'CollageLBLoading'
			}).injectInside(this.overlay);
			this.loading.style.position = 'absolute';
			this.loading.style.display = 'block';
			this.loading.src = this.lbLoadingURL;
			this.loading.style.top = (window.getHeight() - 32) / 2 + window.getScrollTop() + 'px';
			this.loading.style.left = (window.getWidth() - 32) / 2 + 'px';
			this.loading.setOpacity(0);
			this.lbControlClose = new Element('div', {
				'id': 'CollageLBClose'
			}).injectInside(document.body);
			if (yhBlankImg == "") {
				this.lbControlClose.style.backgroundImage = 'url(' + this.lbControlCloseURL + ')'
			} else {
				this.lbControlClose.style.backgroundImage = ''
			}
			this.lbControlClose.style.width = '30px';
			this.lbControlClose.style.height = '30px';
			this.pngFix(this.lbControlClose);
			this.lbControlClose.style.display = 'none';
			this.lbControlClose.setOpacity(0);
			if (this.lbSlideshowEnable) {
				this.lbControlBox = new Element('div', {
					'id': 'CollageLBControlBox'
				}).injectInside(document.body);
				this.lbControlBox.style.display = 'none';
				this.lbControlBox.setOpacity(0);
				if (yhBlankImg == "") {
					this.lbControlBox.style.backgroundImage = 'url(' + this.lbControlBoxURL + ')'
				} else {
					this.lbControlBox.style.backgroundColor = '#000000'
				}
				this.lbControlPrev = new Element('div', {
					'class': 'CollageLBControl'
				}).injectInside(this.lbControlBox);
				this.lbControlPlay = new Element('div', {
					'class': 'CollageLBControl'
				}).injectInside(this.lbControlBox);
				this.lbControlPause = new Element('div', {
					'class': 'CollageLBControl'
				}).injectInside(this.lbControlBox);
				this.lbControlNext = new Element('div', {
					'class': 'CollageLBControl'
				}).injectInside(this.lbControlBox);
				this.pngFix(this.lbControlPrev);
				this.pngFix(this.lbControlPlay);
				this.pngFix(this.lbControlPause);
				this.pngFix(this.lbControlNext);
				this.lbControlPause.style.display = 'none';
				this.lbControlPrev.style.left = 32 + 'px';
				this.lbControlPlay.style.left = 96 + 'px';
				this.lbControlPause.style.left = 96 + 'px';
				this.lbControlNext.style.left = 160 + 'px';
				this.lbControlPrev.style.backgroundImage = 'url(' + this.lbControlPrevURL + ')';
				this.lbControlPlay.style.backgroundImage = 'url(' + this.lbControlPlayURL + ')';
				this.lbControlPause.style.backgroundImage = 'url(' + this.lbControlPauseURL + ')';
				this.lbControlNext.style.backgroundImage = 'url(' + this.lbControlNextURL + ')';
				this.lbControlNext.addEvent("click", function () {
					this.LBNextClick()
				}.bind(this));
				this.lbControlPrev.addEvent("click", function () {
					this.LBPrevClick()
				}.bind(this));
				this.lbControlPlay.addEvent("click", function () {
					this.LBPlay()
				}.bind(this));
				this.lbControlPause.addEvent("click", function () {
					this.LBPause()
				}.bind(this));
				window.addEvent('keydown', function (a) {
					if (!this.isOpen) return;
					a.stopPropagation();
					if (a.key == 'esc') {
						this.LBClose()
					}
					this.LBEnableFade();
					if (a.key == 'left') this.LBPrevClick();
					if (a.key == 'right') this.LBNextClick();
					if (a.key == 'space') {
						if (this.isPlaying) this.LBPause();
						else this.LBPlay()
					}
					return false
				}.bind(this));
				this.fadeEnable = 1;
				this.lbControlBox.addEvent("mouseenter", function () {
					this.LBDisableFade()
				}.bind(this));
				this.lbControlBox.addEvent("mouseleave", function () {
					this.LBEnableFade()
				}.bind(this));
				this.fxLBControlIn = new Fx.Morph(this.lbControlBox, {
					duration: 100
				});
				this.fxLBControlOut = new Fx.Morph(this.lbControlBox, {
					link: 'chain',
					duration: 4000,
					transition: Fx.Transitions.Quad.easeOut
				})
			}
			this.fxLBClose = new Fx.Morph(this.lbControlClose, {
				duration: 200,
				transition: Fx.Transitions.linear
			});
			this.overlay.addEvent("mousemove", function () {
				this.LBMove()
			}.bind(this));
			this.image.addEvent("mousemove", function () {
				this.LBMove()
			}.bind(this));
			window['addEvent']('scroll', this.position.bind(this))['addEvent']('resize', this.position.bind(this));
			this.fxLBOverlay = new Fx.Morph(this.overlay, 'opacity', {
				duration: 50,
				transition: Fx.Transitions.linear
			});
			this.fxLBImage = new Fx.Morph(this.image, {
				link: 'chain',
				duration: 300,
				transition: Fx.Transitions.Quad.easeInOut,
				onComplete: function () {
					this.image.pin()
				}.bind(this)
			});
			this.overlay.addEvent("click", function () {
				this.LBClose()
			}.bind(this));
			this.image.addEvent("click", function () {
				this.LBClose()
			}.bind(this));
			this.lbControlClose.addEvent("click", function () {
				this.LBDisableFade();
				this.LBClose()
			}.bind(this))
		}
	};
	YHCollage.prototype.HVFadeIn = function (i) {
		this.hover[i].style.display = 'block';
		this.hover[i].style.left = (this.width - this.hvTotalWidth) / 2 + this.mainItems[i].getLeft() + 'px';
		if (this.hover[i].style.top == 0) this.hover[i].style.top = this.mainItems[i].getTop() + this.height + 20 + 'px';
		this.fxHVHover[i].start({
			'opacity': [this.hover[i].style.opacity, 1],
			'top': [this.hover[i].style.top, this.mainItems[i].getTop() + this.height]
		})
	};
	YHCollage.prototype.HVFadeOut = function (i) {
		this.fxHVHover[i].start({
			'opacity': [this.hover[i].style.opacity, 0],
			'top': [this.hover[i].style.top, this.mainItems[i].getTop() + this.height + 20]
		})
	};
	YHCollage.prototype.baseStyle = function (e) {
		e.style.display = 'block';
		e.style.padding = '0px';
		e.style.margin = '0px';
		e.style.border = '0px solid black';
		e.style.background = '0'
	};
	YHCollage.prototype.imageName = function (a) {
		return 'url("collage_image_' + a + '_1.' + 'png' + '")'
	};
	YHCollage.prototype.LBDisableFade = function () {
		this.fadeEnable = 0;
		if (!this.lbSlideshowEnable) return;
		if (this.myChain) this.myChain.clearChain();
		this.myChain = new Chain;
		this.fxLBControlOut.cancel();
		this.fxLBControlIn.start({
			'opacity': 0.75
		})
	};
	YHCollage.prototype.LBEnableFade = function () {
		if (!this.lbSlideshowEnable) return;
		this.fadeEnable = 1;
		if (this.myChain) this.myChain.clearChain();
		this.myChain = new Chain;
		this.fxLBControlOut.cancel();
		this.fxLBControlIn.start({
			'opacity': 0.75
		});
		var a = function () {
			this.myChain.callChain()
		}.bind(this);
		var b = function () {
			this.fxLBControlOut.start({
				'opacity': 0
			});
			this.myChain.callChain()
		}.bind(this);
		var c = function () {}.bind(this);
		this.myChain.chain(a).wait(2000).chain(b).chain(c);
		this.myChain.callChain()
	};
	YHCollage.prototype.LBMove = function () {
		if (!this.fadeEnable) return;
		this.LBEnableFade()
	};
	YHCollage.prototype.LBPlay = function () {
		$clear(this.playTimer);
		this.isPlaying = 1;
		this.lbControlPlay.style.display = 'none';
		this.lbControlPause.style.display = 'block';
		(function () {
			this.LBNext()
		}.bind(this)).delay(500)
	};
	YHCollage.prototype.LBPause = function () {
		$clear(this.playTimer);
		this.isPlaying = 0;
		this.lbControlPlay.style.display = 'block';
		this.lbControlPause.style.display = 'none'
	};
	YHCollage.prototype.LBNextClick = function () {
		if (this.isPlaying) this.LBPause();
		this.LBNext()
	};
	YHCollage.prototype.LBNext = function () {
		this.preload = new Image();
		this.fxLBClose.start({
			'opacity': 0
		}).chain(function () {
			this.fxLBImage.start({
				'opacity': 0
			}).chain(function () {
				var i = this.lbIndex + 1;
				if (i >= this.items.length) i = 0;
				var a = this.anchors[i].href;
				this.preload.onload = function () {
					if (!this.isOpen) return;
					this.preloadNext();
					(function () {
						this.loading.setOpacity(0)
					}.bind(this)).delay(600);
					this.image.src = a;
					this.placeLbImage(this.preload);
					this.placeClose(this.preload);
					this.fxLBImage.start({
						'opacity': 1
					}).chain(function () {
						if (!this.isOpen) {
							this.LBClose();
							return
						}
						this.fxLBClose.start({
							'opacity': 1
						})
					}.bind(this));
					if (this.isPlaying) {
						this.playTimer = (function () {
							this.LBNext()
						}.bind(this)).delay(this.lbSlideshowSpeed)
					}
				}.bind(this);
				if (!this.isOpen) return;
				this.preload.src = a;
				this.lbIndex = i;
				(function () {
					this.loading.setOpacity(1)
				}.bind(this)).delay(500)
			}.bind(this))
		}.bind(this))
	};
	YHCollage.prototype.LBPrevClick = function () {
		if (this.isPlaying) this.LBPause();
		this.LBPrev()
	};
	YHCollage.prototype.LBPrev = function () {
		this.preload = new Image();
		this.fxLBClose.start({
			'opacity': 0
		}).chain(function () {
			this.fxLBImage.start({
				'opacity': 0
			}).chain(function () {
				var i = this.lbIndex - 1;
				if (i < 0) i = this.items.length - 1;
				var a = this.anchors[i].href;
				this.preload.onload = function () {
					if (!this.isOpen) return;
					this.preloadPrev();
					(function () {
						this.loading.setOpacity(0)
					}.bind(this)).delay(600);
					this.image.src = a;
					this.placeLbImage(this.preload);
					this.placeClose(this.preload);
					this.fxLBImage.start({
						'opacity': 1
					}).chain(function () {
						if (!this.isOpen) {
							this.LBClose();
							return
						}
						this.fxLBClose.start({
							'opacity': 1
						})
					}.bind(this));
					if (this.isPlaying) {
						this.playTimer = (function () {
							this.LBPrev()
						}.bind(this)).delay(this.lbSlideshowSpeed)
					}
				}.bind(this);
				if (!this.isOpen) return;
				this.preload.src = a;
				this.lbIndex = i;
				(function () {
					this.loading.setOpacity(1)
				}.bind(this)).delay(500)
			}.bind(this))
		}.bind(this))
	};
	YHCollage.prototype.LBClose = function () {
		this.overlay.removeEvents("mousemove");
		this.image.removeEvents("mousemove");
		if (this.lbSlideshowEnable) this.lbControlBox.setStyle('display', 'none');
		this.lbControlClose.setStyle('display', 'none');
		this.overlay.morph({
			'opacity': 0
		});
		this.lbControlClose.morph({
			'opacity': 0
		});
		this.loading.morph({
			'opacity': 0
		});
		if (this.lbSlideshowEnable) {
			this.LBPause();
			this.lbControlBox.morph({
				'opacity': 0
			})
		}
		var i = this.lbIndex;
		this.fxLBImage.start({
			'top': this.lbMiniImageTop(this.image, i),
			'left': this.lbMiniImageLeft(this.image, i),
			'width': this.lbMiniImageWidth(this.image, i),
			'height': this.lbMiniImageHeight(this.image, i),
			'opacity': 0
		});
		this.isOpen = 0
	};
	YHCollage.prototype.position = function () {
		if (!this.isOpen) return;
		this.placeLbImage(this.image);
		this.placeClose(this.image);
		if (this.lbSlideshowEnable) {
			this.placeControl()
		}
		this.loading.style.top = (window.getHeight() - 32) / 2 + 'px';
		this.loading.style.left = (window.getWidth() - 32) / 2 + 'px'
	};
	YHCollage.prototype.lbImageTop = function (a) {
		return (window.getHeight() - a.height) / 2 - this.lbBorderWidth
	};
	YHCollage.prototype.lbImageLeft = function (a) {
		return (window.getWidth() - a.width) / 2 - this.lbBorderWidth
	};
	YHCollage.prototype.lbImageWidth = function (a) {
		return a.width
	};
	YHCollage.prototype.lbImageHeight = function (a) {
		return a.height
	};
	YHCollage.prototype.placeLbImage = function (a) {
		this.image.style.top = this.lbImageTop(a) + 'px';
		this.image.style.left = this.lbImageLeft(a) + 'px';
		this.image.style.width = this.lbImageWidth(a) + 'px';
		this.image.style.height = this.lbImageHeight(a) + 'px';
		this.image.pin()
	};
	YHCollage.prototype.lbMiniImageTop = function (a, b) {
		return this.mainItems[b].getTop() - window.getScrollTop()
	};
	YHCollage.prototype.lbMiniImageLeft = function (a, b) {
		return this.mainItems[b].getLeft()
	};
	YHCollage.prototype.lbMiniImageWidth = function (a, b) {
		return this.width
	};
	YHCollage.prototype.lbMiniImageHeight = function (a, b) {
		return a.height * this.width / a.width
	};
	YHCollage.prototype.lbCloseTop = function (a) {
		return this.lbImageTop(a) - 12
	};
	YHCollage.prototype.lbCloseLeft = function (a) {
		return this.lbImageLeft(a) - 12
	};
	YHCollage.prototype.placeClose = function (a) {
		this.lbControlClose.setStyle('top', this.lbCloseTop(a) + 'px');
		this.lbControlClose.setStyle('left', this.lbCloseLeft(a) + 'px');
		this.lbControlClose.setStyle('display', 'block');
		this.lbControlClose.morph({
			'opacity': 1
		});
		this.lbControlClose.pin()
	};
	YHCollage.prototype.placeOverlay = function () {
		this.overlay.setStyle('display', 'block');
		this.overlay.setStyle('top', 0 + 'px');
		this.overlay.setStyle('left', 0 + 'px');
		this.overlay.setStyle('width', 100 + '%');
		this.overlay.setStyle('height', 100 + '%');
		this.overlay.morph({
			'opacity': this.overlayOpacity
		})
	};
	YHCollage.prototype.placeControl = function () {
		this.lbControlBox.style.display = 'block';
		this.lbControlBox.style.top = window.getHeight() - 96 + 'px';
		this.lbControlBox.style.left = (window.getWidth() - 256) / 2 + 'px';
		this.lbControlBox.pin()
	};
	YHCollage.prototype.lightbox = function (i) {

		if (typeof console != 'undefined') {
			//console.log ('original lightbox method called',i, this);
		}


			// make array of objects
			var ar = new Array;
			for (var j = 0; j < this.anchors.length; j++) {
				
				//console.log ('loop ', j);
				ar.push({
			        content:     this.anchors[j].href
			        ,player:     "img"
		    	    ,gallery:    "my_gallery"
			        //,title:      "Welcome"
			    });
				
			}

			//console.log ('this.anchors.length',this.anchors.length);
			//console.log ('ar.length',ar.length);
			//console.log ('i',i);

			// stitch it
			//ar = ar.concat( ar.slice(i), ar.slice(0,i) );
			var part2 = ar.slice(i);
			var part1 = ar.slice(0,i);
			ar = part2.concat(part1);

			//console.log ('ar.length',ar.length);

		    // open Shadowbox
		    Shadowbox.open( ar );
		    
		    // don't start the slideshow
		    //Shadowbox.pause();
		    //Shadowbox.change( 2 );
		    
		// skip the rest
		return true;
		
		    	
		this.loading.setOpacity(1);
		this.loading.style.top = (window.getHeight() - 32) / 2 + 'px';
		this.loading.style.left = (window.getWidth() - 32) / 2 + 'px';
		this.placeOverlay();
		var a = new Image();
		a.onload = function () {
			this.image.setOpacity(0);
			this.image.style.display = 'block';
			this.image.src = a.src;
			this.fxLBImage.chain(function () {
				this.placeClose(a);
				if (this.lbSlideshowEnable) {
					this.placeControl();
					this.LBPause()
				}
				this.image.pin()
			}.bind(this));
			this.fxLBImage.start({
				'opacity': [0, 1],
				'top': [this.lbMiniImageTop(a, i), this.lbImageTop(a)],
				'left': [this.lbMiniImageLeft(a, i), this.lbImageLeft(a)],
				'width': [this.lbMiniImageWidth(a, i), this.lbImageWidth(a)],
				'height': [this.lbMiniImageHeight(a, i), this.lbImageHeight(a)]
			});
			this.loading.setOpacity(0);
			this.preloadNext();
			this.preloadPrev()
		}.bind(this);
		a.src = this.anchors[i].href;
		this.LBEnableFade()
	};
	YHCollage.prototype.preloadNext = function () {
		var i = this.lbIndex + 1;
		if (i >= this.images.length) i = 0;
		var a = new Image();
		a.src = this.anchors[i].href
	};
	YHCollage.prototype.preloadPrev = function () {
		var i = this.lbIndex - 1;
		if (i < 0) i = this.images.length - 1;
		var a = new Image();
		a.src = this.anchors[i].href
	};
	YHCollage.prototype.pngFix = function (e) {
		if (yhPngFix == "") {
			e.style.behavior = '';
			return
		}
		e.style.behavior = 'url(' + yhPngFix + ')'
	};
	YHCollage.prototype.styleItems = function (a, i, b) {
		var c = new Element('div', {
			'class': 'collage-item'
		}).inject(b);
		this.mainItems[i] = c;
		this.baseStyle(c);
		c.setStyle('position', 'relative');
		c.setStyle('float', 'left');
		c.setStyle('overflow', 'hidden');
		var d = this.height + Math.max(Math.max(this.titleOffsetY + 34, 0), Math.max(this.subtitleOffsetY + 34, 0));
		c.setStyle('height', d + 'px');
		c.setStyle('width', this.width + 'px');
		c.setStyle('background-position', 'left 0px');
		c.setStyle('margin-top', '0px');
		c.setStyle('margin-bottom', this.marginY + 'px');
		c.setStyle('margin-left', '0px');
		c.setStyle('margin-right', this.marginX + 'px');
		c.setStyle('border', '0px solid blue');
		c.setStyle('cursor', 'pointer');
		if ((this.gridEnable) && (i % this.columns == 0) && (i > 0)) {
			c.setStyle('clear', 'left')
		}
		if (this.lbEnable) {
			c.addEvent("click", function () {
				//this.isOpen = 1;
				this.lbIndex = i;
				this.lightbox(i)
			}.bind(this))
		} else {
			c.addEvent("click", function () {
				if (this.anchors[i].getProperty('rel') != 'external') window.location = this.anchors[i].getProperty('href');
				else window.open(this.anchors[i].getProperty('href'), '_blank').focus()
			}.bind(this))
		}
		if ((this.gridEnable) && (i % this.columns == this.columns - 1)) {
			c.setStyle('margin-right', '0px')
		}
		var e = this.srcs[i];
		e = e.replace('collage_idle', 'collage_over');
		this.rollovers[i] = new Image();
		this.rollovers[i].style.position = 'relative';
		this.rollovers[i].style.display = 'none';
		this.rollovers[i].width = this.width;
		this.rollovers[i].height = this.height;
		this.rollovers[i].src = e;
		this.newimages[i] = new Image();
		this.newimages[i].style.position = 'relative';
		this.newimages[i].style.display = 'block';
		this.newimages[i].width = this.width;
		this.newimages[i].height = this.height;
		this.newimages[i].src = this.srcs[i];
		this.pngFix(this.newimages[i]);
		this.pngFix(this.rollovers[i]);
		c.adopt(this.newimages[i]);
		c.adopt(this.rollovers[i]);
		c.adopt(this.titles[i]);
		c.adopt(this.subtitles[i]);
		if (!this.titleEnable) this.titles[i].setStyle('display', 'none');
		else this.titles[i].setStyle('display', 'block');
		this.titles[i].setStyle('font-size', this.titleSize + 'pt');
		this.titles[i].setStyle('color', this.titleColor);
		this.titles[i].setStyle('text-align', 'center');
		this.titles[i].setStyle('margin', '0');
		this.titles[i].setStyle('padding', '0');
		this.titles[i].setStyle('border', '0');
		if (this.titleFont != "") {
			this.titles[i].setStyle('font-family', this.titleFont);
			this.titles[i].setStyle('font-style', 'normal');
			this.titles[i].setStyle('font-variant', 'normal');
			this.titles[i].setStyle('font-weight', 'normal');
			this.titles[i].setStyle('letter-spacing', 'normal');
			this.titles[i].setStyle('line-height', 'normal')
		}
		this.titles[i].setStyle('position', 'absolute');
		this.titles[i].setStyle('overflow', 'visible');
		this.titles[i].setStyle('width', '100%');
		this.titles[i].setStyle('top', (this.height + this.titleOffsetY) + 'px');
		this.titles[i].setStyle('left', this.titleOffsetX + 'px');
		var f = this.anchors[i].innerHTML;
		this.titles[i].set('html', f);
		this.subtitles[i].setStyle('font-size', this.subtitleSize + 'pt');
		this.subtitles[i].setStyle('color', this.subtitleColor);
		this.subtitles[i].setStyle('text-align', 'center');
		this.subtitles[i].setStyle('margin', '0');
		this.subtitles[i].setStyle('padding', '0');
		this.subtitles[i].setStyle('border', '0');
		if (this.subtitleFont != "") {
			this.subtitles[i].setStyle('font-family', this.subtitleFont);
			this.subtitles[i].setStyle('font-style', 'normal');
			this.subtitles[i].setStyle('font-variant', 'normal');
			this.subtitles[i].setStyle('font-weight', 'normal');
			this.subtitles[i].setStyle('letter-spacing', 'normal');
			this.subtitles[i].setStyle('line-height', 'normal')
		}
		if (!this.subtitleEnable) this.subtitles[i].setStyle('display', 'none');
		else this.subtitles[i].setStyle('display', 'block');
		this.subtitles[i].setStyle('position', 'absolute');
		this.subtitles[i].setStyle('overflow', 'visible');
		this.subtitles[i].setStyle('width', '100%');
		this.subtitles[i].setStyle('top', (this.height + this.subtitleOffsetY) + 'px');
		this.subtitles[i].setStyle('left', this.subtitleOffsetX + 'px');
		c.addEvent("mouseenter", function () {
			this.newimages[i].style.display = 'none';
			this.rollovers[i].style.display = 'block'
		}.bind(this));
		c.addEvent("mouseleave", function () {
			this.newimages[i].style.display = 'block';
			this.rollovers[i].style.display = 'none'
		}.bind(this));
		d = this.height + Math.max(Math.max(this.titleOffsetY + this.titles[i].getDimensions().height, 0), Math.max(this.subtitleOffsetY + this.subtitles[i].getDimensions().height, 0));
		c.setStyle('height', d + 'px')
	}
}
