   (wcar* (car/hvals @db)))
 
 (defn- index [params]
-  ;; (swap! db ((if (:lang params) (:lang params) "fr") language-db))
   (h/html5
    [:head
-    (h/include-css "http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css")
+    (h/include-css "/css/mapbox.css")
     "<!--[if lt IE 8]>"
-    (h/include-css "http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css")
+    (h/include-css "/css/mapbox.ie.css")
     "<![endif]-->"
     (h/include-css "/css/generic.css")]
    [:body
-    (h/include-css "http://www.mapbox.com/mapbox.js/assets/MarkerCluster.css")
-    (h/include-css "http://www.mapbox.com/mapbox.js/assets/MarkerCluster.Default.css")
+    (h/include-css "/css/MarkerCluster.css")
+    (h/include-css "/css/MarkerCluster.Default.css")
     (h/include-js "/js/ArrayLikeIsArray.js")
-    (h/include-js "http://api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js")
+    (h/include-js "/js/mapbox.js")
     "<!--[if lt IE 8]>"
-    (h/include-css "http://www.mapbox.com/mapbox.js/assets/MarkerCluster.Default.ie.css")
+    (h/include-css "/css/MarkerCluster.Default.ie.css")
     "<![endif]-->"
-    (h/include-js "http://www.mapbox.com/mapbox.js/assets/leaflet.markercluster.js")
+    (h/include-js "/js/leaflet.markercluster.js")
     "<div id=\"map\"></div>"
     (h/include-js "/js/main.js")]))
 

    (doseq [m (:monuments res)]
      (when (and (not (nil? (:lat m)))
                 (not (nil? (:lon m)))
                 (not (= "" (:name m))))
        (let [;; reg (:registrant_url m)
              ;; id (:id m)
              nam (cleanup-name (:name m))
              ;; imc (:image m)
              ;; img (codec/url-encode m)
              ;; lng (:lang m)
              ;; emb (str "<img src=\"https://commons.wikimedia.org/w/index.php?title=Special%3AFilePath&file=" img "&width=250\" />")
              ;; ilk (if (not (= imc ""))
              ;;       (str "<a href=\"http://commons.wikimedia.org/wiki/File:"
              ;;            img "\">" emb "</a>") "")
              art (:monument_article m)
              lnk "<a href=\"http://%s.wikipedia.org/wiki/%s\">%s</a>"
              ;; arl (format "<a href=\"http://%s.wikipedia.org/wiki/%s\">%s</a>" lng art art)
              ;; src (format "Source: <a target=\"_blank\" href=\"%s\">%s</a>" reg id)
              ]
          (wcar* (car/hset rset    ; key
                           (:id m) ; field
                           (list (list (:lat m) (:lon m))
                                 (str "<h3>" nam "</h3>"
                                      (if (not (= "" art)) "ok" "notok")
                                      lnk
                                      ;; ilk "<br/>" (if art (str arl "<br/>") "")
                                      ;; src
                                      )))))))
    (let [card (count (wcar* (car/hvals rset)))]
      (wcar* (car/hmset (str "s" rset)
                        "size" card

(defroutes app-routes 
  (GET "/" {params :params} (index params))
  (POST "/" {params :params} (index params))
  (GET "/backend" req (if-let [identity (friend/identity req)] (backend) "Doh!"))
  (POST "/process" {params :params} (process params))
  (GET "/login" [] (login-form))
  (GET "/logout" req (friend/logout* (resp/redirect (str (:context req) "/"))))
