var ArtistSwapActive = false;
var visibleArtist = "minusbaby";

function showArtist(artistName) {
  if (!ArtistSwapActive && (visibleArtist != artistName)) {  // we're not in the middle of an animation
    ArtistSwapActive = true;
    if ($$('.selected').length > 0) { // deselect current item
      $$('.selected')[0].removeClassName('selected');
    }

    $(artistName + 'link').addClassName('selected');
    $(visibleArtist + 'bio').blindUp({duration: .5});

    setTimeout('updateArtist("' + artistName + '")', 500);
  }

  return false;
}

function updateArtist(artistName) {
  // show the artist
  visibleArtist = artistName;
  $(visibleArtist + 'bio').blindDown({duration: .5});
  setTimeout('ArtistSwapActive = false', 1000);
}

function prepare() {
  $('sixninefivefivebio').hide();
  $('eightgbbio').hide();
  $('thearebio').hide();
  $('rhinostrichbio').hide();
  $('saskrotchbio').hide();
  $('asifsiddikybio').hide();
  $('sylcmykbio').hide();
  $(visibleArtist + 'link').addClassName('selected');
}

document.observe('dom:loaded', prepare);

