 window.TukTuk.Modal = do (tk = TukTuk) ->
 
-  lock = undefined
+  lock  = undefined
   modal = undefined
 
   ###

    lock = tk.dom("[data-tuktuk=lock]").first()
  )()

  show: show
  hide: hide
  loading: loading

    tk.dom("[data-tuktuk-modal]").on "click", ->
      TukTuk.Modal.show(tk.dom(this).attr('data-tuktuk-modal'))

    loading = """
      <div data-tuktuk="lock" data-loading="false">
        <div class="loading"></div>
      </div>
      """
    alert_template = """
      <div data-tuktuk="modal" data-modal="alert" class="column_5">
        <header class="bck alert">
          <h4 class="text thin inline">Alert</h4>            
        </header>
        <article id="text" class="text big"></article>
        <footer>
          <button data-modal="close" class="button large theme on-right margin-bottom">Accept</button>            
        </footer>
      </div>
      """
    prompt_template = """
      """
    confirm_template = """
      """

    tk.dom(document.body).append """
      #{alert_template}
      #{prompt_template}
      #{confirm_template}
      #{loading}
      """

    tk.dom("[data-tuktuk=lock]").on "click", (event) ->
      loading = lock.attr("data-loading")
      TukTuk.Modal.hide() unless event.target is modal or loading is "true"
