<?php
/**
 *
 * @package Luzuk
 */
if(get_theme_mod('lz_fitness_premium_ourfeatureshmp_section_disable') != 'on' ){
	
	?>
	<section id="ht-our-featured-section" class="ht-section">  
		<?php 
		if( get_theme_mod('sec_ourpetssectionTpadding',true) ) {
			$sec_ourpetssectionTpadding = 'padding-top:'.esc_attr(get_theme_mod('sec_ourpetssectionTpadding')).';';
		}
		if( get_theme_mod('sec_ourpetssectionBpadding',true) ) {
			$sec_ourpetssectionBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('sec_ourpetssectionBpadding')).';';
		}
		if( get_theme_mod('sec_ourpetssectionLpadding',true) ) {
			$sec_ourpetssectionLpadding = 'padding-left:'.esc_attr(get_theme_mod('sec_ourpetssectionLpadding')).';';
		}
		if( get_theme_mod('sec_ourpetssectionRpadding',true) ) {
			$sec_ourpetssectionRpadding = 'padding-right:'.esc_attr(get_theme_mod('sec_ourpetssectionRpadding')).';';
		}
		?>		 
		<div class="lightbox" style="<?php echo esc_attr($sec_ourpetssectionTpadding); ?>" "<?php echo esc_attr($sec_ourpetssectionBpadding); ?>" "<?php echo esc_attr($sec_ourpetssectionLpadding); ?>" "<?php echo esc_attr($sec_ourpetssectionRpadding); ?>">
				<?php
				$showStatic = true;
				for( $i = 1; $i < 3; $i++ ){
					$url = get_theme_mod('lz_fitness_ourfeatureshmp_page_url_'.$i, '#');
					$link = get_theme_mod('lz_fitness_ourfeatureshmp_page_link'.$i);
					$lz_fitness_ourfeatureshmp_page_id = get_theme_mod('lz_fitness_ourfeatureshmp_page_icon'.$i); 
					if(!empty($lz_fitness_ourfeatureshmp_page_id)){
						$showStatic = false;
						break;
					} 
				}
				$lz_fitness_ourfeatureshmp_title = get_theme_mod('lz_fitness_ourfeatureshmp_title', 'Pets We Takecare');
				$lz_fitness_ourfeatureshmp_sub_title = get_theme_mod('lz_fitness_ourfeatureshmp_sub_title', 'We Love These Pets');
				?>
				
				<!-- for title bgimage -->
				<?php if( get_theme_mod('featuresectionstitlebgimage_display','show' ) == 'show') :
					?>	
					<?php 
					if( get_theme_mod('sec_featuresectiontitleimage',true) ) {
						$sec_featuresectiontitleimage = 'top:'.esc_attr(get_theme_mod('sec_featuresectiontitleimage')).';';
					}

					?>	

					<div class="title-image" style="<?php echo esc_attr($sec_featuresectiontitleimage); ?>">  

						<?php 
						$lz_fitness_featuresectionsttl_image = get_theme_mod('lz_fitness_featuresectionsttl_image');
						if(!empty($lz_fitness_featuresectionsttl_image)){
							echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($lz_fitness_featuresectionsttl_image).'" class="img-responsive" />';
						}else{
							echo '<img alt="featuresections Title Image" src="'.get_template_directory_uri().'/images/dogimg.png" class="img-responsive aboutbox-img" />';
						}
						?>
					</div>
				<?php endif ?>
				<!-- for title bgimage -->


				<div class="col-md-6 col-md-offset-3 ht-section-title-tagline">
					<div class="lz-ourfeatureshmp-subheading">
						<?php if($lz_fitness_ourfeatureshmp_sub_title){
							echo ($lz_fitness_ourfeatureshmp_sub_title);
						}?>
					</div>
					<div class="clearfix"></div>
					<h2 class="ht-section-title lz-ourfeatureshmp-heading">
						<?php
						if(!empty($lz_fitness_ourfeatureshmp_title))	{
							echo ($lz_fitness_ourfeatureshmp_title);
						} ?>
					</h2> 
					<div class="clearfix"></div>

				</div>

				<div class="clearfix"></div>
				
			<div class="container">

				<div class="row">
					<?php 
					if( get_theme_mod('sec_ourpetsboxsectionTpadding',true) ) {
						$sec_ourpetsboxsectionTpadding = 'padding-top:'.esc_attr(get_theme_mod('sec_ourpetsboxsectionTpadding')).';';
					}
					if( get_theme_mod('sec_ourpetsboxsectionBpadding',true) ) {
						$sec_ourpetsboxsectionBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('sec_ourpetsboxsectionBpadding')).';';
					}
					if( get_theme_mod('sec_ourpetsboxsectionLpadding',true) ) {
						$sec_ourpetsboxsectionLpadding = 'padding-left:'.esc_attr(get_theme_mod('sec_ourpetsboxsectionLpadding')).';';
					}
					if( get_theme_mod('sec_ourpetsboxsectionRpadding',true) ) {
						$sec_ourpetsboxsectionRpadding = 'padding-right:'.esc_attr(get_theme_mod('sec_ourpetsboxsectionRpadding')).';';
					}
					?>		
					<div class="ourfeatureshmp-post-wrap" style="<?php echo esc_attr($sec_ourpetsboxsectionTpadding); ?>" "<?php echo esc_attr($sec_ourpetsboxsectionBpadding); ?>" "<?php echo esc_attr($sec_ourpetsboxsectionLpadding); ?>" "<?php echo esc_attr($sec_ourpetsboxsectionRpadding); ?>">
						<?php
						$cols = get_theme_mod('lz_fitness_ourfeatureshmp_npp_count', 2);
						$cols++;
							// echo '$cold: '.$cols;
						switch($cols){
							case 1:
							$colCls = 'col-md-12 col-sm-12 col-xs-12';
							break;
							case 2:
							$colCls = 'col-md-6 col-sm-6 col-xs-12';
							break;
							case 3:
							case 5:
							case 6:
							case 9:
							$colCls = 'col-md-4 col-sm-6 col-xs-12';
							break;

							case 4:
							case 7:
							case 8:
							case 10:
							case 11:
							case 12:
							$colCls = 'col-md-3 col-sm-6 col-xs-12';
							break;

							default: 
							$colCls = 'col-md-4 col-sm-6 col-xs-12';
							break;
						}
						$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
						?>
						<div class="row ourfeatureshmp-post-boxes">
							<?php
							for( $i = 1; $i <= $cols; $i++ ){
								if($showStatic === false){
									$url = get_theme_mod('lz_fitness_ourfeatureshmp_page_url_'.$i, '#');

									$lz_fitness_ourfeatureshmp_page_title = get_theme_mod('lz_fitness_ourfeatureshmp_page_title_'.$i, 'Dog');
									$lz_fitness_ourfeatureshmp_page_description = get_theme_mod('lz_fitness_ourfeatureshmp_page_description_'.$i, 'Lorem ipsum simply free text in the market');

									$lz_fitness_ourfeatureshmp_page_id = get_theme_mod('lz_fitness_ourfeatureshmp_page'.$i); 
									$lz_fitness_ourfeatureshmp_page_icon = get_theme_mod('lz_fitness_ourfeatureshmp_page_icon'.$i);
									if($lz_fitness_ourfeatureshmp_page_icon){

										?>
										<div class="<?php echo $colCls;?> complete-featurebox wow zoomIn" >
											<figure class="pc-ser-box">

												<img src="<?php echo esc_url($lz_fitness_ourfeatureshmp_page_icon); ?>" class="img-responcive" />
												<figcaption></figcaption>
												<a href="<?php echo esc_url(!empty($url)?$url:'#');?>"></a>
											</figure>
											<div class="homepage-featured-content">
												<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
												<h3 class="title"><?php echo $lz_fitness_ourfeatureshmp_page_title; ?></h3>
											</a>
												<p class="post"><?php echo $lz_fitness_ourfeatureshmp_page_description; ?></p>
											</div>
										</div>
										<?php

									}
								}else{?>
									<div class="<?php echo $colCls;?> complete-featurebox wow zoomIn">
										<figure class="pc-ser-box our-team">
											<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/pet1.jpg" class="img-responcive" />
											<figcaption></figcaption>
											<a href="#"></a>
										</figure>
										<div class="homepage-featured-content">
											<h3 class="title">Dog</h3>
											<p class="post">Lorem ipsum simply free text in the market</p>
										</div>
									</div>
								<?php }

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

	</section> 
	<script>
		jQuery.noConflict();
		$(function(){
			function homepagefeaturedcontentHeight(){
				var ht = 0;
				$('section#ht-our-featured-section .homepage-featured-content').each(function(i){
					var tHt = $(this).height();
					if(ht<tHt){
						ht=tHt;
					}
				});
				$('section#ht-our-featured-section .homepage-featured-content').height(ht+'px');
			}
			homepagefeaturedcontentHeight();
		});
		$( window ).resize(function(){
			homepagefeaturedcontentHeight();
		});
	</script>
<?php } 