 	# Basic setup
 	
 	Backbone.JJStore = {}
+	Backbone.JJStore._modelScopes = [exports];
 	Backbone.JJStore.Models = {}
 	Backbone.JJStore.Events = _.extend {}, Backbone.Events
 



	###*
	 * Find a type on the global object by name. Splits name on dots.
	 * (i.e. 'Store.Models.MyModel' will return exports['Store']['Models']['MyModel'])
	 * @param  {String} name                           Name to look for
	 * @return {mixed}                                 Global var
	###
	Backbone.JJRelational.__getObjectByName = (name) ->
		type = _.reduce name.split('.'), (memo, val) ->
			memo[val]
		, exports

		if type isnt exports then return type else return null

	###*
	 * Registers one or many collection-types, in order to build a correct collection instance for many-relations.

			return store.get id
		null

	###*
	 * Adds a scope for `getObjectByName` to look for model types by name.
	 * @param {Object} scope
	###
	Backbone.JJStore.addModelScope = (scope) ->
		@._modelScopes.push scope
  
	###*
	 * Removes a model scope
	 * @param {Object} scope
	###
	Backbone.JJStore.removeModelScope = (scope) ->
		@._modelScopes = _.without @._modelScopes, scope
  

	# !-
	# ! Backbone JJRelationalModel
