     @currentPanel.style.display = "block"
 
     if @back is true
-
       # must perform this initial tranform to get animation working in the next step
       @targetPanel.style.webkitTransition = "0ms"
       @targetPanel.style.webkitTransform = "translateX(0%)"

    window.flight = new Flight();

    $('.back').on 'click', =>
        flight.goToPage('#panel-2',{back:true})

    $('.forward').on 'click', =>
      flight.goToPage('#panel-2');


  goToPage: (targetPanel,options) ->

    @targetPanel = targetPanel

    if @pageHistory.length > 1 and @pageHistory[@pageHistory.length - 2] == @targetPanel
      @pageHistory.pop()
      @back = true
    else
      @pageHistory.push(@targetPanel)

    if options?
      if options.back
        @back = options.back
