   # Returns nothing.
   slideOutMenu: ->
     if @menuOpen
-      window.setTimeout =>
+      setTimeout =>
         @translate @mainMenu, "X", "-110%", "0.3s"
       , 10
 
-      window.setTimeout =>
+      setTimeout =>
         @mainMenu.style.display = "none"
       , 300
 

    @currentPage = @targetPage
    @isTransitioning = false

    window.setTimeout =>
      if @transitionAnimation
        switch transitionType
          when "slide"

    if @back
      @translate targetPage, "X", "-" + screenWidth, "0ms"

      setTimeout =>
        @translate currentPage, "X", "100%"
      , 0
    else
      @translate targetPage,"X", screenWidth, "0ms"

      setTimeout =>
        @translate currentPage, "X", "-100%"
      , 0

    setTimeout =>
      @translate targetPage, "X", "0%"
      @back = false
    , 0
