{if !empty($listWidgetTab)}
	<div class="tabs clearfix padding-bottom" data-class='widgets'>
	{if $widget['showTitle']=='Yes'}
			<h4  class="text-center">{$widget['widgetTitle']}</h4>
		{/if}
	</div>
{* widget Title and tab section completed *}
	<div class="wdgt-slider-block pos-rlv margin-btm-30">
		{assign var="index" value=0}
		{foreach $listWidgetTab as $tabkey=>$widgetTabs}
		{assign var="widgetKey" value=$widgetTabs['widgetKey']}
		 {assign var="widgetType" value=$widgetTabs['widgetType']}
               {assign var="staticWidgetContent" value=$widgetTabs['staticWidgetContent']}
       {if $widgetType eq 'static'}
               <div class="tabpane_{$widgetTabs['widgetID']} {$widgetTabs['widgetType']} {if $index>0}hide{/if}" data-tabid="tab_{$widgetKey}_{$tabkey}">
               {$staticWidgetContent|unescape}
               </div>
               {assign var="index" value=$index+1}
         {else}
		
		<div class="tabpane_{$widgetTabs['widgetID']} {$widgetTabs['listingType']} {if $index>0}hide{/if}" data-tabid="tab_{$widgetKey}_{$tabkey}" id="tabpane_{$widgetTabs['widgetTabID']}">
		{assign var="listWidgetTabItems" value=$widgetTabs['listWidgetTabItems']}
		{assign var="widgetTabID" value=$widgetTabs['widgetTabID']}
		{assign var="listingType" value=$widgetTabs['listingType']}
		{assign var="uniqueID" value=$widgetTabs['uniqueID']}
		{assign var="viewMoreLabel" value=$widgetTabs['viewMoreLabel']}
		{assign var="widgetDisplayedOn" value=$widgetTabs['widgetDisplayedOn']}
		{assign var="enableViewMore" value=$widgetTabs['enableViewMore']}
		{assign var="showItemLabel" value=$widgetTabs['showItemLabel']}
		{assign var="widgetViewMoreLink" value=$widgetTabs['widgetViewMoreLink']}
		{assign var="viewMoreLabelType" value=$widgetTabs['viewMoreLabelType']}
		{assign var="widgetViewMoreLabel" value=$widgetTabs['widgetViewMoreLabel']}	
			
		
		{if $listingType=='categories'}
			{assign var="maxCount" value=ceil(count($listWidgetTabItems)/3)}
		{else if $listingType=='brands'}
			{assign var="maxCount" value=ceil(count($listWidgetTabItems)/8)}
		{else}
			{assign var="maxCount" value=ceil(count($listWidgetTabItems)/5)}
		{/if}
{if $widgetTabs['listWidgetBundles']|count gt '0'}
             {assign var="listWidgetBundles" value=$widgetTabs['listWidgetBundles'][0]}
        {/if}
         {assign var="bundleID" value=$widgetTabs['bundleID']|default:0}
{if $bundleID gt '0' && $listWidgetBundles|count gt '0'}
    <div class="bundle margin-bottom" >
            {if $listWidgetBundles|count gt '0'}
                 <div class="slide-inner padding light-bg pos-rel">
                    <div class="pdtOptions text-center">
                       <div class="tag-bundle">{$language.lblBundleOffer|upper}</div>
                
                       <div class="discount  pull-right hide">
				{$listWidgetBundles['percentOff']}%
				<span>{$language.lblOff|upper}</span>
                       </div>
           
                    </div>
                    <figure>
                         
                    {if $listWidgetBundles['promoImage'] neq ''}
                       {assign var="image" value="{$view_public_path}/uploads/bundle/product/{$listWidgetBundles['promoImage']}"}
				{else}
                        {assign var="image" value="{$view_images}/not-av-img.gif"}
				{/if}
                    {html->anchor href="bundle/{$listWidgetBundles['ruleKey']}" content="<img src='{$image}' class='img-responsive' alt='{$listWidgetBundles['ruleName']|truncate:35}' title='{$listWidgetBundles['ruleName']}'/>" }
                   </figure>
                    {if $listWidgetBundles['ruleName'] neq ''}
                    <div class="product-info-block show-label">
                      
                          <h6>{html->anchor href="bundle/{$listWidgetBundles['ruleKey']}" content="{$listWidgetBundles['ruleName']|truncate:200}"}</h6>
                       
			</div>
                {/if}
                             <div class="clearfix inr-btm-wrap">
                         
                           <div class="pull-left text-center">
                                 <span class="bpfc h5style font-semibold text-center">{$listWidgetBundles['productCount']}</span><br> {$language.lblCartItems}
		</div>
                                                    <div class="inner-wrap2 margin-horizontal padding-left pull-left text-center">
                                                         {$language.lblYouSave}<br><span class="bpfc h5style font-semibold">{$listWidgetBundles['discountAmount']|default:''|price}</span>
                                                    </div>
                                                    <div class="inner-wrap2 pull-right padding-left">
                                                        <span class="bpfc offer-price h5style font-bold">{$listWidgetBundles['bundleProductPrice']|default:''|price}</span><br>
                           <del class="h6style font-semibold">{$listWidgetBundles['bundleProductRegPrice']|default:''|price}</del>
                                                    </div>
                    </div>
                    {html->anchor href="bundle/{$listWidgetBundles['ruleKey']}" content="{$language.lblBuyNow|upper}" class="btn btn-primary margin-top h5style font-semibold btn-block"}
                </div>
                {/if}
    </div>
	
        {/if}
<div class="wdgt-slider_{$uniqueID} wdgt-slider clearfix">
	{foreach $listWidgetTabItems as $key=>$item}	
	<div class="slide light-bg">
	<div class="slide-inner padding">
	{if $listingType=='combo'}
	{if !empty($item['products'])}
		<div class="combo-products-items txt-c bpbrc">
		
			<h5 class="combo-item-head ">{$item['combo_title']}
                 {html->anchor href="product/comboProduct/id/{$item['combo_id']}" popuptype='iframe'  framewidth="825" frameheight="520" class="openModalPopup item-count" content="{$item['products']|count} {$language.lblItems}"}
                
            </h5>
           
            <ul class="combo-item-slider">
			{assign var="totalAmount" value="0"}
			{assign var="comboOfferAmount" value="0"}
			{foreach $item['products'] as $key=>$product}
			{assign var="totalAmount" value=$totalAmount+$product['sales_price'] }
			{assign var="comboOfferAmount" value=$comboOfferAmount+$product['comboPrice']}
				{if $key>3}
				{else}
				<li > 
					<img src='{$view_public_path}/uploads/catalog/product/small/{$product.productImage}'  alt='img' >
					{*{$product['productTitle']}
					<div class="price">
					
					{$product['offerPrice']|price}
					</div>*}
				</li>
				{/if}
			{/foreach}
			</ul>
			<div class="price-section ">
			<span class="fade-txt">{$language.lblSave}
			{assign var="saveAmt" value =$totalAmount-$comboOfferAmount}
		   {$saveAmt|price}
		   </span>
			<big class="bpfc fnt-bld">&nbsp; {$comboOfferAmount|price}</big><br />
			{html->anchor href="product/comboProduct/id/{$item['combo_id']}" popuptype='iframe'  framewidth="825" frameheight="520" class="openModalPopup btn btn-primary btn-sm" content="{$language.lblBuyNow}"}
			</div>
		</div>
	{/if}
	{else}	
		{if $listingType!="auction"}
		  <div class="pdtOptions text-center">

			{if isset($item['itemFeaturedStatus']) && $item['itemFeaturedStatus']=='Yes'}
					 <span class='featured pull-left'>{$language.lblFeatured|upper}</span>
			{/if}
			</div>
		{/if}
		<figure class="text-center">
		{assign var="originCatalogID" value=$originCatalogID|default:''}
			{if isset( $item['jerseyImage']) &&  $item['jerseyImage']!=''}
				{assign var="image" value="{$view_public_path}/uploads/{$item['jerseyImage']}"}
			{else if isset( $item['itemIcon']) &&  $item['itemIcon']!=''}
				{assign var="image" value="{$view_public_path}/uploads/{$item['itemIcon']}"}
			{else}
				{assign var="image" value="{$view_images}/not-av-img.gif"}
			{/if}
			{if $listingType=="brands"}
				{html->anchor  href="/brand/{$item.itemKey}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" content="<img src='{$image}' width='150' height='75' class='img-responsive' alt='{$item['itemName']|truncate:35}' title='{$item['itemName']|truncate:35}'/>" }
			{else if $listingType=='categories'}
				{html->anchor  href="catalog/index/category/{$item.itemKey}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}"  content="<img src='{$image}' width='{$category_image_width}' height='{$category_image_height}' class='img-responsive' alt='{$item['itemName']|truncate:35}' title='{$item['itemName']|truncate:35}'/>" }
			{else if $listingType=='teams'}
               {assign var="team_url" value=$item.itemID|sef_path:'team'}
               {if $team_url==''}{assign var="team_url" value='catalog/index/team/'|cat:{$item.itemKey}|cat:'/'}{/if}
				{html->anchor  href="{$team_url}"  target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" content="<img src='{$image}' width='{$category_image_width}' height='{$category_image_height}' class='img-responsive' alt='{$item['itemName']|truncate:35}' title='{$item['itemName']|truncate:35}'/>" }
			{else}

				{html->anchor  target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}"  href="{$item.itemID|sef_path:'product'}" content="<img src='{$image}' width='{$thumb_width}' height='{$thumb_height}' class='img-responsive' alt='{$item['itemName']|truncate:35}' title='{$item['itemName']|truncate:35}'/>" }

			{/if}
		</figure>
		<div class="product-info-block {if $showItemLabel=='Yes'}show-label{/if}">
		{if $item.itemDiscount|default:0!='' && $item.itemDiscount|default:0 >=1}
				<div class="discount ">
				{$item.itemDiscount}%
				<span>{$language.lblOff|upper}</span></div>
			{/if}
		{if $showItemLabel=="Yes"}
			{if $listingType=='brands'}
				<h6>
				{html->anchor  href="/brand/{$item.itemKey}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" content="{$item['itemName']|truncate:35}" }
				</h6>
			{else if $listingType=='categories'}
				<h6>{html->anchor  href="catalog/index/category/{$item.itemKey}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" content="{$item['itemName']|truncate:35}
				"}
				</h6>
			{else if $listingType=='teams'}
			<h6>{html->anchor  href="{$team_url}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" title="{$item['itemName']}" content="{$item['itemName']}
				"}
			</h6>
			{else}
			<h6>{html->anchor  href="{$item.itemID|sef_path:'product'}" target="{if $widgetDisplayedOn eq 'facebook'}blank{/if}" content="{$item['itemName']|truncate:40}
			  "}
			</h6>
			{/if}
		{/if}
		{if isset($item['itemPrice']) && $item['itemPrice']!=''}
		<p>
			{if $item['itemRegularPrice'] != $item['itemPrice']}
				<del>{$item['itemRegularPrice']|default:''|price}</del>
			{/if}
			<strong class="bpfc">{$item['itemPrice']|default:''|price}</strong>
			</p>
		{/if}
		</div>
	{/if}
	</div>	
	</div>	
	{assign var="index" value=$index+1}
	{/foreach}
   </div>
   
<script type="text/javascript">

var slider_{$uniqueID};
var NminSlides_{$uniqueID} = 2;
var NmaxSlides_{$uniqueID} = 2;
var NslideWidth_{$uniqueID} = 0; 

$(document).ready(function() {

if($(".AjaxDealTimerNew_{$widgetTabID}").length>0){
	$(".AjaxDealTimerNew_{$widgetTabID}").each(function() {
		var product_id = $(this).attr("rel");
		$.setCounter($(this), product_id);
	}); 
}
setWidgetSlider();
$('.AjaxDealTimerNew').each(function() {

	var product_id = $(this).attr("rel");
	setCounter($(this), product_id);
});


$(window).resize(function() {
	setWidgetSliderNo_{$uniqueID}();
	slider_{$uniqueID}.reloadSlider({ 
		//controls:false, 
		infiniteLoop: false,
		hideControlOnEnd: true,
		auto: false,
		pager: false,
		maxSlides: NmaxSlides_{$uniqueID},
		minSlides: NminSlides_{$uniqueID},
		slideWidth: NslideWidth_{$uniqueID},
		slideMargin: 1,
		       onSliderLoad: function(){ 
            $(".bx-loading").css("visibility", "hidden");
        }
	});
});

});


function setWidgetSliderNo_{$uniqueID}(){
	{if $listingType == 'combo'}
		if ($(window).width() > 480){
		NslideWidth_{$uniqueID} = 320;  //setting base slider width for combo product sliders
		}
		else
		{
			NslideWidth_{$uniqueID} = 0;
			}
    {else}
		if ($(window).width() > 400){
	    NslideWidth_{$uniqueID} = 260; //setting base slider width for all other sliders
		}
		else
		{
			NslideWidth_{$uniqueID} = 200;
			}
	{/if}
 if ($(window).width() <= 480) {
	{if $listingType == 'brands'}
		NminSlides_{$uniqueID} = 2;
	 	NmaxSlides_{$uniqueID} = 2;
	{else if $listingType == 'categories'}
		NminSlides_{$uniqueID} = 2;
	 	NmaxSlides_{$uniqueID} = 3;
	
	{else if $listingType == 'combo'}
		NminSlides_{$uniqueID} = 1;
	 	NmaxSlides_{$uniqueID} = 1;
		//NslideWidth_{$uniqueID} = 321; //448
	{else}
		NminSlides_{$uniqueID} = 2;
	 	NmaxSlides_{$uniqueID} = 2;
	{/if}
}

else if ($(window).width() <= 680) 
	{
		{if $listingType == 'brands'}
			NminSlides_{$uniqueID} = 3;
			NmaxSlides_{$uniqueID} = 3;
		{else if $listingType == 'categories'}
			NminSlides_{$uniqueID} = 3;
			NmaxSlides_{$uniqueID} = 3;
		{else if $listingType == 'auction'}
            NminSlides_{$uniqueID} = 1;
            NmaxSlides_{$uniqueID} = 1;
            NslideWidth_{$uniqueID} = 300;
		{else if $listingType == 'combo'}
			NminSlides_{$uniqueID} = 2;
			NmaxSlides_{$uniqueID} = 2;
			//NslideWidth_{$uniqueID} = 321;
		{else}
			NminSlides_{$uniqueID} = 3;
			NmaxSlides_{$uniqueID} = 3;
		{/if}
	}
    
	else if ($(window).width() <= 1000) 
		{
			 {if $listingType == 'brands'}
				{if $widgetDisplayedOn == 'menu'}
					NminSlides_{$uniqueID} = 3;
					NmaxSlides_{$uniqueID} = 3;
				{else}
					NminSlides_{$uniqueID} = 4;
					NmaxSlides_{$uniqueID} = 4;
				{/if}
			{else if $listingType == 'categories'}
				NminSlides_{$uniqueID} = 4;
				NmaxSlides_{$uniqueID} = 4;
		
			{else if $listingType == 'combo'}
				NminSlides_{$uniqueID} = 3;
				NmaxSlides_{$uniqueID} = 3;
				//NslideWidth_{$uniqueID} = 230;
			{else}
				NminSlides_{$uniqueID} = 4;
				NmaxSlides_{$uniqueID} = 4;
			{/if}
		}
				else if ($(window).width() <= 1200) 
					{
						{if $listingType == 'brands'}
						{if $widgetDisplayedOn == 'menu'}
							NminSlides_{$uniqueID} = 4;
							NmaxSlides_{$uniqueID} = 4;
						{else}
							NminSlides_{$uniqueID} = 6;
							NmaxSlides_{$uniqueID} = 6;
						{/if}
						{else if $listingType == 'categories'}
							NminSlides_{$uniqueID} = 5;
							NmaxSlides_{$uniqueID} = 5;
	
						{else if $listingType == 'combo'}
							NminSlides_{$uniqueID} = 4;
							NmaxSlides_{$uniqueID} = 4;
							//NslideWidth_{$uniqueID} = 310;
						{else}
							{if $widgetDisplayedOn == 'menu'}
								NminSlides_{$uniqueID} = 4;
								NmaxSlides_{$uniqueID} = 4;
							{else}
								NminSlides_{$uniqueID} = 5;
								NmaxSlides_{$uniqueID} = 5;
							{/if}
						{/if}
					}
					else 
					{
						{if $listingType == 'brands'}
							{if $widgetDisplayedOn == 'menu'}
								NminSlides_{$uniqueID} = 4;
								NmaxSlides_{$uniqueID} = 4;
							{else}
								NminSlides_{$uniqueID} = 7;
								NmaxSlides_{$uniqueID} = 7;
							{/if}
						{else if $listingType == 'categories'}
							NminSlides_{$uniqueID} = 5;
							NmaxSlides_{$uniqueID} = 5;
						{else if $listingType == 'auction'}
                            NminSlides_{$uniqueID} = 4;
                            NmaxSlides_{$uniqueID} = 4; 
						{else if $listingType == 'combo'}
							NminSlides_{$uniqueID} = 4;
							NmaxSlides_{$uniqueID} = 4;
							//NslideWidth_{$uniqueID} = 320;
						{else}
							{if $widgetDisplayedOn == 'menu'}
								NminSlides_{$uniqueID} = 5;
								NmaxSlides_{$uniqueID} = 5;
							{else}
								NminSlides_{$uniqueID} = 6;
								NmaxSlides_{$uniqueID} = 6;
							{/if}
						{/if}
					}
}

function setWidgetSlider() {
setWidgetSliderNo_{$uniqueID}();

	slider_{$uniqueID} = $('.wdgt-slider_{$uniqueID}').bxSlider({
		//controls:false, 
		infiniteLoop: false,
		hideControlOnEnd: true,
		auto: false,
		pager: false,
		maxSlides: NmaxSlides_{$uniqueID},
		minSlides: NminSlides_{$uniqueID},
		slideWidth: NslideWidth_{$uniqueID},
		slideMargin: 1, 
		});

}

</script>

{/if}
</div>


	 {/foreach}
	</div>
 {if $widgetType eq 'static'}	
          <script type="text/javascript" src="{$view_javascript}/slick.js"></script>

	<script type="text/javascript">
    if ($('.category-static').length > 0) {
        $('.category-static').not('.slick-initialized').slick({
          dots: false,
          infinite: false,
          speed: 300,
          slidesToShow: 5,
          slidesToScroll: 5,
          responsive: [
            {
              breakpoint: 1024,
              settings: {
                slidesToShow: 4,
                slidesToScroll: 4,
                infinite: true,
                dots: true
              }
            },
            {
              breakpoint: 600,
              settings: {
                slidesToShow: 3,
                slidesToScroll: 3
              }
            }
              ,
            {
              breakpoint: 500,
              settings: {
                slidesToShow: 2,
                slidesToScroll: 2
              }
            }
            // You can unslick at a given breakpoint now by adding:
            // settings: "unslick"
            // instead of a settings object
          ]
        });
               
        }
            if ($('.brand-static').length > 0) { 
                $('.brand-static').not('.slick-initialized').slick({
                  dots: false,
                  infinite: false,
                  speed: 300,
                  slidesToShow: 12,
                  slidesToScroll: 12,
                  responsive: [
                    {
                      breakpoint: 1024,
                      settings: {
                        slidesToShow: 8,
                        slidesToScroll: 8,
                        infinite: true,
                        dots: true
                      }
                    },
                    {
                      breakpoint: 600,
                      settings: {
                        slidesToShow: 4,
                        slidesToScroll: 4
                      }
                    }
                      ,
                    {
                      breakpoint: 500,
                      settings: {
                        slidesToShow: 3,
                        slidesToScroll: 3
                      }
                    }
                    // You can unslick at a given breakpoint now by adding:
                    // settings: "unslick"
                    // instead of a settings object
                  ]
                });
            }
        </script>

        {/if}
{/if}
