<?php
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('lz_fitness_service_section_disable') != 'on' ){ ?>
<section id="services-post-section" class="ht-section">
	
		<?php
		// echo "post id: ". 
		$lz_fitness_services_page_id = get_theme_mod('lz_fitness_services_page');	
		  // echo '<br>title '.		
		$lz_fitness_services_title = get_theme_mod('lz_fitness_services_title', 'Our Services');
		?>
		<div class="container">
		<?php if( $lz_fitness_services_title){ ?>
			<div class="ht-section-title-tagline">
				<?php if($lz_fitness_services_title){ ?>
				<h2 class="ht-section-title lz-services-Post-heading"><?php echo($lz_fitness_services_title); ?></h2>
				<?php } ?>
			</div>
		<?php } ?>
		<div class="clearfix"></div>
	</div>
	<div class="container">
	<!-- <div class="ht-team-member-wrap ht-clearfix"> -->
		<?php 
		$showStatic = true;
		$cols = get_theme_mod('lz_fitness_services_npp_count', 2);
		$cols++;
		switch($cols){
			case 1:
			$colCls = 'col-md-12 col-sm-12';
			break;
			case 2:
			$colCls = 'col-md-6 col-sm-6';
			break;
			case 4:
			case 8:
			case 7:
			case 10:
			case 11:
			case 12:
			$colCls = 'col-md-3 col-sm-6';
			break;
			default: 
			$colCls = 'col-md-4 col-sm-6';
			break;
		}
		for( $i = 1; $i <= $cols; $i++ ){
			$lz_fitness_services_page_id = get_theme_mod('lz_fitness_services_page'.$i); 
			$lz_fitness_services_page_icon = get_theme_mod('lz_fitness_services_page_icon'.$i);
			if($lz_fitness_services_page_id){
				$showStatic = false;
				echo servicesShortCode($lz_fitness_services_page_id, $isCustomizer=true, $i);
			}
		}
		// adding the static content
		if($showStatic === true){
			for( $i = 1; $i <= $cols; $i++ ){ ?>
			<div class="<?php echo $colCls;?>">
				<div service-match-height="groupName" class="services-post servpost text-center">
					<div class="services-icon">
					<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/nothumb-related.png" class="img-responsive" />
					</div>
					<div class="services-data text-center">
						<h5>Commercial Equipment</h5>
						<div class="services-excerpt">
							Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla a Lorem ipsum dolor sit amet, consectetur adipiscing elit.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla a Lorem ipsum dolor sit amet, consectetur adipiscing elit.
						</div>										
						<div class="services-readmore">
							<a class="btn" href="#"> Read More </a>
						</div>
					</div>
					<div class="clearfix"></div>												
				</div>			 
			</div>
			<?php 
			}
		} ?>
	<div class="clearfix"></div>
	</div>	
	<div class="clearfix"></div>
</section>
<script>
	jQuery.noConflict();
	$(function(){
		function servicesdataHeight(){
			var ht = 0;
			$('#services-post-section .services-data').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#services-post-section .services-data').height(ht+'px');
		}
		servicesdataHeight();
	});
	$( window ).resize(function(){
		servicesdataHeight();
	});
</script>
<?php }