{if $defProductImage !=''}
{assign var="imageCount" value=$productImages|count+1}
{else}
{assign var="imageCount" value=$productImages|count}
{/if} 
{if $type|default:'' =='combination'}
<div class="img-slider ">
			<div class="overview clearfix" id="slider1">
				{if $defProductImage !=''}
				
			 			<a rel="gallery" href="{$view_public_path}/uploads/catalog/product/large/{$defProductImage}" class="active" data-fancybox-group="gallery-1">
							<img id="img_01" src="{$view_public_path}/uploads/catalog/product/preview/{$defProductImage}" alt="image" class="img-responsive" />
						</a>
				
				{/if}
				{if $productImages|count>0}
               
					{foreach $productImages as $image key="key"}
			
						<a rel="gallery" href="{$view_public_path}/uploads/catalog/product/large/{$image['productImage']}"  data-fancybox-group="gallery-1" class="active" >
							<img id="img_01" src="{$view_public_path}/uploads/catalog/product/preview/{$image['productImage']}" alt="image" class="img-responsive" />
						</a>
				
					{/foreach}
            
				{/if}
			</ul>
</div>
    </div>
{else}
<div class="img-slider ">
			<div class="overview clearfix" id="slider1">
				{if $defProductImage !=''}
				
			 			<a rel="gallery" href="{$view_public_path}/uploads/catalog/product/large/{$defProductImage}" class="active" data-fancybox-group="gallery-1">
							<img id="img_01" src="{$view_public_path}/uploads/catalog/product/preview/{$defProductImage}" alt="image" class="img-responsive" />
						</a>
				
				{/if}
				{if $productImages|count>0}
               
					{foreach $productImages as $image key="key"}
			
						<a rel="gallery" href="{$view_public_path}/uploads/catalog/product/large/{$image['productImage']}"  data-fancybox-group="gallery-1" class="active" >
							<img id="img_01" src="{$view_public_path}/uploads/catalog/product/preview/{$image['productImage']}" alt="image" class="img-responsive" />
						</a>
				
					{/foreach}
            
				{/if}
			</ul>
</div>
    </div>
{/if}	
	<script type="text/javascript">
		$(document).ready(function(){
{if $imageCount>1}
            $('#slider1').bxSlider({
              minSlides: 1,
              maxSlides: 1,
              pager:false,
              infiniteLoop:false,
              hideControlOnEnd:true,    
              slideWidth: 350,
              slideMargin: 0
            });
{/if}
            
        $('a[rel=gallery]').fancybox();
			
		});
	</script>

