       .text ''
     next()
 
-  $spinner = $ '#spinner'
+  spinner = new Spinner lines: 9, radius: 7, length: 7
   spinnerTimeout = null
   spinnerThresholdMs = 100
   showSpinner = ->
     unless spinnerTimeout?
+      target = ($ '#spinner').get 0
       spinnerTimeout =
-        setTimeout (-> $spinner.css 'visibility', 'visible'), spinnerThresholdMs
+        setTimeout (-> spinner.spin target), spinnerThresholdMs
   hideSpinner = ->
     clearTimeout spinnerTimeout if spinnerTimeout?
-    $spinner.css 'visibility', 'hidden'
+    spinner.stop()
     spinnerTimeout = null
-  hideSpinner()
-  new Spinner(lines: 9, radius: 7, length: 7).spin $spinner.get(0)
 
   setup()
 

      $ ".#{playableClassName}"
        .addClass 'human-playable-tile'
        .on 'click', ->
          tile = ($ this)
          tile.text (decode game.nextPlayer).toLowerCase()
          game = game.play parseId tile.get(0).id
          next()

  setup = ->

      .modal 'show'
    yes

  playerText = -> (decode game.nextPlayer).toLowerCase()

  computerPlayer = (depth = 3) ->
    worker = new Worker 'scripts/minimax-worker.min.js'
    worker.postMessage command: 'setup', depth: depth
