define(["sceneManager", "util", "musicManager", "sceneHatTree", "sceneHatHurricane", "sceneHatSnake", "sceneIntro", "textPlaneRotateScene", "textPlaneWaveScene", "sceneNippleGreeting", "sceneCredits"],
function(sceneManager, Util, musicManager, sceneHatTree, sceneHatHurricane, sceneHatSnake, sceneIntro, textPlaneRotateScene, textPlaneWaveScene, sceneNippleGreeting, sceneCredits)  {

    var Timeline = {
        init: function() {
            sceneHatTree.init();
            sceneHatHurricane.init();
            sceneIntro.init();
            textPlaneWaveScene.init();
            textPlaneRotateScene.init();
            sceneNippleGreeting.init();
            sceneCredits.init();

            musicManager.cue({
                bars: 8,
                callback: function() { sceneManager.setScene(sceneHatHurricane); }
            });

            musicManager.cue({
                bars: 16,
                callback: function() { sceneManager.setScene(textPlaneWaveScene); }
            });

            musicManager.cue({
                bars: 24,
                callback: function() { sceneManager.setScene(sceneHatTree); }
            });            

            musicManager.cue({
                bars: 32,
                callback: function() { sceneHatHurricane.motherfuckerState = true; sceneManager.setScene(sceneHatHurricane); }
            });

            musicManager.cue({
                bars: 36,
                callback: function() { sceneManager.setScene(textPlaneWaveScene); }
            });

            musicManager.cue({
                bars: 38,
                callback: function() { sceneHatTree.fastMode = true; sceneManager.setScene(sceneHatTree); }
            });

            musicManager.cue({
                bars: 40,
                callback: function() { sceneManager.setScene(textPlaneRotateScene); }
            });

            musicManager.cue({
                bars: 42,
                callback: function() { sceneHatTree.fastMode = true; sceneManager.setScene(sceneHatTree); }
            }); 

            musicManager.cue({
                bars: 44,
                callback: function() { sceneManager.setScene(sceneHatHurricane); }
            });

            musicManager.cue({
                bars: 48,
                callback: function() { sceneManager.setScene(sceneNippleGreeting); }
            });

            musicManager.cue({
                bars: 52,
                callback: function() { sceneManager.setScene(sceneCredits); }
            });
        }
    };

    return Timeline;

});