var opened = null;
function showDetails(divNumberId) {
	var divId = 'details_' + divNumberId;
	var parent = 'picture-holder-' + divNumberId;
	
	if (opened == null) {
		opened = divNumberId;
		new Effect.Opacity(parent, {from: 0.65, to: 0.99, duration: 0.5});
		$(divId).show();
		new Effect.Opacity(divId, {from: 0.0, to: 0.85, duration: 0.5});
	}
	else if(opened != divNumberId) {
		hideDetails(opened);
		opened = divNumberId;
		new Effect.Opacity(parent, {from: 0.65, to: 0.99, duration: 0.5});
		$(divId).show();
		new Effect.Opacity(divId, {from: 0.0, to: 0.85, duration: 0.5});
	}
	return false;
}

function hideDetails(divNumberId) {
	var divId = 'details_' + divNumberId;
	var parent = 'picture-holder-' + divNumberId;
	new Effect.Opacity(parent, { from: 0.99, to: 0.65, duration: 0.5 });
	new Effect.Opacity(divId, { from: 0.85, to: 0.0, duration: 0.5 });
	$(divId).hide();
	return false;
}