         duration : 3000
     else
       callback?()
-  
+
   socketConnected:()->
     @backendIsConnected = yes
     @propagateEvent "KDBackendConnectedEvent"
-  
+
   setApplicationPartials:(partials)->
     @appPartials = partials
 

     zIndexContexts[uniqid] = 0
   else
     zIndexContexts[uniqid]++
  
  jsonhTest:->
    method    = 'fetchQuestionTeasers'
    testData  = {
      foo: 10
      bar: 11
    }
    
    start = Date.now()
    $.ajax "/#{method}.jsonh",
      data     : testData

    # warn "Instance being overwritten!!", anInstance if @instances[anInstance.id]
    @instances[anInstance.id] = anInstance
    @classes[anInstance.constructor.name] ?= anInstance.constructor

  unregisterInstance: (anInstanceId)->
    # warn "Instance being unregistered doesn't exist in registry!!", anInstance unless @instances[anInstance.id]
    delete @instances[anInstanceId]

  deleteInstance:(anInstanceId)->
    @unregisterInstance anInstanceId
    # anInstance = null #FIXME: Redundant? See unregisterInstance

  registerSingleton:(singletonName,object,override = no)->
    if (existingSingleton = KD.singletons[singletonName])?
      if override
