class @Mercury.Statusbar
constructor: (@options = {}) ->
@build()
@bindEvents()
build: ->
@element = $('
', {class: 'mercury-statusbar'}).appendTo($(@options.appendTo).get(0) ? 'body')
bindEvents: ->
Mercury.bind 'region:update', (event, options) =>
@setPath(options.region.path()) if options.region && $.type(options.region.path) == 'function'
height: ->
@element.outerHeight()
setPath: (elements) ->
path = []
path.push("
#{element.tagName.toLowerCase()}") for element in elements
@element.html("
Path: #{path.reverse().join(' » ')}")