/* photos.js */

var current_album_page = null;
var current_photo = null;
var current_thumb = null;

function toggleAlbumPage(page)
{
  var oPage = null;
  if(current_album_page == page)
    return;
  if(current_album_page)
  {
    oPage = $(current_album_page);
    new Effect.BlindUp(oPage);
  }
  oPage = $(page);
  new Effect.BlindDown(oPage);
  current_album_page = page;
}

function togglePhoto(photo)
{
  var ophoto = null;
  if(current_photo == photo)
    return;
  if(current_photo)
  {
    oPhoto = $(current_photo);
    if(oPhoto)
      new Effect.Fade(oPhoto);
  }
  oPhoto = $(photo);
  if(oPhoto)
  {
    new Effect.Appear(oPhoto, {delay: 1});
    current_photo = photo;
  }
}