<?php  
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('services_section_disable') != 'on' ){ ?>
<section id="services-post-section" class="ht-section">
	<div class="lightbox">
		<?php
		// echo "post id: ". 
		$services_page_id = get_theme_mod('services_page');	
		  // echo '<br>title '.		
		$services_title = get_theme_mod('services_title', 'We Arrange');
		//$services_sub_title = get_theme_mod('services_sub_title', 'Lorem Ipsum availables, but majority have suffered.');
		?>
		<div class="container">
		<?php if( $services_title || $services_sub_title ){ ?>
		<div class="row">
					<div class="ht-section-title-tagline">
						<h2 class="ht-section-title lz-services-Post-heading">
							<?php
							if(!empty($services_title))	{
								echo ($services_title);
							} ?>
						</h2> 
							<div class="titleicon">	<i class="fa fa-glass" aria-hidden="true"></i>			</div>
						<div class="clearfix"></div> 
					</div>
					<div class="clearfix"></div>
				</div>
		<?php } ?>
		<div class="clearfix"></div>
	</div>
	<div class="container wow fadeInRight"> 
	<!-- <div class="ht-team-member-wrap ht-clearfix"> -->
		<?php 
		$showStatic = true;
		$cols = get_theme_mod('services_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:
						case 5:
						case 6:
						case 9:
						$colCls = 'col-md-4 col-sm-6 col-xs-12';
						break;
						case 4:
						case 7:
						case 8:
						case 10:
						case 11:
						case 12:
						$colCls = 'col-md-3 col-sm-6 col-xs-12';
						break;
						default:
						$colCls = 'col-md-3 col-sm-6 col-xs-12';
						break;
		}

		
		for( $i = 1; $i <= $cols; $i++ ){
			$services_page_id = get_theme_mod('services_page'.$i); 
			$services_page_icon = get_theme_mod('services_page_icon'.$i);
			if($services_page_id){
				$showStatic = false;
				echo featuredShortCode($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 class="services-post">
					<div class="service_img">
						<img class="secondry-bg img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/service.jpg');?>" alt="img" />
					</div>
					<div class="services-data">
					
				 		<h3 class="post-title">Weddings</h3>
				 	
				 		<p class="description">There are many variations passages of Lorem Ipsum availables, but majority have suffered alteration in some form injected humour.</p>
				 	
				 	<?php if( get_theme_mod('servicesall_button_display','show' ) == 'show') :
							?>
				 	<div class="servicess-button">
				 		<button><a href="#"><i class="fa fa-angle-right" aria-hidden="true"></i></a></button>
				 	</div>
				 	<?php endif ?>
				 </div>
				</div>		
					<div class="clearfix"></div>			 
			</div>
			<?php 
			}
		} ?>
		<div class="clearfix"></div>
		
	</div>	
	<div class="clearfix"></div>
</div>
</section>
<script>
	jQuery.noConflict();
	$(function(){
		function servicespostHeight(){
			var ht = 0;
			$('#services-post-section .services-post').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#services-post-section .services-post').height(ht+'px');
		}
		servicespostHeight();
	});
	$( window ).resize(function(){
		servicespostHeight();
	});
</script>


<?php }

