<? if ( $this -> category['language']['text'] or $this -> category['language']['text_hidden']) : ?>
<div id="category-description">
  <div id="visible"><?= $this->category['language']['text']; ?></div>
  <div id="hidden"><?= $this->category['language']['text_hidden']; ?></div>
  <? if ($this->category['language']['text_hidden']) : ?>
  <a href="#" class="btn"><?= \S::lang('wiecej'); ?></a>
  <? endif; ?>
</div>
<? endif; ?>
<script class="footer" type="text/javascript">
  $( function()
  {
    $( 'body' ).on( 'click touchstart', '#category-description .btn', function(e) {
      e.preventDefault();
      if ($('#category-description #hidden').is(':visible')) {
        $('#category-description #hidden').slideToggle();
        $('#category-description .btn').html('<?= \S::lang('wiecej'); ?>');
      } else {
        $('#category-description #hidden').slideToggle();
        $('#category-description .btn').html('<?= \S::lang('mniej'); ?>');
      }
    });
  });
</script>