// $Id: flip.js 1901 2008-02-06 15:18:50Z ctm $

function restore() {
  $('kansas').style.display = 'none';
  $('send').style.display = '';
  $('front').style.display = '';
  $('back').style.display = 'none';
  return false;
}

function swap_photo() {
  $('front').fade({duration: 2});
  new Effect.Parallel([
                       new Effect.Appear('back', {duration: 1.5, queue: 'end'}),
                       new Effect.SlideDown('kansas', { duration: 1.5 })],
                      { queue: 'end' });
}

function scroll_text(send) {
  setTimeout(function() {
               new Effect.SlideUp(send, { duration: 1.5,
                                      afterFinish: swap_photo });
             }, 1500);
}

function flip() {
  var send = $('send');
  send.pulsate({pulses : 1, duration : 1, afterFinish:scroll_text(send)});
  return false;
}
