       "<!-- jQuery -->"
       [:script {:src "/js/jquery-3.1.0.min.js"}]
       [:script {:src "/js/jquery-startup.js"}]
+      [:script {:src "/js/bootstrap.min.js"}]
 
       "<!-- Bootstrap core CSS -->"
       [:link {:rel "stylesheet" :href "/css/bootstrap.min.css"}]
-      [:link {:rel "stylesheet" :href "/css/bootstrap-theme.min.css"}]
-      [:script  {:src "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"}]]
+      [:link {:rel "stylesheet" :href "/css/bootstrap-theme.min.css"}]]
      [:body
-      (primary-nav)
+      (primary-nav (:entity options))
       [:div.container {:style "margin-top: 2em;"}
        (html
          [:h1#page-title page-title]

                                   (s/join " " (glyph-button-css options)))
                            (dissoc :size :level))))

; TODO Wrap this up in a sharable library
(defn bootstrap-nav
  "Renders the site navigation using the structure for twitter bootstrap"
  [items]
  [:nav.navbar.navbar-default
   [:div.container
    [:div.navbar-header

           items)]
     [:div.navbar-right
      [:ul.nav.navbar-nav.navbar-right
       (if user
         (authenticated-user-nav user entity)
         (unauthenticated-nav))]]]]])

(def item-templates
  [{:url "/entities/:entity-id/accounts"     :caption "Accounts"}
   {:url "/entities/:entity-id/transactions" :caption "Transactions"}
   {:url "/entities/:entity-idcommodities"  :caption "Commodities"}])

(defn primary-nav
  "Renders the site primary navigation"
  [entity]
  (if-let [user (friend/current-authentication)]
    (if-let [entity (or entity (first (entities/select (env :db) (:id user))))]
      (let [items (->> item-templates
                       (map (fn [item]
                              (update-in item
                                         [:url]
                                         #(string/replace % ":entity-id" (str (:id entity)))))))]
        (bootstrap-nav items user entity))
      (bootstrap-nav [] user nil))
    (bootstrap-nav [] nil nil)))

(defn render-alerts
  "Renders notifications as HTML"
