 				@emit(Events.TransitionEnd, from, to, direction)
 				@emit(direction, from, to)
 
-	_buildTransition: (template, layerA, layerB, background) ->
+	_buildTransition: (transitionFunction, layerA, layerB, background) ->
 
 		# Get the executed template data by passing in the layers for this transition
-		template = template(@, layerA, layerB, background)
+		template = transitionFunction(@, layerA, layerB, background)
 
 		# Buld a new transtition object with empty states
 		transition = {}

	##############################################################
	# Transitions

	push: (layer, animate, wrap, transitionFunction) ->

		throw new Error "NavComponent.push expects a layer" unless layer
		return if layer is @current

	# you can put them into a ScrollComponent yourself and then insert them.

	modalLeft: (layer, animate) ->
		@_transition(layer, animate, false, Transitions.modalLeft)

	modalRight: (layer, animate) ->
		@_transition(layer, animate, false, Transitions.modalRight)
	
	modalTop: (layer, animate) ->
		@_transition(layer, animate, false, Transitions.modalTop)

	modalBottom: (layer, animate) ->
		@_transition(layer, animate, false, Transitions.modalBottom)

	back: (animate=true) =>
		return unless @previous
