       popupContent = content or triggerData.hint
       # If referenced content element is defined, use it's content
       if triggerOptions.referencedContent and not content
-        popupContent = $(triggerOptions.referencedContent).html() or popupContent
+        popupContent = $(triggerOptions.referencedContent).clone(true, true) or popupContent
 
       popupPosition = if @_isElementFixed trigger then 'fixed' else 'absolute'
 

          #{prevButton}
          #{nextButton}
          #{closeButton}
        </div>"

      sip._killTimers triggerData.popupInstance
      triggerData.popupInstance.data 'triggerHovered', true

      # Scroll to trigger if it isn't visible
      sip._showWhenVisible trigger, content

    _getTourOverlay: (options) ->
      overlay = $ '#smallipop-tour-overlay'

      closeButton = if index is currentTourItems.length - 1 then "<a href=\"#\" class=\"smallipop-tour-close\">#{sip.labels.close}</a>" else ''
      closeIcon = "<a href=\"#\" class=\"smallipop-tour-close-icon\">&Chi;</a>"

      $content = $($.trim "
        <div class=\"smallipop-tour-content\"></div>
        #{closeIcon}
        <div class=\"smallipop-tour-footer\">
          <div class=\"smallipop-tour-progress\">
