     [client.pages.spectate :as spectate-page]
     [client.util :as util]))
 
+(def function? js/goog.isFunction)
+
 ;;------------------------------------------------------------------------------
 ;; Routes
 ;;------------------------------------------------------------------------------

  "/play2" [play-page/init-battle2! play-page/cleanup!]

  ;; redirects - where is my HTTP 301? :)
  "/dashboard" [#(aset js/document "location" "hash" "/spectate")]
  })

(def previous-page-cleanup-fn (atom nil))


(def routes {
  ;; initial page + login
  "/menu"  menu-page/init!
  "/login" login-page/init!

  ;; solo play screen
  "/play-solo" [play-page/init-solo! play-page/cleanup!]
