     if @back
       @translate targetPage, "X", "-" + screenWidth, "0ms"
 
-      window.setTimeout =>
+      setTimeout =>
         @translate currentPage, "X", "100%"
       , 0
     else
       @translate targetPage,"X", screenWidth, "0ms"
 
-      window.setTimeout =>
+      setTimeout =>
         @translate currentPage, "X", "-100%"
       , 0
 
-    window.setTimeout =>
+    setTimeout =>
       @translate targetPage, "X", "0%"
       @back = false
     , 0

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

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


    @currentPage = @targetPage
    @isTransitioning = false

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