var Lightbox =
{
	create: function(){
		if ($('lightbox') != null) {
			return;
		}
		var images = ['ferret1', 'ferret2'];
		var imgName = images[Math.round(Math.random() * (images.length - 1))];
		var imgSrc = 'images/' + imgName + '.jpg';
		var body = document.body;
		var overlay = Builder.node('div', {
			id: 'overlay'
		});
		var lightbox = Builder.node('img', {
			src: imgSrc,
			id: 'lightbox'
		});
		body.appendChild(overlay);
		body.appendChild(lightbox);
		Event.observe(overlay, 'click', function(event){
			Lightbox.destroy();
		});
		Event.observe(lightbox, 'click', function(event){
			Lightbox.recreate();
		});
	},
	destroy: function(){
		var body = document.body;
		body.removeChild($('lightbox'));
		body.removeChild($('overlay'));
	},
	recreate: function(){
		Lightbox.destroy();
		Lightbox.create();
	}
}
