 ;;------------------------------------------------------------------------------
 
 (def snapshot-list (atom nil))
-(def current-index (atom nil))
+(def snapshot-index (atom nil)) ; can this be derived from current time, quickly?
+(def selected-time (atom nil))
 (def url-update-timout (atom nil)) ; This probably doesn't need to be atom, maybe be clojure feature that handles this
 
 ;;------------------------------------------------------------------------------

        [:td (build-decrement-btn "decrement-minute")]
        (build-nbsp-cell)
        [:td (build-decrement-btn "toggle-meridian")]]]]])

;;------------------------------------------------------------------------------
;; Events

      (js->clj)
      (clojure.walk/keywordize-keys)))))

(defn init-snapshot-index []
  (let [image (attr ($ "#currentSnapshot") "src")
        starting-index (first (keep-indexed #(if (= image (:image %2)) %1) @snapshot-list))]
    (swap! snapshot-index #(if (pos? starting-index)
                                starting-index
                                0))))

