     screenHeight = window.innerHeight + 'px'
 
     if @back
-      window.setTimeout =>
+      setTimeout =>
         @translate(currentPage, "Y", screenHeight)
       , 0
     else
       @translate(targetPage, "Y", screenHeight,"0ms")
-      window.setTimeout =>
+      setTimeout =>
         @translate(targetPage, "Y", "0%")
       , 0
 

    @currentPage = @targetPage
    @isTransitioning = false

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

    else
      @translate @mainMenu, "X", "-110%", "0ms"

      setTimeout =>
        @translate @mainMenu, "X", "0%", "0.3s"
      , 10

