{% if module['position'] == 'content_top' or module['position'] == 'content_bottom' %}
{% if bigshop_specials_slider_product_style == '1' %}
<h3>{{ heading_title }}</h3>
<div class="row products-category special_carousel mod">
 {% for product in products %}
  <div class="product-layout">
    <div class="product-thumb transition">
      <div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
        <!--<p>{{ product.description }}</p>-->
        {% if product.price %}
        <p class="price">
          {% if not product.special %}
          {{ product.price }}
          {% else %}
          <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
          {% if bigshop_percentage_discount_badge == 1 %}<span class="saving">-{{ product.saving }}%</span>{% endif %}
          {% endif %}
          {% if product.tax %}
          <span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
          {% endif %}
        </p>
        {% endif %}
        {% if product.rating %}
        <div class="rating">
          {% for i in 1..5 %}
          {% if product.rating < i %}
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% else %}
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% endif %}
          {% endfor %}
        </div>
        {% endif %}
        
      </div>
      <div class="button-group">
        <button class="btn-primary" type="button" onclick="cart.add('{{ product.product_id }}');"><span>{{ button_cart }}</span></button>
        <div class="add-to-links">
        <button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
        <button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
        </div>
      </div>
    </div>
  </div>
  {% endfor %}
</div>

{% if bigshop_specials_slider_product_per_row == '3' %}
<script type="text/javascript">
$(document).ready(function(){
$('#content .special_carousel .product-layout').attr('class', 'product-grid col-lg-4 col-md-4 col-sm-4 col-xs-6');
$('#content .special_carousel').css('display', 'block');
$screensize = $(window).width();
    if ($screensize > 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block"></span>');
    }
    if ($screensize < 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
$( window ).resize(function() {
    $screensize = $(window).width();
    if ($screensize > 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block"></span>');
    } 
    if ($screensize < 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
});
});
</script>
{% elseif bigshop_specials_slider_product_per_row == '4' %}
<script type="text/javascript">
$(document).ready(function(){
$('#content .special_carousel .product-layout').attr('class', 'product-grid col-lg-3 col-md-3 col-sm-4 col-xs-6');
$('#content .special_carousel').css('display', 'block');
$screensize = $(window).width();
    if ($screensize > 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block"></span>');
    }
    if ($screensize < 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
$( window ).resize(function() {
    $screensize = $(window).width();
    if ($screensize > 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block"></span>');
    } 
    if ($screensize < 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
});
});
</script>
{% elseif bigshop_specials_slider_product_per_row == '5' %}
<script type="text/javascript">
$(document).ready(function(){
$('#content .special_carousel .product-layout').attr('class', 'product-grid col-lg-5ths col-md-5ths col-sm-4 col-xs-6');
$('#content .special_carousel').css('display', 'block');
$screensize = $(window).width();
    if ($screensize > 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(5n)').after('<span class="clearfix visible-lg-block"></span>');
    }
    if ($screensize < 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(5n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
$( window ).resize(function() {
    $screensize = $(window).width();
    if ($screensize > 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block"></span>');
    } 
    if ($screensize < 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(4n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');

    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
});
});
</script>
{% elseif bigshop_specials_slider_product_per_row == '6' %}
<script type="text/javascript">
$(document).ready(function(){
$('#content .special_carousel .product-layout').attr('class', 'product-grid col-lg-2 col-md-2 col-sm-4 col-xs-6');
$('#content .special_carousel').css('display', 'block');
$screensize = $(window).width();
    if ($screensize > 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(6n)').after('<span class="clearfix visible-lg-block"></span>');
    }
    if ($screensize < 1199) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(6n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
		$(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
$( window ).resize(function() {
    $screensize = $(window).width();
    if ($screensize > 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(6n)').after('<span class="clearfix visible-lg-block"></span>');
    } 
    if ($screensize < 1199) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(6n)').after('<span class="clearfix visible-lg-block visible-md-block"></span>');
    }
	if ($screensize < 991) {
        $(".products-category.special_carousel > .clearfix").remove();
        $('.products-category.special_carousel .product-grid:nth-child(3n)').after('<span class="clearfix visible-lg-block visible-sm-block"></span>');
    }
	if ($screensize < 767) {
        $(".products-category.special_carousel > .clearfix").remove();
		$('.products-category.special_carousel .product-grid:nth-child(2n)').after('<span class="clearfix visible-lg-block visible-xs-block"></span>');
    }
});
});
</script>
{% endif %}

{% else %}
<h3>{{ heading_title }}</h3>
<div class="owl-carousel special_carousel">
 {% for product in products %}
    <div class="product-thumb transition">
      <div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
        <!--<p>{{ product.description }}</p>-->
        {% if product.price %}
        <p class="price">
          {% if not product.special %}
          {{ product.price }}
          {% else %}
          <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
          {% if bigshop_percentage_discount_badge == 1 %}<span class="saving">-{{ product.saving }}%</span>{% endif %}
          {% endif %}
          {% if product.tax %}
          <span class="price-tax">{{ text_tax }} {{ product.tax }}</span>
          {% endif %}
        </p>
        {% endif %}
        {% if product.rating %}
        <div class="rating">
          {% for i in 1..5 %}
          {% if product.rating < i %}
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% else %}
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% endif %}
          {% endfor %}
        </div>
        {% endif %}
        
      </div>
      <div class="button-group">
        <button class="btn-primary" type="button" onclick="cart.add('{{ product.product_id }}');"><span>{{ button_cart }}</span></button>
        <div class="add-to-links">
        <button type="button" data-toggle="tooltip" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="fa fa-heart"></i></button>
        <button type="button" data-toggle="tooltip" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fa fa-exchange"></i></button>
        </div>
      </div>
    </div>
  {% endfor %}
</div>
<script type="text/javascript">
	$(document).ready(function() {
		$("#content .owl-carousel.special_carousel").owlCarousel({
		itemsCustom : [[320, 2],[600, 3],[768, 3],[992, {{ bigshop_specials_slider_product_per_row }}],[1199, {{ bigshop_specials_slider_product_per_row }}]],											   
		lazyLoad : true,
		navigation : true,
		navigationText: ['<i class="fa fa-angle-left"></i>', '<i class="fa fa-angle-right"></i>'],
		scrollPerPage : true
    }); 
		});
</script>
{% endif %}
{% else %}
<h3>{{ heading_title }}</h3>
<div class="row products-category mod">
 {% for product in products %}
  <div class="product-layout">
    <div class="product-thumb transition">
      <div class="image"><a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" class="img-responsive" /></a></div>
      <div class="caption">
        <h4><a href="{{ product.href }}">{{ product.name }}</a></h4>
        {% if product.price %}
        <p class="price">
          {% if not product.special %}
          {{ product.price }}
          {% else %}
          <span class="price-new">{{ product.special }}</span> <span class="price-old">{{ product.price }}</span>
          {% if bigshop_percentage_discount_badge == 1 %}<span class="saving">-{{ product.saving }}%</span>{% endif %}
          {% endif %}
        </p>
        {% endif %}
        {% if product.rating %}
        <div class="rating">
          {% for i in 1..5 %}
          {% if product.rating < i %}
          <span class="fa fa-stack"><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% else %}
          <span class="fa fa-stack"><i class="fa fa-star fa-stack-2x"></i><i class="fa fa-star-o fa-stack-2x"></i></span>
          {% endif %}
          {% endfor %}
        </div>
        {% endif %}
      </div>
    </div>
  </div>
  {% endfor %}
</div>
{% endif %}