<?php

// Add the mediabox style sheet
$GLOBALS['TL_CSS'][] = 'assets/mootools/mediabox/'. $GLOBALS['TL_ASSETS']['MEDIABOX'] .'/css/mediaboxAdvBlack21.css|static';

?>

<script type="text/javascript" src="<?= TL_ASSETS_URL ?>assets/mootools/mediabox/<?= $GLOBALS['TL_ASSETS']['MEDIABOX'] ?>/js/mediabox.js"></script>
<script type="text/javascript">
  /* <![CDATA[ */
  (function($) {
    window.addEvent('domready', function() {
      $$('a[rel^=lightbox]').mediabox({
        /* Put custom options here */
      }, null, function(el) {
        var rel0 = this.rel.replace(/[[]|]/gi,' ');
        var relsize = rel0.split(' ');
        return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
      });
      $('mbImage').addEvent('swipe', function(e) {
        (e.direction == 'left') ? $('mbNextLink').fireEvent('click') : $('mbPrevLink').fireEvent('click');
      });
    });
  })(document.id);
  /* ]]> */
</script>
