<?php
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('lz_fitness_team_section_disable') != 'on' ){ ?>
<section id="ht-team-section" class="lz-team-section">
	<div class="lightbox">
		<div class="container">
			<?php			
			$lz_fitness_team_title = get_theme_mod('lz_fitness_team_title', 'Our Trainers');
			$lz_fitness_team_sub_title = get_theme_mod('lz_fitness_team_sub_title', 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci Lorem ipsum dolor sit amet.');
			?>
			<?php if( $lz_fitness_team_title || $lz_fitness_team_sub_title ){ ?>
			<div class="row">
				<div class="col-md-12">
					<div class="ht-section-title-tagline">
						<?php if($lz_fitness_team_title){ ?>
						<h2 class="ht-section-title lz-team-heading"><?php echo esc_html($lz_fitness_team_title); ?></h2>
						<?php } ?>
						<?php if($lz_fitness_team_sub_title){ ?>
						<div class="ht-section-tagline lz-team-text"><?php echo esc_html($lz_fitness_team_sub_title); ?></div>
						<?php } ?>
					</div>
				</div>
			</div>
			<?php } ?>
			<div class="row">		
		 
				<?php 
				$showStatic = true;
				$cols = get_theme_mod('lz_fitness_team_npp_count', 3);
				$cols++;
				switch($cols){
					case 1:
						$colCls = 'col-md-12 col-sm-12 col-xs-12';
						break;
					case 2:
						$colCls = 'col-md-6 col-sm-6 col-xs-12';
						break;
					case 3:
						$colCls = 'col-md-4 col-sm-6 col-xs-12';
						break;
					case 4:
						$colCls = 'col-md-3 col-sm-6 col-xs-12';
						break;
					default: 
						$colCls = 'col-md-4 col-sm-6 col-xs-12';
						break;
				}
				for( $i = 1; $i <= $cols; $i++ ){
					$lz_fitness_team_page_id = get_theme_mod('lz_fitness_team_page'.$i); 
					$lz_fitness_team_page_icon = get_theme_mod('lz_fitness_team_page_icon'.$i);
					if($lz_fitness_team_page_id){
						$showStatic = false;
						echo teamShortCode($lz_fitness_team_page_id, $isCustomizer=true, $i);
					}
				}
				// adding the static content
				if($showStatic === true){
					for( $i = 1; $i <= $cols; $i++ ){ ?>
					<div class="<?php echo $colCls;?>">					
						<div class="ht-team-member  paddingBot20 text-center">
							<div class="ht-team-member-image">
								<img class="secondry-bg" src="<?php echo esc_url(get_template_directory_uri().'/images/teamsec1.png');?>" alt="Team" />
							</div>
							<div class="ht-title-wrap">
								<h6 class="member-name">Davide Johan</h6>	
								<div class="ht-team-member-excerpt-wrap">
									<div class="ht-team-member-span">
										<!-- <h6>Team</h6> -->
										<div class="ht-team-designation">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</div>
									
									</div>
								</div>
								<div class="team-member-designation">Gym Trainer</div> 
								<div class="ht-team-social-id">
									<a target="_blank" href="http://facebook.com"><i class="fa fa-facebook"></i></a>
									<a target="_blank" href="http://twitter.com"><i class="fa fa-twitter"></i></a>
									<a target="_blank" href="http://plus.google.com"><i class="fa fa-google-plus"></i></a>
								</div>
							</div>
							<div class="clearfix"></div>
						</div>					
					</div>
					<?php 
					}
				} ?>
			</div>
			<div class="clearfix"></div>
			</div>	
			<div class="clearfix"></div>			
	</div>
	<div class="clearfix"></div>
</section>
<script>
	jQuery.noConflict();
	$(function(){
		function httitlewrapHeight(){
			var ht = 0;
			$('.ht-team-member-span').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('.ht-team-member-span').height(ht+'px');
		}
		httitlewrapHeight();
	});
	$( window ).resize(function(){
		httitlewrapHeight();
	});
</script>
<?php }
