function load_complete () {
	elements = document.getElementsByTagName('a');
	for (i in elements) {
		element = elements[i];
		try {
			if (element.getAttribute('href') == this.src) {
				width = this.width;
				height = this.height;
				while (width > 142) {
					width--;
					height--;
				}
				element.innerHTML = '<img src="' + this.src + '" alt="' + this.src + '" width="' + width + '" height="' + height + '" border="0" />';
			}
		} catch (e) {}
	}
}
function load_handler () {
	elements = document.getElementsByTagName('a');
	images = new Array();
	x = 0;
	for (i in elements) {
		try {
			element = elements[i];
			if (element.getAttribute('rel') == 'lightbox') {
				images[i] = new Image();
				images[i].src = element.getAttribute('href');
				images[i].onload = load_complete;
				x++;
			}
			if (x == 2)
				break;
		} catch (e) {}
	}
}
window.onload = load_handler;