PHOTOSET_ID = 1603279; // Ou 1583292...

function initPage() {
    Event.observe('displayer1', 'click', handleThumbClick);
    Event.observe('displayer2', 'click', handleThumbClick);
    Event.observe('photo-closer', 'click', closePhoto);
    new Draggable('photo', {});
} // initPage

function closePhoto(e) {
    Event.stop(e);
    $('photo').hide();
} // closePhoto

IMAGES = {
	'1': 'http://static.flickr.com/34/73723411_a4a9f2246e.jpg',
	'2': 'http://static.flickr.com/35/73723841_1fde5f4ce5.jpg'
};

function handleThumbClick(e) {
    $('photo').hide();
    Event.stop(e);
    var elt = Event.element(e);
	$('photoImg').src = IMAGES[elt.id.match(/\d+/)[0]];
	// The delayed re-show makes sure it's hidden first, which forces browsers
	// to re-adjust dimensions based on the new image's size.
	var tmr = setTimeout(function() {
		clearTimeout(tmr);
		$('photo').show();
	}, 10);
} // handleThumbClick

Event.observe(window, 'load', initPage);
