       # Form needs to be a part of document in to be able to submit.
       $(document.body).append form
       form.submit()
+
+    #
+    # Begin gameover countdown timer
+    #
+    # When the user has lost all their lives beginCountdown(t) will populate the
+    # `GAME OVER ... {1:d}` with an integer counting down from t. At the end of
+    # the countdown the function will trigger the `submit` action if the button
+    # has not already been pressed.
+    #
+    # @param  {int} t Starting countdown value
+    # @return {undefined}
+    #
+    beginCountdown: (t) ->
+      $('.counter').text t
+      if t==0
+        @submit()
+      else
+        _.delay @beginCountdown, 1000, t-1

      $('#wave-players').removeClass().addClass('dim-100-20')
      $('#check-preloader').removeClass().addClass('light-0-100')

      _.delay( (waveID) ->
        # Check if visible data contains the signal
        if $('#'+waveID).data('signal') is 1
          # Show continue

visibleWave = () ->
  waveID  = visibleWaveID()
  GLOBAL_WAVES[waveID]['wave']

#
# Carousel
