var Intro = Class.create({
    initialize: function(){
        this.timeOut = 2000;
        $("bloemen").hide();
        this.tempWrapper = $("flyOver");
        this.tempImages = $$("#flyOver img");
        this.hideTempImages();
        window.setTimeout(function(){
            new Effect.Appear($("bloemen"), {
                duration: 2
            });
        }, this.timeOut)
        this.showTempImages();
    },
    
    hideTempImages: function(){
        this.tempImages.each(function(img){
            img.hide();
        }
.bind(this))
    },
    
    showTempImages: function(){
        window.setTimeout(function(){
            this.tease(this.tempWrapper.down(0), 1000)
        }
.bind(this), 200)
        window.setTimeout(function(){
            this.tease(this.tempWrapper.down(1), 800)
        }
.bind(this), 400)
        window.setTimeout(function(){
            this.tease(this.tempWrapper.down(2), 600)
        }
.bind(this), 600)
    },
    
    tease: function(img, timeOut){
        new Effect.Appear(img, {
            duration: 0.5
        });
        window.setTimeout(function(){
            new Effect.Fade(img, {
                duration: 0.5
            });
        }, timeOut)
    }
});

document.observe('dom:loaded', function(){
    new Intro();
});
