<?php
/**
 * Hello Magento
 *
 * @package    HM
 * @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * @see HM_Bestseller_Model_Bestseller
 */
?>

<?php 
 
$total_products = ($this->show_total) ? $this->show_total : 3;
$_productCollection = $this->getBestsellers($total_products); 
$_collectionSize = count($_productCollection);
?>


<?php if(count($_productCollection) > 0): ?>

<?php /* BELOW IS DEFAULT MAGENTO TEMPLATE CODE FROM catalog/product/list.phtml file */ ?>
<div class="listing-type-gridd catalog-listingg">
<div class="title-bestseller"><span><?php echo $this->__('Top Sellers') ?></span></div>
<div class="product_bodyy" >
<p class="updated">Updated hourly</p>
<?php $_collectionSize = count($_productCollection) ?>
	<ul class="jcarousel-skin-tangoo">
    <?php $i=0; foreach ($_productCollection as $_product): ?>    
        
            <li>
                <div class="boxgridd captionn">
					<div class="small_img">
						<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">
							<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(61, 62); ?>" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />
						</a>
					</div>
					<div class="coverss boxcaptionss">
						<h3><a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
						<div class="group_boxx">
							<div class="box_pricee">								
								<?php echo $this->helper('checkout')->formatPrice($_product->getPrice()) ?>
							</div>
						</div>
					</div>
					<div class="clear_both"><span></span></div>
                </div>				
            </li>
    <?php endforeach ?>
    </ul>
	<div class="clear_both"><span></span></div>
	</div>
</div>
<?php endif; ?>
