<?php
/**
 *
 * @package LZ Premium
 */
if(get_theme_mod('premium_whychooseus_section_disable') != 'on' ){?>
 <?php 
			if( get_theme_mod('whychooseussection_toppadding',true) ) {
                $whychooseussection_toppadding = 'padding-top:'.esc_attr(get_theme_mod('whychooseussection_toppadding')).';';
            }
            if( get_theme_mod('whychooseussection_bottompadding',true) ) {
                $whychooseussection_bottompadding = 'padding-bottom:'.esc_attr(get_theme_mod('whychooseussection_bottompadding')).';';
            }
            if( get_theme_mod('whychooseussection_leftpadding',true) ) {
                $whychooseussection_leftpadding = 'padding-left:'.esc_attr(get_theme_mod('whychooseussection_leftpadding')).';';
            }
            if( get_theme_mod('whychooseussection_rightpadding',true) ) {
                $whychooseussection_rightpadding = 'padding-right:'.esc_attr(get_theme_mod('whychooseussection_rightpadding')).';';
            }
	?>
<section id="whychooseus-content-section" class="ht-section" style="<?php echo esc_attr($whychooseussection_toppadding); ?>" "<?php echo esc_attr($whychooseussection_bottompadding); ?>" "<?php echo esc_attr($whychooseussection_leftpadding); ?>" "<?php echo esc_attr($whychooseussection_rightpadding); ?>">	
		<div class="container">	
		<div class="whychooseusbox">
				
					<?php
					$showStatic = true;
					for( $i = 1; $i < 4; $i++ ){
						$url = get_theme_mod('whychooseus_page_url_'.$i, '#');
						$whychooseus_page_id = get_theme_mod('whychooseus_page_icon1'.$i); 
						if(!empty($whychooseus_page_id)){
							$showStatic = false;
							break;
						}
					}
					$whychooseus_maintitle = get_theme_mod('whychooseus_maintitle', 'WHY CHOOSE US');
					$whychooseus_title = get_theme_mod('whychooseus_title', 'Heading Here');

					$whychooseus_text = get_theme_mod('whychooseus_text', 'Donec ultrices, diam sed efficitur semper, diam lectus malesuada nisl, eget congue nisl ligula non purus. Phasellus at dapibus magna. Ut imperdiet nequ');

					?>
					<div class="row wow flipInY">
							<?php if($whychooseus_title || $whychooseus_maintitle || $whychooseus_text){ ?>
								<div class="ht-section-title-tagline ">
									<?php if($whychooseus_title){ ?>
									<div class="ht-section-subtitle lz-whychooseus-subheading">
									<?php if($whychooseus_title){ ?>
										<?php echo $whychooseus_title;?>
											<?php }?>
									</div>
										<?php }?>
									<?php if($whychooseus_maintitle){ ?>
									<h2 class="ht-section-title lz-whychooseus-heading">
										<?php
										if(!empty($whychooseus_maintitle))	{
											echo ($whychooseus_maintitle);
										} ?>
									</h2> 
									<?php }?>
									<div class="ht-section-text lz-whychooseus-text">
									<?php if($whychooseus_text){ ?>
										<?php echo $whychooseus_text;?>
											<?php }?>
									</div>
									<div class="clearfix"></div>
								</div>
							<?php }?>
						<div class="clearfix"></div>
					</div>
		 	<div class="clearfix"></div>
							<div class="whychooseus-post-wrap">
									<?php
									$cols = get_theme_mod('whychooseus_npp_count', 5);
									$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;
										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 whychooseus-post-boxes">
										<?php
										for( $i = 1; $i <= $cols; $i++ ){
											if($showStatic === false){
													$url = get_theme_mod('whychooseus_page_url_'.$i, '#');
												$whychooseus_page_title = get_theme_mod('whychooseus_page_title_'.$i, 'PROFESSIONAL GUARDS');
											
												$whychooseus_page_id = get_theme_mod('whychooseus_page'.$i);
												$whychooseus_page_icon = get_theme_mod('whychooseus_page_icon'.$i);
												$whychooseus_page_icon1 = get_theme_mod('whychooseus_page_icon1'.$i);
												if($whychooseus_page_icon1){

													?>

													<div class="<?php echo $colCls;?> facspace">
														<div class="whychooseus-post wow zoomIn">

															<div class="whychooseusimgbox">
																<div class="whychooseus-img">
																	<img src="<?php echo esc_url($whychooseus_page_icon1); ?>" class="img-responsive" />
																	<a href="<?php echo esc_url(!empty($url)?$url:'#');?>" ><i class="fa fa-plus"></i></a>
																	
																</div>
															</div>
															<div class="clearfix"></div>
															<div class="titlebox">
																<div class="col-md-3 col-sm-3 col-xs-2"> 
																	<div class="whychooseus-icon">
																		<span class="<?php echo $whychooseus_page_icon; ?>"></span>
																	</div>
																</div>
																<div class="col-md-9 col-sm-9 col-xs-10 padding0"> 	
																	<h5><?php echo $whychooseus_page_title; ?></h5>
																</div>
																<div class="clearfix"></div>
															</div>
															<div class="clearfix"></div>
															</div>
														</div>
													
													<?php
												}	
											}else{?>
												<div class="<?php echo $colCls;?> facspace">
													<div class="whychooseus-post wow zoomIn">
														<div class="whychooseusimgbox">
															<div class="whychooseus-img">
																<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/whychooseus.jpg" class="img-responsive" />
																<a href="#" ><i class="fa fa-plus"></i></a>
																
															</div>
														</div>
														<div class="clearfix"></div>
														<div class="titlebox">
														<div class="col-md-3 col-sm-3 col-xs-2"> 
															<div class="whychooseus-icon">
																<span class="fa fa-user"></span>
															</div>
														</div>
														<div class="col-md-9 col-sm-9 col-xs-10 padding0"> 	
															<h5>PROFESSIONAL GUARDS</h5>
														</div>
														<div class="clearfix"></div>
													</div>
														
														<div class="clearfix"></div>
													</div>
												</div>
											<?php }

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