<?php
/**
 *
 * @package LZ Premium
 */
if(get_theme_mod('premium_facility_section_disable') != 'on' ){?>
 <?php 
		if( get_theme_mod('facility_areaTpadding',true) ) {
			$facility_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('facility_areaTpadding')).';';
		}
		if( get_theme_mod('facility_areaBpadding',true) ) {
			$facility_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('facility_areaBpadding')).';';
		}
	?>	
<section id="facility-content-section" class="ht-section" style="<?php echo esc_attr($facility_areaTpadding); ?>" "<?php echo esc_attr($facility_areaBpadding); ?>">	
		<div class="container">
			<?php
				$showStatic = true;
				for( $i = 1; $i < 4; $i++ ){
					$url = get_theme_mod('facility_page_url_'.$i, '#');
					$facility_page_id = get_theme_mod('facility_page_icon'.$i); 
					if(!empty($facility_page_id)){
						$showStatic = false;
						break;
					}
				}
				$facility_subheading = get_theme_mod('facility_subheading', 'Facility');
				$facility_title = get_theme_mod('facility_title', 'Our <br> Facility');

				$facility_one = get_theme_mod('facility_one', 'System');
				$facility_two = get_theme_mod('facility_two', 'Technology');
				$facility_three = get_theme_mod('facility_three', 'Innovate');
				$facility_four = get_theme_mod('facility_four', 'Network');
			?>
			
			<div class="clearfix"></div>
				<div class="col-md-6 facilityrightbox">
					<div class="facility-post-wrap">
						<?php
							$cols = get_theme_mod('facility_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-6 col-sm-12';
								break;
								default: 
								$colCls = 'col-md-6 col-sm-12';
								break;
							}
							$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
						?>
						<div class=" facility-post-boxes">
							<?php
							for( $i = 1; $i <= $cols; $i++ ){
								if($showStatic === false){
									$url = get_theme_mod('facility_page_url_'.$i, '#');
									$facility_page_title = get_theme_mod('facility_page_title_'.$i, 'Technology</span> Services');
									$facility_page_desc = get_theme_mod('facility_page_desc_'.$i, 'Our CoE leads work directly with customers in this large and first phase.');
									$facility_page_id = get_theme_mod('facility_page'.$i);
									$facility_page_icon = get_theme_mod('facility_page_icon'.$i);
									if($facility_page_icon){

							?>
							<div class="<?php echo $colCls;?> facspace">
								<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
									<div class="facility-post wow zoomIn">
										<div class="f-hover"></div>
										<div class="facility-icon">
											<span class="fa-3x <?php echo $facility_page_icon; ?>"></span>
										</div>
										<h5 class="inner-area-title"><?php echo $facility_page_title; ?></h5>
										<p><?php echo $facility_page_desc; ?></p>
									<div class="clearfix"></div>
									</div>
									<div class="clearfix"></div>
								</a>
							</div>			
							<?php
									}	
							}else{?>
								<div class="<?php echo $colCls;?> facspace">
									<a href="#">
										<div class="facility-post wow zoomIn">
											<div class="f-hover"></div>
											<div class="facility-icon">
												<span class="fa fa-th fa-3x"></span>
											</div>
											<h5 class="inner-area-title"><span>Technology</span> Services</h5>
											<p>Our CoE leads work directly with customers in this large and first phase.</p>
											<div class="clearfix"></div>
										</div>
										<div class="clearfix"></div>
									</a>
								</div>
							<?php }
							}?>
							<div class="clearfix"></div>
						</div>
					</div>
				</div>
				<div class="col-md-6 col-sm-12 col-xs-12 facilityrightbox2">
					<div class="col-md-12 col-sm-12 col-xs-12 text-center top-circle">
						<h5><?php echo $facility_one; ?></h5>
					</div>
					<div class="col-md-6 col-sm-6 col-xs-12 text-left top-circle top-set slid-border">
						<h5><?php echo $facility_two; ?></h5>
					</div>

		        
			          <div class="section-title">
			            <h2><?php echo $facility_title; ?></h2>
			          </div>
		       
		   
					<div class="col-md-6 col-sm-6 col-xs-12 text-right">
						<h5><?php echo $facility_three; ?></h5>
					</div>
					<div class="col-md-12 col-sm-12 col-xs-12 text-center slid-border top-rotate">
						<h5><?php echo $facility_four; ?></h5>
					</div>
					
				</div>
				<div class="clearfix"></div>
			
			<div class="clearfix"></div>

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