ErrorAdobe Flash is either not installed or not up to date, please visit 
Adobe.com to download the free player.
 ');
				mediaWidth = options.DefaultWidth;
				mediaHeight = options.DefaultHeight;
			} else {
				media.setStyles({backgroundImage: "none", display: ""});
				preload.inject(media);
//				if (Browser.safari) options.resizeOpening = false;	// Prevents occasional blank video display errors in Safari, thanks to Kris Gale for the solution
			}
		} else {
			media.setStyles({backgroundImage: "none", display: ""});
			media.set('html', options.flashText);
			mediaWidth = options.defaultWidth;
			mediaHeight = options.defaultHeight;
		}
		title.set('html', (options.showCaption) ? captionSplit[0] : "");
		caption.set('html', (options.showCaption && (captionSplit.length > 1)) ? captionSplit[1] : "");
		number.set('html', (options.showCounter && (mediaArray.length > 1)) ? options.counterText.replace(/{x}/, (options.countBack)?mediaArray.length-activeMedia:activeMedia+1).replace(/{y}/, mediaArray.length) : "");
//		if (options.countBack) {
//			number.set('html', (options.showCounter && (mediaArray.length > 1)) ? options.counterText.replace(/{x}/, activeMedia + 1).replace(/{y}/, mediaArray.length) : "");
//		} else {
//			number.set('html', (options.showCounter && (mediaArray.length > 1)) ? options.counterText.replace(/{x}/, mediaArray.length - activeMedia).replace(/{y}/, mediaArray.length) : "");
//		}
		if ((prevMedia >= 0) && (mediaArray[prevMedia][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadPrev.src = mediaArray[prevMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
		if ((nextMedia >= 0) && (mediaArray[nextMedia][0].match(/\.gif|\.jpg|\.jpeg|\.png|twitpic\.com/i))) preloadNext.src = mediaArray[nextMedia][0].replace(/twitpic\.com/i, "twitpic.com/show/full");
		if (prevMedia >= 0) prevLink.style.display = "";
		if (nextMedia >= 0) nextLink.style.display = "";
		media.setStyles({width: mediaWidth+"px", height: mediaHeight+"px"});
		bottom.setStyles({width: mediaWidth-marginBottom+"px"});
		caption.setStyles({width: mediaWidth-marginBottom+"px"});
		mediaWidth = media.offsetWidth;
		mediaHeight = media.offsetHeight+bottom.offsetHeight;
		if (mediaHeight >= top+top) { mTop = -top } else { mTop = -(mediaHeight/2) };
		if (mediaWidth >= left+left) { mLeft = -left } else { mLeft = -(mediaWidth/2) };
/****/	if (options.resizeOpening) { fx.resize.start({width: mediaWidth, height: mediaHeight, marginTop: mTop-margin, marginLeft: mLeft-margin});
/****/	} else { center.setStyles({width: mediaWidth, height: mediaHeight, marginTop: mTop-margin, marginLeft: mLeft-margin}); mediaAnimate(); }
//		center.setStyles({width: mediaWidth, height: mediaHeight, marginTop: mTop-margin, marginLeft: mLeft-margin});
//		mediaAnimate();
	}
	function mediaAnimate() {
		fx.media.start(1);
	}
	function captionAnimate() {
		center.className = "";
//		if (prevMedia >= 0) prevLink.style.display = "";
//		if (nextMedia >= 0) nextLink.style.display = "";
		fx.bottom.start(1);
	}
	function stop() {
		if (preload) {
			if (mediaType == "inline" && !options.inlineClone) preload.adopt(media.getChildren());	// prevents loss of adopted data
			preload.onload = function(){}; // $empty replacement
		}
		fx.resize.cancel();
		fx.media.cancel().set(0);
		fx.bottom.cancel().set(0);
		$$(prevLink, nextLink).setStyle("display", "none");
	}
	function close() {
		if (activeMedia >= 0) {
			if (mediaType == "inline" && !options.inlineClone) preload.adopt(media.getChildren());	// prevents loss of adopted data
			preload.onload = function(){}; // $empty replacement
			media.empty();
			for (var f in fx) fx[f].cancel();
			center.setStyle("display", "none");
			fx.overlay.chain(setup).start(0);
		}
		return false;
	}
})();
	/*	Quicktime detection from Quickie.js	*/
Browser.Plugins.QuickTime = (function(){
	if (navigator.plugins) {
		for (var i = 0, l = navigator.plugins.length; i < l; i++) {
			if (navigator.plugins[i].name.indexOf('QuickTime') >= 0) {
				return true;
			}
		}
	} else {
		try { var test = new ActiveXObject('QuickTime.QuickTime'); }
		catch(e) {}
		
		if (test) { return true; }
	}
	return false;
})();
	/*	Autoload code block	*/
Mediabox.scanPage = function() {
//	if (Browser.Platform.ios && !(navigator.userAgent.match(/iPad/i))) return;	// this quits the process if the visitor is using a non-iPad iOS device (iPhone or iPod Touch)
//	$$('#mb_').each(function(hide) { hide.set('display', 'none'); });
	var links = $$("a").filter(function(el) {
		return el.rel && el.rel.test(/^lightbox/i);
	});
//	$$(links).mediabox({/* Put custom options here */}, null, function(el) {
	links.mediabox({/* Put custom options here */}, null, function(el) {
		var rel0 = this.rel.replace(/[[]|]/gi," ");
		var relsize = rel0.split(" ");
		return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
	});
};
window.addEvents({domready: Mediabox.scanPage, resize: Mediabox.recenter}); // to recenter the overlay while scrolling, add "scroll: Mediabox.recenter" to the object
}