                       (.toggleClass $timetable cssClass)))))
 
         (one $document "scriptsLoaded.exhibit"
-             (fn []
-               (aset js/window "Exhibit3_Loaded" true)))
+             #(set! EXHIBIT3-LOADED? true))
 
         ; Code for tabs
         (hide ($ :#module-finder))


(defn- initialize-exhibit3 [MODULES AUXMODULES]
  "Initialize Exhibit3 database and UI for Module Finder page"
  (if (and (not (aget js/window "Exhibit3_Initialized"))
           (aget js/window "Exhibit3_Loaded")
           MODULE-FINDER-SCRIPTS-DLED?
           (= (aget js/window "ActiveTab") MODULEFINDER-TAB-INDEX))
    (let [$timetable-builder-tab-link ($ :#timetable-builder-tab-link)]
      (aset js/window "Exhibit3_Initialized" true)
      ; Unbind the click event handler for `Timetable Builder` tab link so
      ; the user cannot switch tabs when we are initializing Exhibit3 here and
      ; screw things up

        (.on js/Pace "done" (fn []
                              (fade-out ($ ".overlay"))))

        (aset js/window "ActiveTab" TIMETABLE-TAB-INDEX)
        (aset js/window "ModulesMap" (build-timetable-module-map MODULES))

