 
 #backBtn.addEventListener 'touchstart', ->
 #  flight.slideTransition('#panel-1','#panel-2','0.4s',true)
-$('.back').click (e) =>
-    flight.goToPage('#panel-1')
+$('.back').on 'click', =>
+    flight.goToPage('#panel-2',{back:true})
 
-$('.forward').click (e) =>
-  flight.goToPage('#panel-2',{back:true})
+$('.forward').on 'click', =>
+  flight.goToPage('#panel-2')
 
 
 #if 'ontouchstart' in window


  goToPage: (targetPanel,options) ->

    if options.back
      @back = options.back

    @targetPanel = document.querySelector(targetPanel)
    transtionType = @currentPanel.getAttribute("data-transition")


      @targetPanel.style.webkitTransition = "#{@speed} ease"
      @targetPanel.style.webkitTransform = "translateX(100%)"
      @currentPanel.addEventListener("webkitTransitionEnd", =>
        @finishTransition()
      , false);
