var firstSlideStarted = false;

document.observe("dom:loaded", function() {

  enableButtons();

  window.setTimeout(function() {
    if(!firstSlideStarted)
    {
      new Effect.Move($('pages'), { x: -2000, mode: 'relative', beforeStart: disableButtons, afterFinish: enableButtons });
    }
  }, 1800);
  
});

function disableButtons()
{
  $$('a.proceed:not(.exit)').each(function(el) { $(el).observe('click', function(event) { event.stop(); }); });
}

function enableButtons()
{
  $$('a.proceed:not(.exit)').each(function(el)
  {
    $(el).observe('click', function(event) {
      
      firstSlideStarted = true;
      nextElement = Event.findElement(event, 'a').up().up().next();
      new Effect.Move($('pages'), { x: -2000, mode: 'relative' });
            
      event.stop();
    });
  });
}
