var divs_to_fade;

window.onload = function () {
  divs_to_fade = $$('div.fade');
  divs_to_fade.each(function(item) {
    //item.hide();
    $(item).setStyle({
      position: 'absolute',
      top: '0',
      left: '0',
      display: 'none',
      margin: '0 0 30px' 
    });
  });
  
  swapFade('OC_Marriage');
}

// this array consists of the id attributes of the divs we wish to alternate between


// the function that performs the fade
function swapFade(div_id) {
        divs_to_fade.each(function(item) {
            if (item.identify() == div_id)
            Effect.Appear(div_id, { duration:0.5, from:0.0, to:1.0 });
            else
            Effect.Fade(item, { duration:0.1, from:1.0, to:0.0 });
          });
}
