<?php
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('lz_fitness_testimonials_section_disable') != 'on' ){ ?>
<section id="testimonials-section" class="ht-section lz-testimonials-section"> 
	<div class="lightbox">
	<div class="container">	
		<?php
		$lz_fitness_testimonials_title = get_theme_mod('lz_fitness_testimonials_title', 'CLIENT’s TESTIMONIALS');
		
		?>
		

		<div class="testimonials-member-wrap">
			
				<div class="ht-section-title-tagline">
				<h2 class="testimonial-heading ht-section-title"><?php if(!empty($lz_fitness_testimonials_title)) { echo esc_html($lz_fitness_testimonials_title);}?></h2>
			   </div>
				
			</div>
			
			<div class="col-md-10 col-md-offset-1" data-wow-delay="0.5s">		
	            <div class="carousel slide" data-ride="carousel" id="quote-carousel">
					
					<?php
					$showStatic = true;
					$testimonialTxt = '';
					$counter = -1 ;
					?>
                    <!-- Bottom Carousel Indicators -->
                    <ol class="carousel-indicators">
	                	<?php
						for( $i = 1; $i < 5; $i++ ){
							$lz_fitness_testimonials_page_id = get_theme_mod('lz_fitness_testimonials_page'.$i); 
							$lz_fitness_testimonials_page_icon = get_theme_mod('lz_fitness_testimonials_page_icon'.$i);
							if(get_post_status($lz_fitness_testimonials_page_id) != 'publish'){
								continue;
							}else{
								++$counter;
							}
							if($lz_fitness_testimonials_page_id){
								$showStatic = false;
								$testimonialTxt .= testimonialShortCode($lz_fitness_testimonials_page_id, $isCustomizer=false, $counter);
							}
							$lz_fitness_image = wp_get_attachment_image_src(get_post_meta( $lz_fitness_testimonials_page_id, '_thumbnail_id', true ),'total-team-thumb');
							if($showStatic == false && !empty($lz_fitness_image[0])){
							?>
							<li data-target="#quote-carousel" data-slide-to="<?php echo $counter;?>" <?php if($i==1){?>class="active"<?php }?>></li>
							<?php } 
		                	if(empty($lz_fitness_image[0]) && !empty($lz_fitness_testimonials_page_id)){?>
		                		<li data-target="#quote-carousel" data-slide-to="<?php echo $counter;?>" <?php if($i==0){?>class="active"<?php }?>><img class="img-responsive " src="<?php echo get_template_directory_uri(); ?>/images/team-thumb.png" alt="">
                            	</li>
		                	<?php }
	                	}

	                	if($showStatic === true){
	                		for($i=0;$i<=1;$i++){?>
                            	<li data-target="#quote-carousel" data-slide-to="<?php echo $i;?>" <?php if($i==0){?>class="active"<?php }?>><img class="img-responsive " src="<?php //echo get_template_directory_uri(); ?>/images/team-thumb.png" alt="">
                            	</li>
                            <?php }
	                	}
	                	?>
					</ol>
			  		<!-- Carousel items -->
                    <!-- Carousel Slides / Quotes -->
                    <div class="carousel-inner">
						<?php 
						echo $testimonialTxt;
						if($showStatic == true){
							for($i=0;$i<=1;$i++){?>
                                <div class="item <?php if($i==0){?>active<?php }?>"> 
                                        <div class="row">
					<div class="col-md-3 col-md-offset-1 team-thumb">
					<img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/titem.jpg" alt="">											
			</div>
				<div class="col-md-8 testimonial-content">
					<h6 class="secondry-text">Jhohn Smit <span>( furniture client )</span></h6>
					
					<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries.</p>                                     
				</div>
                                        </div>
                                </div>
								
                            <?php }
						}
						?>
					</div>
                  
                </div>
            </div>

			<div class="clearfix"></div>
		  	<!-- Carousel items -->
		</div>

	<div class="clearfix"></div>
	</div>
		<div class="clearfix"></div>
</div>
</div>
</section>
<?php }