<?php /* Smarty version Smarty-3.1.8, created on 2023-11-24 12:17:50
         compiled from "/home/agmc/beta/application/core/views/frontend/mini/catalog/default/ProductImages.tpl" */ ?>
<?php /*%%SmartyHeaderCode:33083781665605c2e79bd16-31137611%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '47ecc9343883ab47b9327107373fccf64423e344' => 
    array (
      0 => '/home/agmc/beta/application/core/views/frontend/mini/catalog/default/ProductImages.tpl',
      1 => 1605520856,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '33083781665605c2e79bd16-31137611',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'defProductImage' => 0,
    'productImages' => 0,
    'type' => 0,
    'view_public_path' => 0,
    'language' => 0,
    'imageCount' => 0,
    'image' => 0,
    'key' => 0,
    'freeProductsCount' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.8',
  'unifunc' => 'content_65605c2e80b8e2_11096487',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_65605c2e80b8e2_11096487')) {function content_65605c2e80b8e2_11096487($_smarty_tpl) {?><?php if ($_smarty_tpl->tpl_vars['defProductImage']->value!=''){?>
<?php $_smarty_tpl->tpl_vars["imageCount"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['productImages']->value)+1, null, 0);?>
<?php }else{ ?>
<?php $_smarty_tpl->tpl_vars["imageCount"] = new Smarty_variable(count($_smarty_tpl->tpl_vars['productImages']->value), null, 0);?>
<?php }?> 
<?php if ((($tmp = @$_smarty_tpl->tpl_vars['type']->value)===null||$tmp==='' ? '' : $tmp)=='combination'){?>
<div class="img-slider slip mb-4"> 
    <?php echo $_smarty_tpl->getSubTemplate ("catalog/default/FreeGift.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?>

	<?php if (count($_smarty_tpl->tpl_vars['productImages']->value)>0){?>
		<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product-combination/preview/<?php echo $_smarty_tpl->tpl_vars['productImages']->value[0]['productImage'];?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product-combination/large/<?php echo $_smarty_tpl->tpl_vars['productImages']->value[0]['productImage'];?>
" class="img-fluid"/>
	<?php }else{ ?>
		<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="img-fluid"/>
	<?php }?>
     <div class="py-2 d-block d-md-none"><span class="tap-img"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblDoubleTapimagetoZoom'];?>
</span></div>
     
    </div>
     <?php if ($_smarty_tpl->tpl_vars['imageCount']->value>1){?>


    <div class="thumb-view mt-3 mx-4">
         <?php if (count($_smarty_tpl->tpl_vars['productImages']->value)>3){?>
        <a href="javascript:void(0);" class="prev-slider icon-left-arrow arrow"></a>
        <?php }?>
			<div class="overview clearfix" id="slider1">
				<?php if (count($_smarty_tpl->tpl_vars['productImages']->value)>0){?>
					<?php  $_smarty_tpl->tpl_vars['image'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['image']->_loop = false;
 $_smarty_tpl->tpl_vars["key"] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['productImages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['image']->key => $_smarty_tpl->tpl_vars['image']->value){
$_smarty_tpl->tpl_vars['image']->_loop = true;
 $_smarty_tpl->tpl_vars["key"]->value = $_smarty_tpl->tpl_vars['image']->key;
?>
						<div class="thumb px-1">
							<a href="#" data-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product-combination/preview/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product-combination/large/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
" <?php if ($_smarty_tpl->tpl_vars['key']->value==0){?>class="border-secondary border p-1 d-block"<?php }?>>
								<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product-combination/small/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
" class="img-fluid" />
							</a>
						</div>
					<?php } ?>
					<?php if ($_smarty_tpl->tpl_vars['defProductImage']->value!=''){?>
						<div class="thumb px-1">
							<a href="#" data-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="border p-1 d-block">
								<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/small/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
"   class="img-fluid"/>
							</a>
						</div>
					<?php }?>
				<?php }else{ ?>
					<div class="thumb px-1">
						<a href="#" data-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="border p-1 d-block">
							<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/small/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="img-fluid" />
						</a>
					</div>
				<?php }?>
			</div>
         <?php if (count($_smarty_tpl->tpl_vars['productImages']->value)>3){?>
        <a href="javascript:void(0);" class="next-slider icon-right arrow"></a>
        <?php }?>
    </div>
    <?php }?>
   
<?php }else{ ?>
<div class="img-slider position-relative">
          <?php if ($_smarty_tpl->tpl_vars['freeProductsCount']->value>0){?>
                            <div class="free-gift"><i class="icon-gift"></i> <span class="hidden-xs"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblFreeGift'];?>
</span></div>
                        <?php }?>
	<?php if ($_smarty_tpl->tpl_vars['defProductImage']->value!=''){?>
		<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="img-fluid" />
	<?php }else{ ?>
		<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['productImages']->value[0]['productImage'];?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['productImages']->value[0]['productImage'];?>
" class="img-fluid" />
	<?php }?>
    <div class="py-2 d-block d-md-none">
    <span class="tap-img"><?php echo $_smarty_tpl->tpl_vars['language']->value['lblDoubleTapimagetoZoom'];?>
</span>
    <a href="javascript:void(0);" class="close-img font-bold"> <span class="icon-cross-medium"></span></a>
    </div>
     
    </div>
     <?php if ($_smarty_tpl->tpl_vars['imageCount']->value>1){?>
     <div class="thumb-view mt-3 mx-4">
			<div class="overview clearfix" id="slider1">
				<?php if ($_smarty_tpl->tpl_vars['defProductImage']->value!=''){?>
					<div class="thumb px-1">
						<a href="#" data-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="border-secondary border d-block p-1">
							<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/small/<?php echo $_smarty_tpl->tpl_vars['defProductImage']->value;?>
" class="img-fluid"  />
						</a>
					</div>
				<?php }?>
				<?php if (count($_smarty_tpl->tpl_vars['productImages']->value)>0){?>
					<?php  $_smarty_tpl->tpl_vars['image'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['image']->_loop = false;
 $_smarty_tpl->tpl_vars["key"] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['productImages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['image']->key => $_smarty_tpl->tpl_vars['image']->value){
$_smarty_tpl->tpl_vars['image']->_loop = true;
 $_smarty_tpl->tpl_vars["key"]->value = $_smarty_tpl->tpl_vars['image']->key;
?>
						<div class="thumb px-1">
						<a href="#" data-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/preview/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
" data-zoom-image="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/large/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
" class="border d-block p-1" >
							<img id="img_01" src="<?php echo $_smarty_tpl->tpl_vars['view_public_path']->value;?>
/uploads/catalog/product/small/<?php echo $_smarty_tpl->tpl_vars['image']->value['productImage'];?>
"  class="img-fluid" />
						</a>
					</div>
					<?php } ?>
				<?php }?>
			</div>
    </div>
    <?php }?>
<?php }?>	
<?php echo $_smarty_tpl->getSubTemplate ('catalog/default/freeGiftProduct.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0); ?>

	<script type="text/javascript">
	$(".zoomContainer").remove();
	
		$(document).ready(function(){
                $('#slider1').slick({
                infinite: false,
                dots: false,
	            speed: 700,
                 prevArrow: '<span class="slick-arrow  slick-prev icon-arrow-bold-left"></span>',
                 nextArrow: '<span class="slick-next slick-arrow icon-arrow-bold-right"></span>', 
		      	slidesToShow: 5,
				slidesToScroll: 5,
				responsive: [
				    {
				      breakpoint: 600,
				      settings: {
				        slidesToShow: 3,
				        slidesToScroll: 3
				      }
				    },
			  	]
            });  
                
	        
			if (window.matchMedia('(min-width: 992px)').matches){
				$("#img_01").bind("click", function(e){ 
					var ez =   $('#img_01').data('elevateZoom');	
					$.fancybox(ez.getGalleryList());
					return false;
				});                                
                                
                                if(direction=='rtl') {
                                    
                                    $("#img_01").elevateZoom({
                                  gallery:'slider1',
                                  cursor: 'pointer',
                                  easing : true,
                                  slidesToScroll: 5,    
                                  zoomWindowFadeIn: 500,
                                  zoomWindowFadeOut: 500,
                                  lensFadeIn: 500,
                                  lensFadeOut: 500, 
                                  zoomWindowWidth:500,
                                  zoomWindowHeight:500,
                                  zoomWindowPosition: 11, 
                                  zoomWindowOffetx: -20,
                                  borderSize: 1,    
                                  galleryActiveClass: 'border-secondary'

                              });  
                                } else {
                                    
                                    $("#img_01").elevateZoom({
                                  gallery:'slider1',
                                  cursor: 'pointer',
                                  easing : true,
                                  slidesToScroll: 4,    
                                  zoomWindowFadeIn: 500,
                                  zoomWindowFadeOut: 500,
                                  lensFadeIn: 500,
                                  lensFadeOut: 500, 
                                  zoomWindowWidth:500,
                                  zoomWindowHeight:500,
                                  zoomWindowPosition: 1, 
                                  zoomWindowOffetx:30,
                                  borderSize: 1,    
                                  galleryActiveClass: 'border-secondary'

                              });  
                                }

			}
            else if (window.matchMedia('(min-width: 768px)').matches){
                $("#img_01").bind("click", function(e){ 
					var ez =   $('#img_01').data('elevateZoom');	
					$.fancybox(ez.getGalleryList());
					return false;
				});                                
              $("#img_01").elevateZoom({
                          gallery:'slider1',
                      cursor: 'pointer',
                      easing : true,
                      zoomType: "inner",
                      galleryActiveClass: 'border-secondary'

                  });  
                               
            }
            else{
                $("#img_01").bind("click", function(e){ 
					var ez =   $('#img_01').data('elevateZoom');
				});
                $(".img-slider").doubletap(function() {
                    $(".pordSlider-inner").addClass("zoom-img");
                    $("body").css("overflow","hidden");
                    $("#img_01").elevateZoom({
                      gallery:'slider1',
                      cursor: 'pointer',
                      easing : true,
                      zoomType: "inner",
                      galleryActiveClass: 'border-secondary'
                    });  
                    $("#slider1 .icon-left-arrow ").trigger( "click" );
                    
                });
                $(".close-img").click(function() {
                    $(".pordSlider-inner").removeClass("zoom-img");
                    $(".zoomContainer").remove();
                    $("body").css("overflow","");
                    $("#slider1 .icon-left-arrow ").trigger( "click" );
                });
                $("#slider1 a").click(function() {
                    var link = $(this);
                    if( ! $(".pordSlider-inner").hasClass("zoom-img")){
                        $(".pordSlider-inner").addClass("zoom-img");
                        $("body").css("overflow","hidden");
                        $("#img_01").elevateZoom({
                          gallery:'slider1',
                          cursor: 'pointer',
                          easing : true,
                          zoomType: "inner",
                          galleryActiveClass: 'border-secondary'
                        });
                       
                        setTimeout(function() {
                            link.trigger( "click" );
                        }, 500);
                        
                    }
                });
            }
            
//            $(".thumb-view  .prev-slider").on( "click", function() {
//                $("#slider1 .icon-left-arrow ").trigger( "click" );
//            });
//            $(".thumb-view .next-slider").on( "click", function() {
//                $("#slider1 .icon-right ").trigger( "click" );
//            });
            
		});
		
	</script>

<?php }} ?>