<?php

// Add the swipe style sheet
$GLOBALS['TL_CSS'][] = 'assets/swipe/'. $GLOBALS['TL_ASSETS']['SWIPE'] .'/css/swipe.min.css|static';

?>

<script type="text/javascript" src="<?= TL_ASSETS_URL ?>assets/swipe/<?= $GLOBALS['TL_ASSETS']['SWIPE'] ?>/js/swipe.min.js"></script>
<script type="text/javascript">
  /* <![CDATA[ */
  (function() {
    window.addEvent('domready', function() {
      $$('.ce_sliderStart').each(function(cte) {
        var s = cte.getElement('.content-slider'),
            c = s.className.split(' ')[1].split('_');
        new Swipe(s, {
          // Put custom options here
          'auto': parseInt(c[1]),
          'speed': parseInt(c[2]),
          'startSlide': parseInt(c[3]),
          'continuous': parseInt(c[4]),
          'menu': cte.getElement('.slider-control')
        });
      });
    });
  })();
  /* ]]> */
</script>
