 
   @wrap_content = ->
     items = $('#notes_wrap h1')
+    items = [].slice.call( document.querySelectorAll('#notes_wrap h1') )
     for i in items
       do (i) ->
         div = document.createElement 'div'

      list: []

  database = window.database = {}

  Rusnet.init_view()
  Rusnet.add_target_link()

    return

  @research_engine = ->
    # # Method - rowsing
    # @param length_row
    # @param type_order
    # @param name
    #
    # Example if we input "markdown" and type_order will be 3 then length_row must be 6. Then we will get:
    # - database["3"]["markdown"]['list'].push "mar"
    # - database["3"]["markdown"]['list'].push "ark"
    # - database["3"]["markdown"]['list'].push "rkd"
    # - database["3"]["markdown"]['list'].push "kdo"
    # - ...
    #
    rowsing = (length_row, type_order, name) ->
      array = name.split("")

      [0...length_row].forEach (index) ->
        index_1 = 0 + index
        index_2 = type_order + index
        row = array.slice(index_1, index_2).join("")
        database[type_order + ""][name]['list'].push row
        database[type_order + "g"].push row
        return
      return

    # # Method - scan
    # @param name
    # @param el
    #
    # Example if we input "markdown" then we will get
    # - database["1"]["markdown"]
    # - database["2"]["markdown"]
    # - database["3"]["markdown"]
    # - ...
    # - database["8"]["markdown"]
    #
    scan = (name, el) ->
      length = name.length
      [1..length].forEach (type_order) ->
        length_row = length - (type_order - 1)

        database[type_order + ""]  = database[type_order + ""] or {}
        database[type_order + "g"] = database[type_order + "g"] or []

        database[type_order + ""][name]         = database[type_order + ""][name]         or {}
        database[type_order + ""][name]['list'] = database[type_order + ""][name]['list'] or []
        database[type_order + ""][name]['el']   = database[type_order + ""][name]['el']   or el

        if database['elements'].indexOf(el) < 0 then database['elements'].push el

        rowsing length_row, type_order, name
        return
      return

    # Find all **H1** tags. Get **text** and **html**. Send **text** and **html** to method **scan**.
    #
    headers_h1 = [].slice.call( document.querySelectorAll('#notes_wrap h1.custom-h1-block') )
    headers_h1.forEach (head) ->
      text = head.textContent.trim().toLowerCase()
      scan text, head
      return
    return

