<script type="text/javascript" src="catalog/view/theme/elegant/js/kwicks.js"></script>
<?php if (($setting['position'] == 'content_top') || ($setting['position'] == 'content_bottom')){ ?>
<div class="box">
 <div class="kwiks-slide">
 <div class="heading"><?php echo $heading_title; ?></div>
  <div class="box-product"> 
   <dl class="slidedeck">
    <div class="kw-top"></div>
	<?php foreach ($products as $product) { ?>
	<dt><?php echo $product['name']; ?></dt>
      <dd>
       <div style="text-align: left;">  
        <?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></div>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <div class="prices">
		  <?php if ($product['special']) { ?>
		   <div class="sales"></div>
		  <?php } ?>
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="prices-old"><?php echo $product['price']; ?></span><br /><span class="prices-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <div class="cart"><input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button-cart" /></div>
       </div>  
      </dd> 
    <?php } ?> 
    </dl>  
    </div>
  </div>
</div>
<?php } else { ?>
<div class="box">
 <div class="title_left"><div class="title_right"><div class="title_middle"><?php echo $heading_title; ?></div></div></div>
  <div class="box-content" style="padding: 5px 0 0 0;">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
		<div class="name-block"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
		<div class="description"><?php echo $product['descr']; ?></div>
		<?php if ($product['special']) { ?>
		  <div class="sale-2"></div>
        <?php } ?>
        <?php if ($product['thumb']) { ?>
        <div class="image" style="padding: 0 0 0 4px;text-align:left;"><a href="<?php echo $product['href']; ?>"><img style="width:74px;" src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
		<?php } ?>
		<?php if ($product['rating']) { ?>
        <div class="rating-block"><img src="catalog/view/theme/elegant/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
      </div>
      <?php } ?>
    </div>
  </div>
  <div class="bottom_left"><div class="bottom_right"><div class="bottom_middle"> </div></div></div>
</div>
<?php } ?>
<script type="text/javascript">
	$('.slidedeck').slidedeck({
		autoPlay: true,            
		cycle: true,               
		autoPlayInterval: 4000     
	});
</script>