docs: function(origin, content, opts) {
          options = opts;
  
          var isSmallViewport = window.innerWidth < 760;
  
          // Make sure modal is closed (if one exists)
          if (open) {
              _closeModal();
          }
  
          // Create new modal
          var title = (options && options.title) ? options.title : '';
          var className = (options && options.className) ? options.className : '';
          var closeText = (options && options.closeText) ? options.closeText : '';
  
          var modalFragment =
              '<div class="mzp-c-modal ' + className + '" role="dialog" aria-labelledby="' + origin.getAttribute('id') + '" tabindex="-1">' +
              '  <div class="mzp-c-modal-window">' +
              '    <div class="mzp-c-modal-inner">' +
              '      <header><h2>' + title + '</h2></header>' +
              '      <div class="mzp-c-modal-close">' +
              '        <button type="button" class="mzp-c-modal-button-close">' + closeText + '</button>' +
              '      </div>' +
              '    </div>' +
              '  </div>' +
              '</div>';
  
          if ((options && !options.allowScroll) || isSmallViewport) {
              html.classList.add('mzp-is-noscroll');
          } else {
              html.classList.remove('mzp-is-noscroll');
          }
  
          // Add modal to page
          body.insertAdjacentHTML('beforeend', modalFragment);
  
          modal = document.querySelector('.mzp-c-modal');
  
          pageContent = content;
          pageContentParent = content.parentNode;
  
          var modalInner = document.querySelector('.mzp-c-modal-inner');
          modalInner.appendChild(content);
  
          content.classList.add('mzp-c-modal-overlay-contents');
  
          // close modal on clicking close button or background.
          var closeButton = document.querySelector('.mzp-c-modal-button-close');
          closeButton.addEventListener('click', _closeModal, false);
          closeButton.setAttribute('title', closeText);
  
          // close modal on clicking the background (but not bubbled event).
          document.querySelector('.mzp-c-modal .mzp-c-modal-window').addEventListener('click', function (e) {
              if (e.target === this) {
                  _closeModal();
              }
          }, false);
  
          modal.focus();
  
          // close with escape key
          document.addEventListener('keyup', _onDocumentKeyUp, false);
  
          // prevent focusing out of modal while open
          document.addEventListener('focus', _onDocumentFocus, false);
  
          // remember which element opened the modal for later focus
          origin.classList.add('mzp-c-modal-origin');
  
          open = true;
  
          // execute (optional) open callback
          if (options && typeof(options.onCreate) === 'function') {
              options.onCreate();
          }
      }