<?php /* Smarty version 2.6.26, created on 2017-03-20 01:44:33
         compiled from blocks/categories_block.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'explode', 'blocks/categories_block.tpl', 3, false),array('modifier', 'count', 'blocks/categories_block.tpl', 6, false),array('modifier', 'cat', 'blocks/categories_block.tpl', 17, false),array('modifier', 'replace', 'blocks/categories_block.tpl', 25, false),array('modifier', 'number_format', 'blocks/categories_block.tpl', 37, false),array('modifier', 'ceil', 'blocks/categories_block.tpl', 92, false),array('function', 'math', 'blocks/categories_block.tpl', 22, false),array('function', 'rlHook', 'blocks/categories_block.tpl', 31, false),)), $this); ?>
<!-- categories block -->

<?php $this->assign('types', ((is_array($_tmp=',')) ? $this->_run_mod_handler('explode', true, $_tmp, $this->_tpl_vars['types']) : explode($_tmp, $this->_tpl_vars['types']))); ?>

<?php if (! $this->_tpl_vars['block']['Tpl']): ?>
	<?php if (count($this->_tpl_vars['types']) > 1): ?>
		<div class="caption">
			<?php echo $this->_tpl_vars['lang']['categories']; ?>

		</div>
	<?php endif; ?>
<?php endif; ?>

<?php $_from = $this->_tpl_vars['types']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['type']):
?>
	<?php $this->assign('box_listing_type', $this->_tpl_vars['listing_types'][$this->_tpl_vars['type']]); ?>

	<?php if (count($this->_tpl_vars['types']) > 1): ?>
		<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_header.tpl') : smarty_modifier_cat($_tmp, 'fieldset_header.tpl')), 'smarty_include_vars' => array('name' => $this->_tpl_vars['box_listing_type']['name'],'id' => ((is_array($_tmp='addcatblock')) ? $this->_run_mod_handler('cat', true, $_tmp, $this->_tpl_vars['box_listing_type']['Key']) : smarty_modifier_cat($_tmp, $this->_tpl_vars['box_listing_type']['Key'])),'class' => 'categories_padding')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<?php endif; ?>
	
	<?php if ($this->_tpl_vars['box_categories'][$this->_tpl_vars['type']]): ?>
		<?php if ($this->_tpl_vars['box_listing_type']['Ablock_visible_number']): ?>
			<?php echo smarty_function_math(array('assign' => 'pages_number','equation' => 'ceil(count/num)','count' => count($this->_tpl_vars['box_categories'][$this->_tpl_vars['type']]),'num' => $this->_tpl_vars['box_listing_type']['Ablock_visible_number']), $this);?>

		<?php endif; ?>
		
		<div class="categories<?php if ($this->_tpl_vars['box_listing_type']['Ablock_show_subcats']): ?> sub-categories-exist<?php endif; ?>" id="categories_<?php echo ((is_array($_tmp=$this->_tpl_vars['type'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', '')); ?>
_<?php echo $this->_tpl_vars['pages_number']; ?>
">
			<ul class="clearfix">
				<li>
					<div class="row categoty-column clearfix">
						
					<?php $_from = $this->_tpl_vars['box_categories'][$this->_tpl_vars['type']]; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['fCats'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fCats']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['cat']):
        $this->_foreach['fCats']['iteration']++;
?>
						<?php echo rlHook::load(array('name' => 'tplBetweenCategories'), $this);?>

						
						<div class="<?php if ($this->_tpl_vars['pageInfo']['Key'] == 'home' && ( ( $this->_tpl_vars['block']['Side'] == 'middle' && ( $this->_tpl_vars['blocks']['middle_left'] || $this->_tpl_vars['blocks']['middle_right'] ) ) || ( ( $this->_tpl_vars['block']['Side'] == 'middle_left' || $this->_tpl_vars['block']['Side'] == 'middle_right' ) && $this->_tpl_vars['blocks']['middle'] ) )): ?>col-md-12<?php elseif ($this->_tpl_vars['block']['Side'] == 'middle_left' || $this->_tpl_vars['block']['Side'] == 'middle_right' || ( $this->_tpl_vars['block']['Side'] == 'left' && $this->_tpl_vars['pageInfo']['Key'] == 'home' )): ?>col-md-6<?php else: ?>col-md-3<?php endif; ?> col-sm-6 item<?php if (! $this->_tpl_vars['cat']['Count']): ?> empty-category<?php endif; ?>">
							<div class="parent-cateory">
								<?php if ($this->_tpl_vars['box_listing_type']['Cat_listing_counter']): ?>
									<div class="category-counter">
										<span><?php echo ((is_array($_tmp=$this->_tpl_vars['cat']['Count'])) ? $this->_run_mod_handler('number_format', true, $_tmp) : number_format($_tmp)); ?>
</span>
									</div>
								<?php endif; ?>
							
								<div class="category-name">
									<?php echo rlHook::load(array('name' => 'tplPreCategory'), $this);?>

									<a class="category" title="<?php if ($this->_tpl_vars['lang'][$this->_tpl_vars['cat']['pTitle']]): ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['cat']['pTitle']]; ?>
<?php else: ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['cat']['pName']]; ?>
<?php endif; ?>" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
/<?php echo $this->_tpl_vars['cat']['Path']; ?>
<?php if ($this->_tpl_vars['box_listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['cat']['pName']]; ?>
</a>
									<?php echo rlHook::load(array('name' => 'tplPostCategory'), $this);?>

								</div>
							</div>
							
							<?php if (! empty ( $this->_tpl_vars['cat']['sub_categories'] ) && $this->_tpl_vars['box_listing_type']['Ablock_show_subcats']): ?>
							<div class="sub_categories">
								<?php if ($this->_tpl_vars['box_listing_type']['Ablock_subcat_number']): ?>
									<?php unset($this->_sections['sub_cat']);
$this->_sections['sub_cat']['loop'] = is_array($_loop=$this->_tpl_vars['cat']['sub_categories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['sub_cat']['name'] = 'sub_cat';
$this->_sections['sub_cat']['max'] = (int)$this->_tpl_vars['box_listing_type']['Ablock_subcat_number'];
$this->_sections['sub_cat']['show'] = true;
if ($this->_sections['sub_cat']['max'] < 0)
    $this->_sections['sub_cat']['max'] = $this->_sections['sub_cat']['loop'];
$this->_sections['sub_cat']['step'] = 1;
$this->_sections['sub_cat']['start'] = $this->_sections['sub_cat']['step'] > 0 ? 0 : $this->_sections['sub_cat']['loop']-1;
if ($this->_sections['sub_cat']['show']) {
    $this->_sections['sub_cat']['total'] = min(ceil(($this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] - $this->_sections['sub_cat']['start'] : $this->_sections['sub_cat']['start']+1)/abs($this->_sections['sub_cat']['step'])), $this->_sections['sub_cat']['max']);
    if ($this->_sections['sub_cat']['total'] == 0)
        $this->_sections['sub_cat']['show'] = false;
} else
    $this->_sections['sub_cat']['total'] = 0;
if ($this->_sections['sub_cat']['show']):

            for ($this->_sections['sub_cat']['index'] = $this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['iteration'] = 1;
                 $this->_sections['sub_cat']['iteration'] <= $this->_sections['sub_cat']['total'];
                 $this->_sections['sub_cat']['index'] += $this->_sections['sub_cat']['step'], $this->_sections['sub_cat']['iteration']++):
$this->_sections['sub_cat']['rownum'] = $this->_sections['sub_cat']['iteration'];
$this->_sections['sub_cat']['index_prev'] = $this->_sections['sub_cat']['index'] - $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['index_next'] = $this->_sections['sub_cat']['index'] + $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['first']      = ($this->_sections['sub_cat']['iteration'] == 1);
$this->_sections['sub_cat']['last']       = ($this->_sections['sub_cat']['iteration'] == $this->_sections['sub_cat']['total']);
?>
										<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

										<?php $this->assign('subcat_title', $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['pTitle']); ?>
										<a title="<?php if ($this->_tpl_vars['lang'][$this->_tpl_vars['subcat_title']]): ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['subcat_title']]; ?>
<?php else: ?><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
<?php endif; ?>" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
/<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['Path']; ?>
<?php if ($this->_tpl_vars['box_listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
</a><?php if ($this->_sections['sub_cat']['last']): ?><?php if (count($this->_tpl_vars['cat']['sub_categories']) > $this->_tpl_vars['box_listing_type']['Ablock_subcat_number']): ?><span class="more" title="<?php echo $this->_tpl_vars['lang']['show_other_categories']; ?>
">&nbsp;&raquo;</span><?php endif; ?><?php else: ?>, <?php endif; ?>
									<?php endfor; endif; ?>
									
									<div class="hide other_categories">
										<?php unset($this->_sections['sub_cat']);
$this->_sections['sub_cat']['loop'] = is_array($_loop=$this->_tpl_vars['cat']['sub_categories']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['sub_cat']['name'] = 'sub_cat';
$this->_sections['sub_cat']['start'] = (int)$this->_tpl_vars['box_listing_type']['Ablock_subcat_number'];
$this->_sections['sub_cat']['show'] = true;
$this->_sections['sub_cat']['max'] = $this->_sections['sub_cat']['loop'];
$this->_sections['sub_cat']['step'] = 1;
if ($this->_sections['sub_cat']['start'] < 0)
    $this->_sections['sub_cat']['start'] = max($this->_sections['sub_cat']['step'] > 0 ? 0 : -1, $this->_sections['sub_cat']['loop'] + $this->_sections['sub_cat']['start']);
else
    $this->_sections['sub_cat']['start'] = min($this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] : $this->_sections['sub_cat']['loop']-1);
if ($this->_sections['sub_cat']['show']) {
    $this->_sections['sub_cat']['total'] = min(ceil(($this->_sections['sub_cat']['step'] > 0 ? $this->_sections['sub_cat']['loop'] - $this->_sections['sub_cat']['start'] : $this->_sections['sub_cat']['start']+1)/abs($this->_sections['sub_cat']['step'])), $this->_sections['sub_cat']['max']);
    if ($this->_sections['sub_cat']['total'] == 0)
        $this->_sections['sub_cat']['show'] = false;
} else
    $this->_sections['sub_cat']['total'] = 0;
if ($this->_sections['sub_cat']['show']):

            for ($this->_sections['sub_cat']['index'] = $this->_sections['sub_cat']['start'], $this->_sections['sub_cat']['iteration'] = 1;
                 $this->_sections['sub_cat']['iteration'] <= $this->_sections['sub_cat']['total'];
                 $this->_sections['sub_cat']['index'] += $this->_sections['sub_cat']['step'], $this->_sections['sub_cat']['iteration']++):
$this->_sections['sub_cat']['rownum'] = $this->_sections['sub_cat']['iteration'];
$this->_sections['sub_cat']['index_prev'] = $this->_sections['sub_cat']['index'] - $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['index_next'] = $this->_sections['sub_cat']['index'] + $this->_sections['sub_cat']['step'];
$this->_sections['sub_cat']['first']      = ($this->_sections['sub_cat']['iteration'] == 1);
$this->_sections['sub_cat']['last']       = ($this->_sections['sub_cat']['iteration'] == $this->_sections['sub_cat']['total']);
?>
										<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

										<?php $this->assign('subcat_title', $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['pTitle']); ?>
											<a title="<?php if ($this->_tpl_vars['lang'][$this->_tpl_vars['subcat_title']]): ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['subcat_title']]; ?>
<?php else: ?><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
<?php endif; ?>" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
/<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['Path']; ?>
<?php if ($this->_tpl_vars['box_listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
&amp;category=<?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['cat']['sub_categories'][$this->_sections['sub_cat']['index']]['name']; ?>
</a><?php if (! $this->_sections['sub_cat']['last']): ?>, <?php endif; ?>
										<?php endfor; endif; ?>
									</div>
								<?php else: ?>
									<?php $_from = $this->_tpl_vars['cat']['sub_categories']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['subCatF'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['subCatF']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['sub_cat']):
        $this->_foreach['subCatF']['iteration']++;
?>
										<?php echo rlHook::load(array('name' => 'tplPreSubCategory'), $this);?>

											<a title="<?php if ($this->_tpl_vars['lang'][$this->_tpl_vars['sub_cat']['pTitle']]): ?><?php echo $this->_tpl_vars['lang'][$this->_tpl_vars['sub_cat']['pTitle']]; ?>
<?php else: ?><?php echo $this->_tpl_vars['sub_cat']['name']; ?>
<?php endif; ?>" href="<?php echo $this->_tpl_vars['rlBase']; ?>
<?php if ($this->_tpl_vars['config']['mod_rewrite']): ?><?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
/<?php echo $this->_tpl_vars['sub_cat']['Path']; ?>
<?php if ($this->_tpl_vars['box_listing_type']['Cat_postfix']): ?>.html<?php else: ?>/<?php endif; ?><?php else: ?>?page=<?php echo $this->_tpl_vars['pages'][$this->_tpl_vars['box_listing_type']['Page_key']]; ?>
&amp;category=<?php echo $this->_tpl_vars['sub_cat']['ID']; ?>
<?php endif; ?>"><?php echo $this->_tpl_vars['sub_cat']['name']; ?>
</a><?php if (! ($this->_foreach['subCatF']['iteration'] == $this->_foreach['subCatF']['total'])): ?>, <?php endif; ?>
									<?php endforeach; endif; unset($_from); ?>
								<?php endif; ?>
							</div>
							<?php endif; ?>
						</div>
						
						<?php if ($this->_tpl_vars['box_listing_type']['Ablock_visible_number'] && $this->_foreach['fCats']['iteration']%$this->_tpl_vars['box_listing_type']['Ablock_visible_number'] == 0 && ! ($this->_foreach['fCats']['iteration'] == $this->_foreach['fCats']['total'])): ?>
							</div>
							<?php if ($this->_tpl_vars['box_listing_type']['Ablock_visible_number']): ?>
								</li><li class="hide">
							<?php endif; ?>
							<div class="row categoty-column categories_<?php echo ((is_array($_tmp=$this->_tpl_vars['type'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', '')); ?>
">
						<?php endif; ?>
					<?php endforeach; endif; unset($_from); ?>
					</div>
				</li>
			</ul>
		</div>
		
		<?php if ($this->_tpl_vars['pages_number'] > 1): ?>
			<div class="category-slider-bar<?php if ($this->_tpl_vars['box_listing_type']['Ablock_scrolling']): ?> mousewheel<?php endif; ?>"><?php echo '<span class="arrow"><span class="prev" title="'; ?><?php echo $this->_tpl_vars['lang']['show_previous_categories']; ?><?php echo '"></span></span><span class="navigation">'; ?><?php echo smarty_function_math(array('assign' => 'slide_width','equation' => '100/count','count' => $this->_tpl_vars['pages_number']), $this);?><?php echo ''; ?><?php unset($this->_sections['slide_page']);
$this->_sections['slide_page']['name'] = 'slide_page';
$this->_sections['slide_page']['loop'] = is_array($_loop=((is_array($_tmp=$this->_tpl_vars['pages_number'])) ? $this->_run_mod_handler('ceil', true, $_tmp) : ceil($_tmp))) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['slide_page']['show'] = true;
$this->_sections['slide_page']['max'] = $this->_sections['slide_page']['loop'];
$this->_sections['slide_page']['step'] = 1;
$this->_sections['slide_page']['start'] = $this->_sections['slide_page']['step'] > 0 ? 0 : $this->_sections['slide_page']['loop']-1;
if ($this->_sections['slide_page']['show']) {
    $this->_sections['slide_page']['total'] = $this->_sections['slide_page']['loop'];
    if ($this->_sections['slide_page']['total'] == 0)
        $this->_sections['slide_page']['show'] = false;
} else
    $this->_sections['slide_page']['total'] = 0;
if ($this->_sections['slide_page']['show']):

            for ($this->_sections['slide_page']['index'] = $this->_sections['slide_page']['start'], $this->_sections['slide_page']['iteration'] = 1;
                 $this->_sections['slide_page']['iteration'] <= $this->_sections['slide_page']['total'];
                 $this->_sections['slide_page']['index'] += $this->_sections['slide_page']['step'], $this->_sections['slide_page']['iteration']++):
$this->_sections['slide_page']['rownum'] = $this->_sections['slide_page']['iteration'];
$this->_sections['slide_page']['index_prev'] = $this->_sections['slide_page']['index'] - $this->_sections['slide_page']['step'];
$this->_sections['slide_page']['index_next'] = $this->_sections['slide_page']['index'] + $this->_sections['slide_page']['step'];
$this->_sections['slide_page']['first']      = ($this->_sections['slide_page']['iteration'] == 1);
$this->_sections['slide_page']['last']       = ($this->_sections['slide_page']['iteration'] == $this->_sections['slide_page']['total']);
?><?php echo '<span style="width: '; ?><?php echo $this->_tpl_vars['slide_width']; ?><?php echo '%;" accesskey="'; ?><?php echo $this->_sections['slide_page']['iteration']; ?><?php echo '" '; ?><?php if ($this->_sections['slide_page']['first']): ?><?php echo 'class="active"'; ?><?php endif; ?><?php echo '></span>'; ?><?php endfor; endif; ?><?php echo '</span><span class="arrow"><span class="next" title="'; ?><?php echo $this->_tpl_vars['lang']['show_next_categories']; ?><?php echo '"></span></span>'; ?>
</div>
		<?php else: ?>
			<script>
			<?php echo '

			$(document).ready(function(){
				$(\'div#categories_'; ?>
<?php echo ((is_array($_tmp=$this->_tpl_vars['type'])) ? $this->_run_mod_handler('replace', true, $_tmp, '_', '') : smarty_modifier_replace($_tmp, '_', '')); ?>
_<?php echo $this->_tpl_vars['pages_number']; ?>
<?php echo '\').closest(\'section\').removeClass(\'categories-box-nav\');
			});

			'; ?>

			</script>
		<?php endif; ?>
	
	<?php else: ?>
		<?php echo $this->_tpl_vars['lang']['listing_type_no_categories']; ?>

	<?php endif; ?>
	
	<?php if (count($this->_tpl_vars['types']) > 1): ?>
		<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ((is_array($_tmp=((is_array($_tmp='blocks')) ? $this->_run_mod_handler('cat', true, $_tmp, @RL_DS) : smarty_modifier_cat($_tmp, @RL_DS)))) ? $this->_run_mod_handler('cat', true, $_tmp, 'fieldset_footer.tpl') : smarty_modifier_cat($_tmp, 'fieldset_footer.tpl')), 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<?php endif; ?>
	
<?php endforeach; endif; unset($_from); ?>

<!-- categories block end -->