     @iframe.on 'load', => @initializeFrame()
     @iframe.one 'load', => @bindEvents()
     @loadIframeSrc(null)
+
 
   initializeFrame: ->
     try

    else
      return url

  loadIframeSrc: (url)->
    # clear any existing events if we are loading a new iframe to replace the existing one
    @document.off() if @document

    @iframe.data('loaded', false)
    @iframe.get(0).contentWindow.document.location.href = @iframeSrc(url, true)

  hijackLinksAndForms: ->
    for element in jQuery('a, form', @document)


  toggleInterface: ->
    if @visible
      @visible = false
      @toolbar.hide()
      @statusbar.hide()
      Mercury.trigger('mode', {mode: 'preview'}) unless @previewing
      @previewing = true
    else
      @visible = true
      @toolbar.show()
      @statusbar.show()
      Mercury.trigger('mode', {mode: 'preview'})
      @previewing = false
    @resize()


