 	# defaultChild		Controller
 	#
 	
-	constructor: (options) ->
+	constructor: (options={}) ->
 		@sm = new StateMachine
-
-		@sm.addState Controller.STATE_DEACTIVATED, true
-		@sm.addState Controller.STATE_ACTIVATED
+		
+		defaultState = options.defaultState
+		
+		@sm.addState Controller.STATE_DEACTIVATED, defaultState == Controller.STATE_ACTIVATED ? false : true
+		@sm.addState Controller.STATE_ACTIVATED, defaultState == Controller.STATE_ACTIVATED ? true : false
 		
 		@sm.bind "on_transition", @transition
 		@children = []

	toState: (state)->
		@sm.activate(state)
	
	activate: ->
		ControllerHelper.activate(@)

	deactivate: ->
		ControllerHelper.deactivate(@)
	
	reset: ->
		@sm.reset()

			if descendant
				return descendant
				
	getActiveChild: ->
		for child in @children
			return child if child.isActive()
	
