// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

var activate = function(domId, activate) {
  if (domId) {
    $(domId).addClassName('current');
    var e = null;
    $(domId).siblings().each(function(node) {
      node.removeClassName('current');
    });
  }
  $('body').select(".callout.current").each(function(node) {
    node.hide(); 
    node.removeClassName('current');
    });
  $('body').select(".callout.inactive").each(function(node) {
    node.hide(); 
    });
  $(activate).addClassName('current');
  $(activate).appear();
}

document.observe("dom:loaded", function() {
  $$('#flash').each( function(el) {
    $('flash').show();
    var f = function () {
      el.fade();
    }
    f.delay(3);
  });
});


