+DEFAULT_TITLE = 'neuron catalog'
 Router.configure
   layoutTemplate: "MyLayout"
   notFoundTemplate: "PageNotFound"
+  onAfterAction: ->
+    document.title = DEFAULT_TITLE
 
 Router.setTemplateNameConverter (str) ->
   str

    always_include_name_in_path_action(this, BinaryData, "binary_data_show")
  data: ->
    BinaryData.findOne _id: @params._id

Router.route "/RecentChanges"


    always_include_name_in_path_action(this, Neuropils, "neuropil_show")
  data: ->
    Neuropils.findOne _id: @params._id
  onAfterAction: ->
    doc = Neuropils.findOne _id: @params._id
    if doc?
      document.title = doc.name + ' - neuron catalog'
    else
      document.title = DEFAULT_TITLE

Router.route "/binary_data"

