 
     @menu = {}
 
-    appManager = KD.singleton "appManager"
-
-    appManager.on 'AppIsBeingShown', @bound 'setActiveItem'
+    {mainView} = KD.singletons
+    mainView.on 'MainTabPaneShown', @bound 'setActiveItem'
 
 
   viewAppended: ->

module.exports = class TopNavigation extends KDCustomHTMLView

  menu = [
    { title : 'EDUCATION', href : '/Education', appName : 'Education'}
    { title : 'BUSINESS',  href : '/Business',  appName : 'Business'}
    { title : 'ABOUT',     href : '/About',     appName : 'About'}
    { title : 'PRICING',   href : '/Pricing',   appName : 'Pricing'}
    { title : 'SIGN IN',   href : '/Login',     appName : 'Login'}
  ]

  constructor: (options = {}, data) ->


  createItem: (options) ->

    options.cssClass = options.name.toLowerCase()

    @addSubView @menu[options.name] = new CustomLinkView options


  setActiveItem: (pane) ->

    @unsetActiveItems()

    {name} = pane

    @menu[name]?.setClass 'active'


  unsetActiveItems: ->
