<?
/**
 * @package     DOCman
 * @copyright   Copyright (C) 2019 Timble CVBA. (http://www.timble.net)
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.joomlatools.com
 */
defined('FOLIOKIT') or die; ?>

<ktml:script src="assets://docman/site/js/gallery.js" />
<ktml:script src="assets://docman/site/js/items.js" />

<script>
    kQuery(function($) {

        var documentsGallery = $('.koowa_media_wrapper--documents'),
            categoriesGallery = $('.koowa_media_wrapper--categories'),
            itemWidth = parseInt($('.koowa_media_wrapper--documents .koowa_media__item').css('width'));

        if ( categoriesGallery ) {
            categoriesGallery.simpleGallery({
                item: {
                    'width': itemWidth
                }
            });
        }

        if ( documentsGallery ) {
            documentsGallery.simpleGallery({
                item: {
                    'width': itemWidth
                }
            });
        }
    });
</script>

<? if (!empty($track_downloads)): ?>
    <?= helper('com://site/docman.behavior.download_tracker'); ?>
<? endif; ?>