<?php
/**  
*
* @package Luzuk 
*/

if(get_theme_mod('luzuk_premium_aboutus_section_disable') != 'on' ){

?>
<section id="facilities-section" class="ht-section wow slideInUp"> 
	

    <?php 
  if( get_theme_mod('facilitiosection_toppadding',true) ) {
    $facilitiosection_toppadding = 'padding-top:'.esc_attr(get_theme_mod('facilitiosection_toppadding')).';';
  }
  if( get_theme_mod('facilitiosection_bottompadding',true) ) {
    $facilitiosection_bottompadding = 'padding-bottom:'.esc_attr(get_theme_mod('facilitiosection_bottompadding')).';';
  }
  
  
  ?>
	

<div class="lightbox overlay" style="<?php echo esc_attr($facilitiosection_toppadding); ?>" "<?php echo esc_attr($facilitiosection_bottompadding); ?>">
<div class="inside-full-height">

<?php
$showStatic = true;
for( $i = 1; $i < 3; $i++ ){
$url = get_theme_mod('luzuk_about_page_url_'.$i, '#');
$link = get_theme_mod('luzuk_about_page_link'.$i);
$luzuk_about_page_id = get_theme_mod('luzuk_about_page_icon'.$i); 
if(!empty($luzuk_about_page_id)){
$showStatic = false;
break;
}
}
$luzuk_aboutus_title = get_theme_mod('luzuk_aboutus_title', 'Our Facilities');
$luzuk_about_sub_title = get_theme_mod('luzuk_about_sub_title', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever.');
?>
			
			<div class="col-md-6 col-md-offset-3">
				<?php if( $luzuk_aboutus_title ){ ?>
						<div class="ht-section-title-tagline">
									<h2 class="ht-section-title lz-facilitie-heading">
										<?php 
										 if(!empty($luzuk_aboutus_title))	{
											 echo ($luzuk_aboutus_title);
										} ?>
									</h2>
								
								<p><?php echo ($luzuk_about_sub_title); ?></p>
								<div class="clearfix"></div>
						</div>
				<?php } ?>
								<div class="clearfix"></div>

			</div>
		


<div class="clearfix"></div>
<div class="container">

<div class="row">
	
<div class="facilities-post ">
	<?php
	$cols = get_theme_mod('luzuk_about_npp_count', 3);
	$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:
		$colCls = 'col-md-4 col-sm-6';
		break;

		case 4:
		case 7:
		case 8:
		case 10:
		case 11:
		case 12:
		$colCls = 'col-md-3 col-sm-6';
		break;

		default: 
		$colCls = 'col-md-4 col-sm-6';
		break;
	}
	$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
	?>
	<div class="row featured-post-boxes">
		<?php
		for( $i = 1; $i <= $cols; $i++ ){
			if($showStatic === false){
				$url = get_theme_mod('luzuk_about_page_url_'.$i, '#');
				
				$luzuk_about_page_title = get_theme_mod('luzuk_about_page_title_'.$i, 'Optional finishing');
				$luzuk_about_page_description = get_theme_mod('luzuk_about_page_description_'.$i, 'There are many variations passages of Lorem Ipsum availables.');
				$luzuk_about_page_id = get_theme_mod('luzuk_about_page'.$i); 
				$luzuk_about_page_icon = get_theme_mod('luzuk_about_page_icon'.$i);
				
				if($luzuk_about_page_icon){
					
							?>

							<div class="<?php echo $colCls;?>">
								<div class="facilities-box text-center">			
									<div class="facilities-icon">
										<!-- <img src="<?php //echo esc_url($luzuk_about_page_icon); ?>" class="img-responcive" /> -->
											<i class="<?php echo $luzuk_about_page_icon; ?>"></i>
									</div>
									<div class="clearfix"></div>
									<div class="details">
									<h5 class="title"><?php echo $luzuk_about_page_title; ?></h5>
									<p><?php echo $luzuk_about_page_description; ?></p>	
								</div>
								
									<div class="clearfix"></div>
								</div>
							</div>
							<?php
						
				}
			}else{?>
				<div class="<?php echo $colCls;?>">
					<div class="facilities-box text-center ">						
						<div class="facilities-icon">
							<i class="fa fa-th-large"></i>
						</div>
						<div class="clearfix"></div>
						<div class="details">
							<h5 class="title">Optional finishing</h5>
							<p>There are many variations passages of Lorem Ipsum availables.</p>					
						</div>
						
							<div class="clearfix"></div>												
					</div>
				</div>
			<?php }

		}?>
		<div class="clearfix"></div>
	</div>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="clearfix"></div>
</div>

</section>
<script>
	jQuery.noConflict();
	$(function(){
		function h5titleHeight(){
			var ht = 0;
			$('.facilities-box h5.title').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('.facilities-box h5.title').height(ht+'px');
		}
		h5titleHeight();
	});
	$( window ).resize(function(){
		h5titleHeight();
	});
</script>

<script>
	jQuery.noConflict();
	$(function(){
		function facilitiesboxHeight(){
			var ht = 0;
			$('#facilities-section .facilities-box').each(function(i){
				var tHt = $(this).height();
				if(ht<tHt){
					ht=tHt;
				}
			});
			$('#facilities-section .facilities-box').height(ht+'px');
		}
		facilitiesboxHeight();
	});
	$( window ).resize(function(){
		facilitiesboxHeight();
	});
</script>
<?php } 