// Load the intro animation of the log and fade in the menu
// 2008-02-18

new Event.observe(window, 'load', function(){
    $('content').hide()
    $('logoFullName').hide()
    
    initLogo()
    // move logo up and turn to red
    setTimeout("morphLogo()", 2000)
    
    initMenus(3000)
    setTimeout("new Effect.Appear($('content'))", 4000)
})

function initLogo()
{
    Element.setStyle($('logo'), {top: '50%'})
    $('logoText').setStyle({color: '#000000'})
}

function morphLogo()
{
    $('logo').morph('top: 4%',{duration: 1})
    $('logoText').morph('color: #993E12;', {duration: 2})
    new Effect.Appear($('logoFullName'),{duration: 5})
}

function initMenus (delay) {
    if(!delay){delay = 1000}
    $('englishMenu').hide()
    // $('germanMenu').hide()
    setTimeout("showMenus()",delay)
}

function showMenus () {
    // Element.setStyle($('englishMenu'),{ right: '30%'})
    // Element.setStyle($('germanMenu'), { left: '30%'})

    new Effect.Appear('englishMenu',{duration: 0.7})    
    // $('englishMenu').morph('right: 0%')
    
    // new Effect.Appear('germanMenu',{duration: 0.7})    
    // $('germanMenu').morph('left: 0%')
    
    Element.setStyle($('germanMenu'), {float: 'left'})
}
