<?php  
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('lz_fitness_services_section_disable') != 'on' ){?>
	<section id="services-post-section" class="ht-section">
		<div class="container">
			<div class="wow fadeInUp" data-wow-duration="1s">
				<?php
				$showStatic = true;
				for( $i = 1; $i < 17; $i++ ){
					$url = get_theme_mod('lz_fitness_services_page_url_'.$i, '#');
$link = get_theme_mod('lz_fitness_services_page_link'.$i);
					$lz_fitness_services_page_id = get_theme_mod('lz_fitness_services_page_icon'.$i); 
					if(!empty($lz_fitness_services_page_id)){
						$showStatic = false;
						break;
					}
				}
				$lz_fitness_services_title = get_theme_mod('lz_fitness_services_title', 'Benefits of Meditation');
			 //$lz_fitness_services_sub_title = get_theme_mod('lz_fitness_services_sub_title', 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.');
				?>
				<div class="row">
					<div class="ht-section-title-tagline">
						<h2 class="ht-section-title lz-services-Post-heading">
							<?php
							if(!empty($lz_fitness_services_title))	{
								echo ($lz_fitness_services_title);
							} ?>
						</h2> 
						<div class="clearfix"></div>
						<!-- <div class="col-md-6 col-md-offset-3 lz-services-subheading">
							<?php //
							//if(!empty($lz_fitness_services_sub_title))	{
								//echo ($lz_fitness_services_sub_title);
							//} ?>
						</div> -->
						<div class="clearfix"></div> 
					</div>
					<div class="clearfix"></div>
				</div>
				<div class="row">
					<div class="services-post-wrap">
						<?php
						$cols = get_theme_mod('lz_fitness_services_npp_count', 7);
						$cols++;
						// echo '$cold: '.$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:
							case 5:
							case 6:
							case 9:
							case 15:
							$colCls = 'col-md-4 col-sm-6 col-xs-12';
							break;
							case 4:
							case 7:
							case 8:
							case 10:
							case 11:
							case 12:
							case 13:
							case 14:
							case 16:
							$colCls = 'col-md-3 col-sm-6 col-xs-12';
							break;
							default:
							$colCls = 'col-md-3 col-sm-6 col-xs-12';
							break;
						}
						$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
						?>
						<div class="row services-post-boxes httitlewrap">
							<?php
							for( $i = 1; $i <= $cols; $i++ ){
								if($showStatic === false){
$url = get_theme_mod('lz_fitness_services_page_url_'.$i, '#');
									$lz_fitness_services_page_title = get_theme_mod('lz_fitness_services_page_title'.$i, 'Promotes Emotional Health');
									//$lz_fitness_services_page_description = get_theme_mod('lz_fitness_services_page_description'.$i, 'There are many variations of passages Lorem available, majority.');
									$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_icon){

										?>
										<div class="<?php echo $colCls;?> padding10">
											<div class="services-post ">
												<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
														<img src="<?php echo esc_url($lz_fitness_services_page_icon); ?>" class="img-responsive" />
														
											</a>
													<div class="services-data ">
														<h3 class="post-title"><?php echo $lz_fitness_services_page_title; ?></h3>
														<!-- <p class="description"><?php// echo $lz_fitness_services_page_description; ?></p> -->
													</div>
													<div class="clearfix"></div>
												</div>
											</div>
											<?php

										}
									}else{?>
										<div class="<?php echo $colCls;?> padding10">
											<div class="services-post">
												<a href="">
												<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/meditation2.jpg" class="img-responsive" />
												</a>

												<div class="services-data">
													<h3 class="post-title">Promotes Emotional Health</h3>
												</div>
												<div class="clearfix"></div>						
											</div>
										</div>
									<?php }

								}?>

								<div class="clearfix"></div>
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
				</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 }