{% if status %}
	{% if exist_fcate %}
		<script type="text/javascript">
			$(document).ready(function() {
				$(".featured-categorytab .tab_content_category").hide();
				$(".featured-categorytab .tab_content_category:first").show();
				$(".featured-category .tabs-featured:first").addClass("active");
				$(".featured-categorytab div.featured-category div").click(function() {
					$("div.featured-category div").removeClass("active");
					$(this).addClass("active");
					$(".featured-categorytab .tab_content_category").hide();
					$(".featured-categorytab .tab_content_category").removeClass("animate1 {{ tab_effect }}");
					var activeTab = $(this).attr("rel");
					$(".featured-categorytab #" + activeTab).addClass("animate1 {{ tab_effect }}");
					$(".featured-categorytab #" + activeTab).fadeIn();
				});
			});
		</script>

        {% set row = config_slide.f_rows %}
        {% if not row %}
            {% set row = 1 %}
        {% endif %}
<div class="product-tabs-category-container-slider featured-categorytab">
	<div class="module-description">
	  {{ module_description }}
	</div>
	<div class="module-title">
		<h2>{{ heading_title }}</h2>
	</div>
	<div class="featured-category-icon">
		<div class="row">
			<div class="featured-category owl-carousel owl-theme">
				{% set count = 0 %}
				{% for category in categories %}
					<div class="tabs-featured  tab_cate{{ category.category_id }}" rel="tab_fcate{{ category.category_id }}">
						<div class="image-thumb">
							{% if category.homethumb_image %}
								<img class="image" src="{{ category.homethumb_image }}" alt="" />
							{% endif %}
							{% if category.thumbnail_image %}
								<img class="imagehover" src="{{ category.thumbnail_image }}" alt="" />
							{% endif %}
						</div>
						<span>{{ category.name }}</span>
					</div>
					{% set count = count + 1 %}
				{% endfor %}
			</div>
		</div>
	</div>
	<div class="tab_featured_category">
		<div class="row">
			{% for category in categories %}
			<div id="tab_fcate{{ category.category_id }}" class="tab_content_category">
				{% if category.products %}
					<div class="productTabContent owl-demo-tabcate owl-carousel owl-theme">
						{% set products, i = category.products, 0 %}
						{% for product in products %}
							{% if i % row == 0 %}<div class='row_item'>{% endif %}
							{% set i = i + 1 %}
							<div class="item product-grid">
								<div class="item-inner">
									<div class="image">
										{% if config_slide.showlabel %}
											{% if product.is_new %}
												{% if product.special %}
													<div class="label-product label_sale">{{ text_sale }}</div>
												{% else %}
													<div class="label-product label_new">{{ text_new }}</div>
												{% endif %}
											{% else %}
												{% if product.special %}
													<div class="label-product label_sale">{{ text_sale }}</div>
												{% endif %}
											{% endif %}
										{% endif %}
										<a href="{{ product.href }}"><img class="image1" src="{{ product.thumb }}" alt="{{ product.name }}" />
										{% if product.rotator_image %}
											<img class="image2" src="{{ product.rotator_image }}" alt="" />
										{% endif %}
										</a>
										<div class="actions">
											<div class="add-to-links">
												{% if config_slide.showaddtocart %}
													<div class="cart">
													<button type="button" title="{{ button_cart }}" onclick="cart.add('{{ product.product_id }}');"><span>{{ button_cart }}</span></button>
													</div>
												{% endif %}
												<div class="wishlist">
													<button type="button" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><span>{{ button_wishlist }}</span></button>
												</div>
												<div class="compare">
													<button type="button" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><span>{{ button_compare }}</span></button>
												</div>
												<div class="qv-button-container">
														<button type="button" title="{{ button_quickview }}" onclick="ocquickview.ajaxView('{{ product.href }}')"><span>{{ button_quickview }}</span></button>
												</div>
											</div>
										</div>
									</div>
									<div class="caption">
										{% if product.rating %}
											<div class="ratings">
												<div class="rating-box">
												{% for i in 0..5 %}
													{% if product.rating == i %}
													{% set class_r = "rating"~i %}
													<div class="{{ class_r }}">rating</div>
													{% endif %}
												{% endfor %}
												</div>
											</div>					
										{% endif %}
										<div class="product-name"><a href="{{ product.href }}">{{ product.name }}</a></div>
										{% if config_slide.showdes %}
											<p class="product-des">{{ product.description }}</p>
										{% endif %}
										{% if config_slide.showprice %}
											{% if product.price %}
												<div class="price">
													{% if not product.special %}
														{{ product.price }}
													{% else %}
														<span class="price-old">{{ product.price }}</span> <span class="price-new">{{ product.special }}</span>
													{% endif %}
												</div>
											{% endif %}
										{% endif %}
									</div>
								</div>
							</div>
							{% if (i % row == 0) or (i == products|length) %}</div>{% endif %}
						{% endfor %}
					</div>
				{% else %}
					<p>{{ text_empty_products }}</p>
				{% endif %}
			</div>
			{% endfor %}
		</div>
	</div> <!-- .tab_container_category -->
</div>
		<script type="text/javascript">
		$(document).ready(function() {
			$(".featured-categorytab .owl-demo-tabcate").owlCarousel ({
				autoplay: {% if config_slide.autoplay %} true {% else %} false {% endif %},
				autoplaySpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				navSpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				dotsSpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				nav : {% if config_slide.shownextback %} true {% else %} false {% endif %},
				dots : {% if config_slide.shownav %} true {% else %} false {% endif %},
				autoplayHoverPause : false,
				navText : ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
				responsive:{
					0:{
						items: 1
					},
					481:{
						items: 2
					},
					769:{
						items: 3
					},
					1024:{
						items: 4
					},
					1200:{
						items: {{ config_slide.items }}
					},
				}
			});
			$(".featured-categorytab .featured-category").owlCarousel ({
				autoplay: {% if config_slide.autoplay %} true {% else %} false {% endif %},
				autoplaySpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				navSpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				dotsSpeed : {% if config_slide.speed %} {{ config_slide.speed }} {% else %} 3000 {% endif %},
				nav : false,
				dots : false,
				autoplayHoverPause : false,
				responsive:{
					0:{
						items: 2
					},
					481:{
						items: 3
					},
					769:{
						items: 3
					},
					1024:{
						items: 4
					},
					1200:{
						items: 5
					},
				}
			});
		});
	</script>
	{% else %}
		<p class="category-not">{{ text_empty_categories }}</p>
	{% endif %}
{% endif %}