function show_image(imagesrc) {
	//image = new Element('img',{ src:imagesrc, alt:'image' });
	
	var wrapper = new Element('div', { id:'show_image' });//.insert(image);
	
	wrapper.setStyle({
		position:'fixed',
		textAlign:'center',
		backgroundColor:'#000000',
		backgroundPosition: 'center',
		backgroundImage: 'url('+imagesrc+')',
		backgroundRepeat: 'no-repeat',
		top: 0,
		left: 0,
		right: 0,
		height: document.viewport.getHeight()+'px'
	});

	$('page-wrapper').insert(wrapper);

	wrapper.observe('click',wrapper.hide);

}

document.observe('contentloaded', function(event) {

	// let 'new-window' links open in a new window, the onubtrusive way.
	$$('a.new-window').invoke('observe','click', function(event) {
		event.stop();
		// we cannot use 'this' because when an a tag wraps an image the image
		// element is returned. That's why we search for the first a tag bubbeling
		// up from the event element.
		window.open(event.findElement('a').href);
	});

	$$('a.screenshot').invoke('observe','click', function(event) {
		event.stop();
		show_image(this.href);
	});

	// a fix for IE6, the menu tends to 'dissapear'. The only thing IE needs is for
	// JS to 'touch' it. This is done by 'resetting' the position value.
	$('menu').setStyle({'position':'absolute'});

});

