document.observe('dom:loaded', function()
{
	var large = $('large-image').down('img');
	var thumbs = $$('#thumbnail-images a');

	if ( large && thumbs )
	{
		for ( var t = 0; thumbs[t]; t++ )
		{
			var img = thumbs[t].down('img');
			if ( img )
			{
				thumbs[t].observe('click', function(e)
				{
					var img = e.findElement('a').down('img');
					large.src = img.src
					Event.stop(e);
					return false;
				});
			}
		}
	}
});

