	<?php

if(get_theme_mod('facility_section_disable') != 'on' ){
	?>
	<?php 
		if( get_theme_mod('sec_facilityTpadding',true) ) {
			$sec_facilityTpadding = 'padding-top:'.esc_attr(get_theme_mod('sec_facilityTpadding')).';';
		}
		if( get_theme_mod('sec_facilityBpadding',true) ) {
			$sec_facilityBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('sec_facilityBpadding')).';';
		}
	?>
	<section id="facility-section" class="ht-section wow zoomIn facility-area"  style="<?php echo esc_attr($sec_facilityTpadding); ?>" "<?php echo esc_attr($sec_facilityBpadding); ?>">

		<?php

 			$faclty_heading = get_theme_mod('faclty_heading', 'Facility');
		?>	

		<div class="container">
			<div class="justify-content-center">
			<?php if($faclty_heading ){ ?>
			  	<div class="section-title">
			   		<h2><?php echo ($faclty_heading);  ?></h2> 
		        
		      	</div>
		    <?php }?>
			</div>
		</div>

		<?php
			$showStatic = true;
			for( $i = 1; $i < 3; $i++ ){
				$url = get_theme_mod('luzuk_facility_page_url_'.$i, '#');
				$luzuk_facility_page_id = get_theme_mod('facility_page_icon1'.$i); 
							if(!empty($luzuk_facility_page_id)){
								$showStatic = false;
								break;
				}
			}
		?>

		<div class="container">	
			<div class="facility-inn">

			<?php
				$cols = get_theme_mod('luzuk_facility_npp_count', 7);
				$cols++;
							// echo '$cold: '.$cols;
				switch($cols){
					case 1:
					$colCls = 'col-md-12 col-sm-12';
					break;
					case 2:	
					$colCls = 'col-md-6 col-sm-6';
					break;
					case 3:
					case 5:
					case 6:
					case 9:
					case 11:
					case 13:
					case 15:
					$colCls = 'col-md-4 col-sm-6';
					break;
					default: 
					$colCls = 'col-md-3 col-sm-6';
					break;
				}
				$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
				?>
		<!-- <div class="owl-carousel owl-theme">   -->
			<?php
			for( $i = 1; $i <= $cols; $i++ ){

				if($showStatic === false){
				$url = get_theme_mod('luzuk_facility_page_url_'.$i, '#');
				$facility_page_title = get_theme_mod('facility_page_title_'.$i, 'Conference Room');
				$fea_page_text = get_theme_mod('fea_page_text'.$i, 'It is a long established fact that a reader will be distracted by the readable content of a page');
				$luzuk_facility_page_id = get_theme_mod('facility_b_page'.$i);
				
				$facility_page_icon1 = get_theme_mod('facility_page_icon1'.$i);
				if($facility_page_icon1){
							
			?>
					<div class="<?php echo $colCls;?>">
						<div class="mem-inn ">
							<div class="sec-icn">
								<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
									<span class="<?php echo $facility_page_icon1; ?>"></span>
									<!-- <img src="<?php //echo esc_url($facility_page_icon1); ?>" class="img-responcive" /> -->
									<div class="sec-icn1"></div>
								</a>
							</div> 
							<div class="facility-content">
								<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
									<h3 class="inner-area-title"><?php echo $facility_page_title; ?></h3>
								</a>
								<p><?php echo $fea_page_text; ?></p>
							</div>
							<div class="clearfix"></div>
						</div>
						<div class="clearfix"></div>
					</div>
							<?php
						}
					}else{?>
						<div class="<?php echo $colCls;?> ">
							<div class="mem-inn">
								<div class="sec-icn">
									<div class="sec-icn1"></div>
									<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
										<span class="fa fa-wpforms"></span>
										<!-- <img class="img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/Feature1.jpg');?>" alt="facility" /> -->

									</a>
								</div>
								<div class="facility-content">
									<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
										<h3 class="inner-area-title">Conference Room</h3></a>
										<p>It is a long established fact that a reader will be distracted by the readable content of a page</p> 
								</div>
							</div>
							<div class="clearfix"></div>
						</div>
					<?php }

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