<?php
/**
 *
 * @package Luzuk Premium
 */
if(get_theme_mod('support_section_disable') != 'on' ){
	?>
<?php 
            if( get_theme_mod('support_toppadding',true) ) {
                $support_toppadding = 'padding-top:'.esc_attr(get_theme_mod('support_toppadding')).';';
            }
            if( get_theme_mod('support_bottompadding',true) ) {
                $support_bottompadding = 'padding-bottom:'.esc_attr(get_theme_mod('support_bottompadding')).';';
            }
    ?>
<section id="support" class="ht-section" style="<?php echo esc_attr($support_toppadding); ?>" "<?php echo esc_attr($support_bottompadding); ?>">
	<div class="container">
		<div class="support-post-box">
			
				<?php
					$showStatic = true;
					for( $i = 1; $i < 4; $i++ ){
						$support_page_id = get_theme_mod('support_page_icon'.$i); 
						if(!empty($support_page_id)){
							$showStatic = false;
							break;
						}
					}
				?>
			<div class="support-post-wrap">
				<?php
					$cols = get_theme_mod('support_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:
					$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 row-eq-height">
					<?php
					for( $i = 1; $i <= $cols; $i++ ){
						if($showStatic === false){
						$support_page_title = get_theme_mod('support_page_title_'.$i, 'Safe delivery');
						$support_page_desc = get_theme_mod('support_page_desc_'.$i, 'Praesent malesuada ornare.');
						$support_page_id = get_theme_mod('support_page'.$i);
						$support_page_icon = get_theme_mod('support_page_icon'.$i);
						if($support_page_icon){						
					?>
					<div class="<?php echo $colCls;?> support-space">	
						<div class="support-post ">	
							<div class="support-icon">
								<span class="<?php echo $support_page_icon; ?>"></span>
								<div class="icncir"></div>
							</div>						
							<div class="conbx">
								<h5><?php echo $support_page_title; ?></h5>
								<p><?php echo $support_page_desc; ?></p>	
							</div>													
							<div class="clearfix"></div>
						</div>
					
					</div>
					<?php
					}	
					}else{?>
					<div class="<?php echo $colCls;?> support-space ">
						<div class="support-post">	
							<div class="support-icon">
								<span class="fa fa-shield"></span>
								<div class="icncir"></div>
							</div>	
						    <div class="conbx">
								<h5>Safe delivery</h5>	
								<p>Praesent malesuada ornare.</p> 	
							</div>					
						</div>
					</div>
				<?php }
				} ?>
				<div class="clearfix"></div>
				</div>
			</div>
			
		</div>
	</div>
	<div class="clearfix"></div>
</section>

<script type="text/javascript">
	var title = 0;
jQuery(".support-space .support-post").each(function(){
  if ($(this).height() > title) { title = $(this).height(); }
});
jQuery(".support-space .support-post").height(title);


// on Resize change height

jQuery(window).resize(function(){
  jQuery(".support-space .support-post").height("");
  var title = 0;
  jQuery(".support-space .support-post").each(function(){
    if ($(this).height() > title) { title = $(this).height(); }
  });
  jQuery(".support-space .support-post").height(title);
});
</script>
<?php }