<?php
/**
 *
 * @package LZ Fitness Premium
 */

if(get_theme_mod('lz_fitness_premium_aboutus_section_disable') != 'on' ){
	if(get_theme_mod('lz_fitness_premium_aboutus_section_background') == 'on' ){
		$style = 'background-image: url(\''.get_theme_mod('lz_fitness_about_bg_image').'\');background-position: top;background-size: cover;';
	}else{
		$style = 'background-color: '.get_theme_mod('lz_fitness_about_bg_color').';';
	}
	?>
	<section id="ht-about-us-section" class="ht-section" >
		<div class="lightbox">
			<div class="container">
				<div class=" wow fadeInUp" data-wow-duration="1s">
					<?php
				// echo "post id: ". 
					$lz_fitness_aboutus_page_id = get_theme_mod('lz_fitness_aboutus_page');
			    // echo '<br>title '.
					$lz_fitness_aboutus_title = get_theme_mod('lz_fitness_aboutus_title', 'ABOUT US');

                      //extra//
            // $countword=str_word_count($lz_fitness_aboutus_title);
            // // echo ' hLF '.
            // $halfWd = floor($countword / 2);
            // $wds = explode(' ',$lz_fitness_aboutus_title);
            // $lz_fitness_aboutus_title_new = '';
            // foreach($wds as $k=>$wd){
            //     if($k == $halfWd){
            //         $lz_fitness_aboutus_title_new .= '<span>';
            //     }
            //     $lz_fitness_aboutus_title_new .= $wd.' ';
            //     if(($k+1) == $countword){
            //         $lz_fitness_aboutus_title_new .= '</span>';
            //     }
            // }
            // extra// 

					$lz_fitness_aboutus_subTitle = get_theme_mod('lz_fitness_aboutus_subTitle', 'World Best Education In Our Kindergarten');
					$lz_fitness_aboutus_subtext = get_theme_mod('lz_fitness_aboutus_subtext', 'Loreum Ipsum is simply dummy text of the printing and typesetting industry. Loreum Ipsum has been the industry standard dummy text ever since the 1500s,when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has servieved not only five centuries but also the leap into electronic typesetting');							
						
		        // echo '<br> text '.
					$lz_fitness_aboutus_text = get_theme_mod('lz_fitness_aboutus_text', '
												<ul>
							<li>It was popularised in the 1960s with the release of Letraset sheets containing Loreum Ipsum passages, and more recently with desktop publishing software like Aldus Pagemaker including version of Loreum Ipsum.</li>
							<li>Loreum Ipsum is simply dummy text of the printing and typesetting industry. Loreum Ipsum has been the industry standard dummy text ever since the 1500s.</li>
													</ul>

						');
					?>
						

					<div class="row">
								
								<div class="col-md-7 col-sm-12">
								<div class="ht-section-title-tagline">
									<h2 class="ht-section-title"><?php if(!empty($lz_fitness_aboutus_title)) { echo ($lz_fitness_aboutus_title);}?></h2>

									<!--<h2 class="ht-section-title"><?php //echo !empty($lz_fitness_aboutus_title)?$lz_fitness_aboutus_title:''; ?></h2>-->
									
								<div class="ht-section-tagline">
										<?php echo $lz_fitness_aboutus_subTitle;?>
									</div>
									<div class="ht-section-subtagline">
										<?php echo $lz_fitness_aboutus_subtext;?>
									</div>
									
									<div class="clearfix"></div>
								</div>
									<div class="ht-content lz-about-text">
										<?php
										if($lz_fitness_aboutus_text){
											echo $lz_fitness_aboutus_text;
										}else{
											$args = array(
												'page_id' => absint($lz_fitness_aboutus_page_id)
											);
											$query = new WP_Query($args);
											$query->the_post();
											echo lz_fitness_excerpt( get_the_content(), 250);  
										}?>
									</div>
									<!--<div class="readmore">
										<a href="<?php //echo (!empty($lz_fitness_aboutus_page_id))?esc_url(get_permalink($lz_fitness_aboutus_page_id)):'#'; ?>"><?php //_e( 'Read More', 'lz-fintess-premium' ); ?></a>
									</div>-->
								</div>
								<div class="col-md-5 col-sm-12 padding0 about-content">
									<?php 
									$lz_fitness_about_image = get_theme_mod('lz_fitness_about_image');
									if(!empty($lz_fitness_about_image)){
										echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($lz_fitness_about_image).'" class="img-responsive" />';
									}else{
										echo '<img alt="About Us" src="'.get_template_directory_uri().'/images/about1.jpg" class="img-responsive aboutbox-img" />';
									}
									?>
								</div>
					</div>
				</div>
			</div>
		</div>

	</section>
<?php } 