var current_index = 0;
function flashTweets() {
  var tweets = $$('div.tweet');
  Effect.Fade(tweets[current_index], { duration: 0.45});
  current_index += 1;
  if (current_index == tweets.length) {
    current_index = 0;
  }
  setTimeout('showNewTweet()', 500);
}
function showNewTweet() {
  var tweets = $$('div.tweet');
  Effect.Appear(tweets[current_index]);
  setTimeout('flashTweets()', 5000);
}
Event.observe(window, 'load', function() {
  flashTweets();
});
