],
        gallery,
        options,
        items;

      items = parseThumbnailElements(galleryElement);

      // define options (if needed)
      options = {

        // define gallery index (for URL)
        galleryUID: galleryElement.getAttribute('data-pswp-uid'),

        getThumbBoundsFn: function(index) {
          // See Options -&gt; getThumbBoundsFn section of documentation free for more info
          var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail
            