s="token tag"><span class="token punctuation">&lt;</span>img</span><span class="token punctuation">&gt;</span></span> thumbnail element, retrieving thumbnail url
          item.msrc = linkEl.children[0].getAttribute('src');
        }

        item.el = figureEl; // save link to element for getThumbBoundsFn
        items.push(item);
      }

      return items;
    };

    // find nearest parent element
    var closest = function closest(el, fn) {
      return el &amp;&amp; (fn(el) ? el : closest(el.parentNo