     @_visible = false
 
 
-
-class IconButton extends Button
+class IconButton
+
+  constructor: ->
+    @frame = new FactlinkJailRoot.ControlIframe()
+    @frame.setContent($.parseHTML(@content.trim())[0])
+    @$el = $(@frame.frameBody.firstChild)
 
   destroy: =>
     @frame.destroy()

    clearInterval @_interval
    @$boundingBox?.remove()


class FactlinkJailRoot.ShowButton extends IconButton
  content: '<div class="fl-icon-button"><span class="icon-comment"></span></div>'

  """

  constructor: ->
    @frame = new FactlinkJailRoot.ControlIframe()
    @frame.setContent($.parseHTML(@content.trim())[0])
    @$el = $(@frame.frameBody.firstChild)

    @_robustHover = new FactlinkJailRoot.RobustHover @$el,
      mouseenter: => @frame.addClass 'hovered'
      mouseleave: => @frame.removeClass 'hovered'

    @$el.on 'mousedown', (event) -> event.preventDefault() # To prevent de-selecting text
    @$el.on 'click', @_onClick
