 
   constructor: (opts) ->
    super opts
+   messages = new LightBox
 
   routes:
     "": "start"

        if not @hasEditUrl()
          window.location.hash = "#edit/#{ @model.get("id") }"

      error: (e) =>
        console.log "failed to save", @model, e

  hasEditUrl: -> !!window.location.hash


  hello: ->
    alert "hello"

class LightBox extends Backbone.View

  error: (msg) ->
    alert "ERROR: #{ msg }"

  warning: (msg) ->
    alert "WARNING: #{ msg }"

  info: (msg) ->
    alert "INFO: #{ msg }"

  hide: ->

class Editor extends Backbone.View
  el: ".edit_view"
