       targetDiv.style.webkitTransition = "#{speed}"
       targetDiv.style.webkitTransform = "translateX(100%)"
 
-      currDiv.addEventListener("webkitTransitionEnd", =>
-        currDiv.style.display = "none"
+      @currentPanel.addEventListener("webkitTransitionEnd", =>
+        @currentPanel.style.display = "none"
         @isTransitioning = false
       , false);
     , 5
-
-
 
 root           = this
 previousFlight = root.Flight

  transitionAnimation: true
  fadeAnimation: true
  currentPanel: ''

  constructor: (options) ->
    # set options

      targetDiv.style.webkitTransform = "translateX(0%)"

      # use window timeout to delay transition or will not work on android device
      window.setTimeout =>
        @currentPanel.style.webkitTransition = "#{speed}"
        @currentPanel.style.webkitTransform = "translateX(100%)"
        targetDiv.className += " visible"
      , 10

