<ul class="box related">
      <?php $i=0; foreach ($products as $product) { $i++; ?>
      <li <?php 
	  		if($i%4==0){ 
	  			echo 'class="last"';
			}elseif($i%2==0){
				echo 'class="second"';
			} 
		  ?>>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
        	<?php if($product['special']) :?>
                	<span class="promo">promo</span>
            <?php endif; ?>
        </div>
        <?php } ?>
        <div class="prodInfo">
            <h2 class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h2>
            <?php if ($product['price']) { ?>
            <div class="price">
              <?php if (!$product['special']) { ?>
              <?php echo $product['price']; ?>
              <?php } else { ?>
              <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
              <?php } ?>
            </div>
            <?php } ?>
            <div class="clear"></div>
        </div>
          <div class="cart">
            	<a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><span><?php echo $button_cart; ?></span></a>
            </div>
        </li>
      <?php } ?>
</ul>