var Photos = {
  previous: null,
  initialize: function() {
    this.display  = $('photo-display');
    this.selector = $('photo-selector');
    this.title    = $('photo-title');
    this.entries  = this.selector.getElementsByTagName('img');
    this.img      = this.display.getElementsByTagName('img')[0];
    this.show(this.entries[0]);
  },
  show: function(element) {
    this.img.src = element.src.replace(/_s.jpg/, '.jpg');
    Effect.Appear(this.img);
    this.img.setAttribute('alt', element.getAttribute('title'));
    this.title.innerHTML = element.getAttribute('title');
    Effect.Shrink(element);
    if (this.previous)
      Effect.Grow(this.previous);
    this.previous = element;
  }
}
