<?php    
/**
 *
 * @package Luzuk
 */
if(get_theme_mod('ct_service_section_disable') != 'on' ){ ?>
	<?php 
			if( get_theme_mod('servicesection_toppadding',true) ) {
                $servicesection_toppadding = 'padding-top:'.esc_attr(get_theme_mod('servicesection_toppadding')).';';
            }
            if( get_theme_mod('servicesection_bottompadding',true) ) {
                $servicesection_bottompadding = 'padding-bottom:'.esc_attr(get_theme_mod('servicesection_bottompadding')).';';
            }
            if( get_theme_mod('servicesection_leftpadding',true) ) {
                $servicesection_leftpadding = 'padding-left:'.esc_attr(get_theme_mod('servicesection_leftpadding')).';';
            }
            if( get_theme_mod('servicesection_rightpadding',true) ) {
                $servicesection_rightpadding = 'padding-right:'.esc_attr(get_theme_mod('servicesection_rightpadding')).';';
            }
	?>
	<section id="ct-service-box" style="<?php echo esc_attr($servicesection_toppadding); ?>" "<?php echo esc_attr($servicesection_bottompadding); ?>" "<?php echo esc_attr($servicesection_leftpadding); ?>" "<?php echo esc_attr($servicesection_rightpadding); ?>">
		<div class="container">
			<?php
		// echo "post id: ". 
			$ct_service_page_id = get_theme_mod('ct_service_page');	
			$ct_service_title = get_theme_mod('ct_service_title', 'Heading Here');
					$service_maintitle = get_theme_mod('service_maintitle', 'OUR SERVICES');

					?>
					<div class="row wow flipInY">
							<?php if($ct_service_title || $service_maintitle){ ?>
								<div class="ht-section-title-tagline ">
									<?php if($ct_service_title){ ?>
									<div class="ht-section-subtitle lz-service-subheading">
									<?php if($ct_service_title){ ?>
										<?php echo $ct_service_title;?>
											<?php }?>
									</div>
									<?php }?>
									<?php if($service_maintitle){ ?>
									<h2 class="ht-section-title lz-service-heading">
										<?php
										if(!empty($service_maintitle))	{
											echo ($service_maintitle);
										} ?>
									</h2> 
									<?php }?>
									<div class="clearfix"></div>
								</div>
							<?php }?>
						<div class="clearfix"></div>
					</div>
		 	<div class="clearfix"></div>
			<div class="row ct-service-box">
				
					<div class="servicerightside"> 
					<div class="service-box"> 
						<!-- <div class="ht-team-member-wrap ht-clearfix"> -->
							<?php 
							$showStatic = true;
							$cols = get_theme_mod('ct_service_npp_count',3);
							$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'); 
							for( $i = 1; $i <= $cols; $i++ ){
								if( get_theme_mod('servicesboxColor'.$i,true) ) {
										$servicesboxColor = 'background-color:'.esc_attr(get_theme_mod('servicesboxColor'.$i)).';';
									}
								$ct_service_page_id = get_theme_mod('ct_service_page'.$i); 
								$ct_service_page_icon = get_theme_mod('ct_service_page_icon'.$i);
								$ct_service_icon1 = get_theme_mod('ct_service_icon1'.$i);
								if($ct_service_page_id){
									$showStatic = false;
									echo ctserviceShortCode($ct_service_page_id, $isCustomizer=true, $i);
								}
							}
		// adding the static content
							if($showStatic === true){
								for( $i = 1; $i <= $cols; $i++ ){ ?>
								

									<div class="<?php echo $colCls;?> serbox wow zoomIn services-sec">

										 <div class="serviceBox">
												<i class="fa fa-user tada midix infinite"></i>
										 	 <div class="serviceBoximg">
						                      		<img class="secondry-bg img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/services.jpg');?>" alt="Team" />	
						                   	</div>
						                       
						                   	 <h3 class="title">BODY GUARD</h3>
						                   	 <div class="clearfix"></div>
											<div class="data">Diam sed efficitur semper diam lectus malesuada nisl, eget congue</div>
											<div class="clearfix"></div>
											<div class="servicesbtn"><a href="#">Read More</a></div>

                   						 </div>
                   						
									</div>

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

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

	<?php }

