<?php
/**
 *
 * @package LZ Fitness Premium
 */
if(get_theme_mod('lz_fitness_causes_section_disable') != 'on' ){ ?> 
<section id="ht-event-section" class="lz-event-section">
	<div class="lightbox overlay">
		<?php
		// echo "post id: ". 
		$lz_fitness_causes_page_id = get_theme_mod('lz_fitness_causes_page');	
		  // echo '<br>title '.		
		$lz_fitness_causes_title = get_theme_mod('lz_fitness_causes_title','OUR EVENTS');
		$lz_fitness_causes_sub_title = get_theme_mod('lz_fitness_causes_sub_title', 'There are many variations passes Lorem Ipsum available but the majority have suffered alteation some form.');
		?>
		<div class="container">		
		<?php if( $lz_fitness_causes_title || $lz_fitness_causes_sub_title ){ ?>
		<div class="row">
			<div class="col-md-12">
				<div class="ht-section-title-tagline">
					
					<?php if($lz_fitness_causes_title){ ?>
					<h2 class="ht-section-title lz-causes-heading"><?php echo($lz_fitness_causes_title); ?></h2>
					<?php } ?>
					<div class="clearfix"></div>

					<?php if($lz_fitness_causes_sub_title){ ?>
					<div class="col-md-6 col-md-offset-3 lz-causes-text"><?php echo ($lz_fitness_causes_sub_title); ?></div>
					<?php } ?>
					<div class="clearfix"></div>
				</div> 
			</div>
		</div>
		<?php } ?>
		<div class="clearfix"></div>
	</div>
	<div class="container">
	<!-- <div class="ht-team-member-wrap ht-clearfix"> -->
		<?php 
		$showStatic = true;
		$cols = get_theme_mod('lz_fitness_causes_npp_count', 1);
		$cols++;
		switch($cols){
			case 1:
                $colCls = 'col-md-12 col-sm-12';
                break;
			case 3:
			case 4:
			case 5:
			case 6:		
				$colCls = 'col-md-6 col-sm-6';
				break;
				default: 
              $colCls = 'col-md-6 col-sm-6 col-xs-12';
               break;
		}
		for( $i = 1; $i <= $cols; $i++ ){
			$lz_fitness_causes_page_id = get_theme_mod('lz_fitness_causes_page'.$i); 
			$lz_fitness_causes_page_icon = get_theme_mod('lz_fitness_causes_page_icon'.$i);
			if($lz_fitness_causes_page_id){
				$showStatic = false;
				echo eventsShortcode($lz_fitness_causes_page_id, $isCustomizer=true, $i);
			} 
		}
		// adding the static content
		if($showStatic === true){
			for( $i = 1; $i <= $cols; $i++ ){ ?>
			<div class="<?php echo $colCls;?> event-box">
				<div class="ht-causes-member paddingBot20">
					<div class="ht-causes-member-image">
						<img class="secondry-bg img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/event.png');?>" alt="img" />
					</div>
					<div class="clearfix"></div>
					<div class="causes-main-box">
					<div class="ht-title-causes">
				 		<h6 class="event-name"><a href="#">Contrary to popular belief random</a></h6>
				 	</div>
				 	<div class="ht-event-date text-center">
				 		<ul>
				 			<li>17 september <span>2018</span></li>
				 			<li>Sunday <span>10:00 am - 10:00 pm</span></li>
				 		</ul>
				 	</div>
				 	<div class="ht-causes-contents">
				 		<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard Mlintck, a Latin professor at Hampden Sydney College in Virginia, looked up one of the more obscure Latin words.</p>
				 	</div>
				 	<div class="featured-link">
				 		<a href="#"> Read More</a>
				 	</div>
				 </div>
				 
				</div>	
					<div class="clearfix"></div>			 
			</div>
			<?php 
			}
		} ?>
		<div class="clearfix"></div>

	<div class="clearfix"></div>
	</div>	
	<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
</section>
<!--<script>
		$(function(){
			function causesmainboxHeight(){
				var ht = 175;
				$('.causes-main-box p').each(function(i){
					var tHt = $(this).height();
					if(ht<tHt){
						ht=tHt;
					}
				});
				$('.causes-main-box p').height(ht+'px');
			}
			causesmainboxHeight();
		});
		$( window ).resize(function(){
			causesmainboxHeight();
		});
	</script>-->
<?php }

