 
       # user menu
       "a#profile": [ "profile" ]
-    }
 
-    events: {
+    events:
       "click a#logout": (e) ->
         v = @
         $.ajax("/users/sign_out", {

      "click a#stop_impersonating": (e) ->
        @impersonate()

    }

    app_events: {
      "state:activate": (state) ->
        if state.tab? and state.tab != @current_tab
          $("ul.nav li.tab").removeClass("active")
          if @current_tab = state.tab
            $("ul.nav li.tab.#{@current_tab}").addClass("active")

    }

    impersonate: (user_id) ->
      return if !@true_user.can("impersonate_users")

    reuse: true
    template: "main/nav_bar"

    links:
      "a.brand": [ "inventory" ]
      ".tab.inventory a": [ "inventory" ]
      ".tab.monitoring a": [ "monitoring" ]
