<?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', 'TESTIMONIALS'); 
$lz_fitness_testimonials_sub_title = get_theme_mod('lz_fitness_testimonials_sub_title', 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.');
?>


<div class="testimonials-member-wrap"> 
<!--<div class="ht-section-title-tagline">-->
<div class="ht-section-title-tagline">
<h2 class="testimonial-heading ht-section-title"><?php if(!empty($lz_fitness_testimonials_title)) { echo ($lz_fitness_testimonials_title);}?></h2>
<div class="clearfix"></div>
<div class="col-md-6 col-md-offset-3 lz-testimonials-text"><?php if(!empty($lz_fitness_testimonials_sub_title)){echo esc_html($lz_fitness_testimonials_sub_title);}?></div>
<div class="clearfix"></div>
</div>

<div class="clearfix"></div>
</div>
<!-- Carousel slider -->
	 <!-- Carousel 
<div class="nextbutton">
	<a data-slide="prev" href="#quote-carousel" class="left carousel-control"><i class="fa fa-chevron-left"></i></a>
	<a data-slide="next" href="#quote-carousel" class="right carousel-control"><i class="fa fa-chevron-right"></i></a>
</div>Buttons Next/Prev -->
<div class="container" 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="team-thumb text-center">
								<img class="img-responsive" src="<?php echo get_template_directory_uri(); ?>/images/titem.jpg" alt="">											
							</div>
								<div class="col-md-12 testimonial-content">
									
									<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard Mlintck, a Latin professor at Hampden Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, fromem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. There are many variations of passages of Lorem Ipsum available, but majority have suffered alteration in some form, by injected humou.</p>                                     
								</div>
								
                        </div>
                        
                </div>
				
            <?php }
		}
		?>
	</div>
     <!-- Carousel Buttons Next/Prev --> 
	<div class="nextbutton">
    <a data-slide="prev" href="#quote-carousel" class="left carousel-control"><i class="fa fa-chevron-left"></i></a>
    <a data-slide="next" href="#quote-carousel" class="right carousel-control"><i class="fa fa-chevron-right"></i></a>
	</div>
</div>
</div>

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

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