<?php $this->loadCss('/media/css/catalogo.css'); ?>
<?php $this->loadJavascript('/media/js/catalogo.js'); ?>

<?php $this->loadRss('/catalogo/rss'); ?>

<table cellpadding="0" cellspacing="0" border="0" width="100%">
    <?php if ($categorias) : ?>
    <?php for ($i = 0; $i < $total; $i++) : ?>
        <tr>
            <?php if (array_key_exists($i, $categorias)) : ?>
            <td align="center" width="347">				
				<table cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td style=" border:1px solid #e2e2e2; width:200px; height:90px;" align="center">
                        <?php if ($categorias[$i]['imagem'] && is_readable(WWW_PATH . $imagens_upload_path . 'categoria_' . $categorias[$i]['imagem'])): ?>
							<a title="<?php echo $this->escapeTitle($categorias[$i]['titulo'])?>" href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><img src="<?php echo $baseUrl ?>/uploads/catalogo/imagens/small_<?php echo $categorias[$i]['imagem']?>" alt="" style=" padding:5px; margin-right:5px;" border="0" /></a>
                        <?php else: ?>
                         	<a href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><?php echo $this->img('/media/images/no_pic_categoria.gif', array('border' => 0))?></a>
                        <?php endif; ?>
						</td>
					</tr>
					<tr>
						<td align="center">
							<br /><a title="<?php echo $this->escapeTitle($categorias[$i]['titulo'])?>" href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><br /><?php echo $this->escapeTitle($categorias[$i]['titulo'])?></a>
						</td>
					</tr>
				</table>				
			</td>
            <?php endif; ?>
            
            <?php $i++; ?>
            
            <?php if (array_key_exists($i, $categorias)) : ?>
            <td align="center">
				<table cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td style=" border:1px solid #e2e2e2; width:200px; height:90px;" align="center">
							<?php if ($categorias[$i]['imagem'] && is_readable(WWW_PATH . $imagens_upload_path . 'categoria_' . $categorias[$i]['imagem'])): ?>
							<a title="<?php echo $this->escapeTitle($categorias[$i]['titulo'])?>" href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><img src="<?php echo $baseUrl ?>/uploads/catalogo/imagens/small_<?php echo $categorias[$i]['imagem']?>" alt="" style=" padding:5px; margin-right:5px;" border="0" /></a>
                        <?php else: ?>
                         	<a title="<?php echo $this->escapeTitle($categorias[$i]['titulo'])?>" href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><?php echo $this->img('/media/images/no_pic_categoria.gif', array('border' => 0))?></a>
                        <?php endif; ?>
						</td>
					</tr>
					<tr>
						<td align="center">
							<br /><a title="<?php echo $this->escapeTitle($categorias[$i]['titulo'])?>" href="<?php echo $this->link('/catalogo/list/categoria_id/' . $categorias[$i]['id'] . $rows . '/'); ?>" style=" font-weight:normal;"><br /><?php echo $this->escapeTitle($categorias[$i]['titulo'])?></a>
						</td>
					</tr>
				</table>
			</td>
            <?php endif; ?>
        </tr>
        <tr>
            <td colspan="2" height="24">&nbsp;</td>
        </tr>
    <?php endfor; ?>
    <?php endif; ?>
</table>
