text: <?php
  
  // Add slimbox style sheet
  $GLOBALS['TL_CSS'][] = 'assets/mootools/slimbox/' . $GLOBALS['TL_ASSETS']['SLIMBOX'] . '/css/slimbox.css|static';
  
  ?>
  
  <script src="<?= TL_ASSETS_URL ?>assets/mootools/slimbox/<?= $GLOBALS['TL_ASSETS']['SLIMBOX'] ?>/js/slimbox.js"></script>
  <script>
    (function($) {
      window.addEvent('domready', function() {
        $$(document.links).filter(function(el) {
          return el.getAttribute('data-lightbox') != null;
        }).slimbox({
          // Put custom options here
        }, null, function(el) {
          var attr = this.getAttribute('data-lightbox');
          return (this == el) || (attr && el.getAttribute('data-lightbox').match(attr));
        });
        $('lbImage').addEvent('swipe', function(e) {
          (e.direction == 'left') ? $('lbNextLink').fireEvent('click') : $('lbPrevLink').fireEvent('click');
        });
      });
    })(document.id);
  </script>
  