<?php

if(get_theme_mod('support_area_disable') != 'on' ){
	?>
	<!-- support Area Start -->
	<?php 
	if( get_theme_mod('support_areaTpadding',true) ) {
		$support_areaTpadding = 'padding-top:'.esc_attr(get_theme_mod('support_areaTpadding')).';';
	}
	if( get_theme_mod('support_areaBpadding',true) ) {
		$support_areaBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('support_areaBpadding')).';';
	}

	?>		
	<div class="support bg-img-1" id="support" style="<?php echo esc_attr($support_areaTpadding); ?>" "<?php echo esc_attr($support_areaBpadding); ?>">
	<div class="container">
		<?php
			$showStatic = true;
			for( $i = 1; $i < 11; $i++ ){
				$pro_b_page_id = get_theme_mod('pro_b_page_icon'.$i); 
				if(!empty($pro_b_page_id)){
					$showStatic = false;
					break;
				}
			}
			?>
				<?php
				$cols = get_theme_mod('support_npp_count', 2);
				$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:
					$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="row">
					<?php
					for( $i = 1; $i <= $cols; $i++ ){
					if($showStatic === false){
						
						$pro_b_page_title = get_theme_mod('pro_b_page_title'.$i, '<span>Travellers</span> love us');
						$pro_b_page_description = get_theme_mod('pro_b_page_description'.$i,'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industrys.');
						$pro_b_page_id = get_theme_mod('pro_b_page'.$i); 
						$pro_b_page_icon = get_theme_mod('pro_b_page_icon'.$i);
						if($pro_b_page_icon){
							
						?>
						<div class="<?php echo $colCls;?> pd-0 support-area">
							<div class="support-single wow zoomIn" data-wow-duration="1s">
								<div class="supp-inn">
								<div class="pro_b-area-data">
									<h4 class="inner-area-title"><?php echo $pro_b_page_title; ?></h4>
									<div class="section-area-text">
										<?php echo $pro_b_page_description; ?>
									</div>	
								</div>
								<div class="hi-icon">
									<span class="<?php echo $pro_b_page_icon; ?>"></span>	
								</div>
								<div class="clearfix"></div>
								</div>						
							</div>
							<div class="clearfix"></div>
						</div>
						<?php
								
						}
					}else{?>
						<div class="<?php echo $colCls;?> pd-0 support-area">
							<div class="support-single wow zoomIn" data-wow-duration="1s">
								<div class="supp-inn">	
								<div class="pro_b-area-data">
									<h4 class="inner-area-title"><span>Travellers</span> love us</h4>
									<div class="section-area-text">
										Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industry's.
									</div>	
								</div>
								
								<div class="hi-icon">
									<span class="fa fa-cube"></span>	
								</div>
								<div class="clearfix"></div>
							</div>					
							</div>
							<div class="clearfix"></div>
						</div>
					<?php }

					}?>
					<div class="clearfix"></div>
				</div>
		<div class="clearfix"></div>
	</div>
	</div> 
	<!-- support Area Start -->
		<script>
		jQuery.noConflict();
		$(function(){
			function probareadataHeight(){
				var ht = 0;
				$('#support .pro_b-area-data').each(function(i){
					var tHt = $(this).height();
					if(ht<tHt){
						ht=tHt;
					}
				});
				$('#support .pro_b-area-data').height(ht+'px');
			}
			probareadataHeight();
		});
		$( window ).resize(function(){
			probareadataHeight();
		});
	</script>
	
<?php } 