<?php
/**
 *
 * @package LZ Premium
 */
if(get_theme_mod('lz_fitness_premium_facility_section_disable') != 'on' ){?>
 
	<section id="facility-content-section" class="ht-section">	
		<div class="col-md-12 padding0">
		
		<div class="facilitybox">
			<div class="facility-box">
				<?php
				$lz_fitness_facility_page_id = get_theme_mod('lz_fitness_facility_page');
				$lz_fitness_facility_title = get_theme_mod('lz_fitness_facility_title', 'Our Facilities');
				$lz_fitness_facility_sub_title = get_theme_mod('lz_fitness_facility_sub_title', 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.');
				//$lz_fitness_facility_subtext = get_theme_mod('lz_fitness_facility_subtext', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.');

				//$lz_fitness_facility_text2 = get_theme_mod('lz_fitness_facility_text2', 'Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. Lorem Ipsum is simply dummy text of the printing  typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s. ');
				?>
				<div class="row">
					<div class="ht-section-title-tagline">
						<h2 class="ht-section-title lz-facility-heading">
							<?php
							if(!empty($lz_fitness_facility_title))	{
								echo ($lz_fitness_facility_title);
							} ?>
						</h2>
						<div class="clearfix"></div>
						<div class="col-md-6 col-md-offset-3 lz-facility-subheading">
							<?php
							if(!empty($lz_fitness_facility_sub_title))	{
								echo ($lz_fitness_facility_sub_title);
							} ?>
						</div>
						<div class="clearfix"></div>
					</div>
					<div class="clearfix"></div>
				</div>
				
				<div class=" facility-bg"> 
					<?php
						$showStatic = true;
						for( $i = 1; $i < 4; $i++ ){
							$lz_fitness_facility_page_id = get_theme_mod('lz_fitness_facility_page_icon'.$i); 
							if(!empty($lz_fitness_facility_page_id)){
								$showStatic = false;
								break;
							}
						} ?>
					<div class="inside-full-height">
						<div class="facility-post-wrap">
								<?php
								$cols = get_theme_mod('lz_fitness_facility_npp_count', 5);
								$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 4:
										case 7:
										case 8:
											$colCls = 'col-md-3 col-sm-12 col-xs-12';
											break;
										default:
											$colCls = 'col-md-4 col-sm-12 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 facility-post-boxes">
									<?php
									for( $i = 1; $i <= $cols; $i++ ){
										if($showStatic === false){
											$lz_fitness_facility_page_title = get_theme_mod('lz_fitness_facility_page_title_'.$i, 'Our Facility');
											$lz_fitness_facility_page_description = get_theme_mod('lz_fitness_facility_page_description_'.$i, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem Ipsum is simply dummy text of the printing and typesetting industry');
											$lz_fitness_facility_page_id = get_theme_mod('lz_fitness_facility_page'.$i);
											$lz_fitness_facility_page_icon = get_theme_mod('lz_fitness_facility_page_icon'.$i);
											if($lz_fitness_facility_page_icon){

												?>

												<div class="<?php echo $colCls;?> fpost facility-sec">
													<div class="facility-post wow fadeInUp textcenter">
														<div class="facility-icon">
															<span class="<?php echo $lz_fitness_facility_page_icon; ?>"></span>
														</div>
														<div class="clearfix"></div>
														<h5><?php echo $lz_fitness_facility_page_title; ?></h5>		
														<div class="clearfix"></div>
														<div class="description">
															<?php echo $lz_fitness_facility_page_description; ?>
														</div>
														<div class="clearfix"></div>
													</div>
												</div>
												
												<?php
											}	
										}else{?>
											<div class="<?php echo $colCls;?> fpost facility-sec">
												<div class="facility-post wow fadeInUp textcenter">
													<div class="facility-icon"><span class="fa fa-female"></span>
													</div>
													<div class="clearfix"></div>
													<h5>Natural Spa</h5>		
													<div class="clearfix"></div>
													<div class="description">
														Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem Ipsum is simply dummy.
														<div class="clearfix"></div>
													</div>
													<div class="clearfix"></div>
												</div>
											</div>
										<?php }

									}?>
									<div class="clearfix"></div>
								</div>
							</div>
						
					</div>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
		</div>
		<div class="clearfix"></div>
	</section>
	<script>
	jQuery.noConflict();
	$(function(){
		function fpostHeight(){
			var ht = 0;
			$('#facility-content-section h5').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#facility-content-section h5').height(ht+'px');
		}
		fpostHeight();
	});
	$( window ).resize(function(){
		fpostHeight();
	});
</script>
<script>
	jQuery.noConflict();
	$(function(){
		function fpostHeight(){
			var ht = 0;
			$('#facility-content-section .description').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#facility-content-section .description').height(ht+'px');
		}
		fpostHeight();
	});
	$( window ).resize(function(){
		fpostHeight();
	});
</script>

<?php }