// Create the night-time image elements
Event.observe( window, 'load', function() {
     fader();
     // the time here should be a little more than the length of the whole cycle
     // 6 sec. wait + 2.5 sec. effect + 6 sec. wait + 2.5 sec. effect = 17 sec,
     // so I made the time 18. Changes to waits or effect durations in fader()
     // should be accounted for here.
     new PeriodicalExecuter( fader, 18 );
     $('footer').makePositioned();
     }
);

function fader() {
     // pause for 6 seconds then fade night in and day out
     window.setTimeout( "new Effect.Fade( $('day'), {duration:2.5} );new Effect.Appear( $('night'), {duration:2} );", 6000 );
     
     //pause for 14.5 seconds (6 + 2.5 + 6), or (wait + effect + wait) then fade day in and night out
     window.setTimeout( "new Effect.Appear( $('day'), {duration:2.5} );new Effect.Fade( $('night'), {duration:2} );", 14500 );
}

