   content: '<div class="fl-icon-button"><span class="icon-comment"></span></div>'
 
   constructor: (highlightElements, factId) ->
-    super
+    @frame = new FactlinkJailRoot.ControlIframe()
+    @frame.setContent($.parseHTML(@content.trim())[0])
+    $el = $(@frame.frameBody.firstChild)
 
     @$highlightElements = $(highlightElements)
     @_factId = factId
 
-    @_bindCallbacks
+    @_robustHover = new FactlinkJailRoot.RobustHover $el,
       mouseenter: @_onHover
       mouseleave: @_onUnhover
-      click:      @_onClick
+    $el.on 'click', @_onClick
+
     @$highlightElements.on 'mouseenter', @_onHover
     @$highlightElements.on 'mouseleave', @_onUnhover
     @$highlightElements.on 'click', @_onClick

class ParagraphButton extends IconButton
  content: '<div class="fl-icon-button"><span class="icon-comment"></span>+</div>'

  constructor: (options) ->
    super

    @_bindCallbacks
      mouseenter: => @frame.addClass 'hovered'
      mouseleave: => @frame.removeClass 'hovered'
      click: => @_onClick()

    @$paragraph = $(options.el)

    @frame.fadeIn()
    @_updatePositionRegularly()


  destroy: ->
    super
    @_robustHover.destroy()
    @$highlightElements.off 'mouseenter', @_onHover
    @$highlightElements.off 'mouseleave', @_onUnhover
    @$highlightElements.off 'click', @_onClick
    @frame.destroy()

  _onHover: =>
    @frame.addClass 'hovered'
