<?php  

if(get_theme_mod('premium_addresstime_section_disable') != 'on' ){
	?>
	<?php 
	if( get_theme_mod('testimoniBoxTpadding',true) ) {
		$testimoniBoxTpadding = 'padding-top:'.esc_attr(get_theme_mod('testimoniBoxTpadding')).';';
	}
	if( get_theme_mod('testimoniBoxBpadding',true) ) {
		$testimoniBoxBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('testimoniBoxBpadding')).';';
	}
	if( get_theme_mod('testimoniBoxLpadding',true) ) {
		$testimoniBoxLpadding = 'padding-left:'.esc_attr(get_theme_mod('testimoniBoxLpadding')).';';
	}

	if( get_theme_mod('testimoniBoxRpadding',true) ) {
		$testimoniBoxRpadding = 'padding-right:'.esc_attr(get_theme_mod('testimoniBoxRpadding')).';';
	}

	if( get_theme_mod('TestimonialSectionOverlayOpacity',true) ) {
		$TestimonialSectionOverlayOpacity = 'opacity:'.esc_attr(get_theme_mod('TestimonialSectionOverlayOpacity')).';';
	}

	if( get_theme_mod('TestimonialSectionBottomPadding',true) ) {
		$TestimonialSectionBottomPadding = 'padding-bottom:'.esc_attr(get_theme_mod('TestimonialSectionBottomPadding')).';';
	}
	if( get_theme_mod('TestimonialSectiontopPadding',true) ) {
		$TestimonialSectiontopPadding = 'padding-top:'.esc_attr(get_theme_mod('TestimonialSectiontopPadding')).';';
	}	

	?>
	<section id="appointment" class="ht-section" >
		<div class="app-test-overlay" style="<?php echo esc_attr($TestimonialSectionOverlayOpacity); ?>"></div>
		
		<div class="single-app-top-bx" data-wow-duration="1s">
			
			<div class="complete-top-bx" >

				<div class="row row-eq-height">
					<?php if( get_theme_mod('single_testimonial_display','show' ) == 'show') :
						?>	 
						<div class="col-md-4 col-sm-4 single-testimonial text-center" >

							<?php     
							$testimonialals_title = get_theme_mod('testimonialals_title', 'Client <span>Testimonials</span>');
							$testimonialals_subtitle = get_theme_mod('testimonialals_subtitle', 'HEADING HERE');
							?>

							<?php if($testimonialals_subtitle || $testimonialals_title){ ?>
								<div class="section-title-subtitle">
									<div class="section-subheading text-center">
										<?php
										if(!empty($testimonialals_subtitle))  {
											echo ($testimonialals_subtitle);
										} ?>										
									</div>
									<div class="section-heading text-center">
										<?php
										if(!empty($testimonialals_title))  {
											echo ($testimonialals_title);
										} ?>
									</div>
								</div>
							<?php }?>
							<div class="owl-carousel owl-theme">    
								<?php 
								$showStatic = true;
								$cols = get_theme_mod('testimonials_npp_count', 2);
								$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 7:
									case 8:
									case 9:
									case 10:
									case 11:
									case 12:
									$colCls = 'col-md-4 col-sm-6 col-xs-12';
									break;
									default:
									$colCls = 'col-md-3 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'); 

								for( $i = 1; $i <= $cols; $i++ ){
									$testimonialals_page_id = get_theme_mod('testimonialals_page'.$i); 
									$testimonialals_page_icon = get_theme_mod('testimonialals_page_icon'.$i);
									if($testimonialals_page_id){
										$showStatic = false;
										echo testimonialShortCode($testimonialals_page_id, $isCustomizer=true, $i);
									}
								}
      // adding the static content
								if($showStatic === true){
									for( $i = 1; $i <= $cols; $i++ ){ ?>
										<div class="item testimonial-inner"> 
											<div class="client-image">
												<i class="fa fa-quote-left"></i>
												<img class="secondry-bg img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/testimg1.jpg');?>" alt="testimonials" />
												<div class="clearfix"></div>
											</div>       
											<div class="testimonial-inner-content">
												<p>
													ante sem sed sapien. Phasellus id convallis ligula. Aliquam erat volutpat. Aliquam erat volutpat. Quisque posuere elit ut efficitur hendrerit. Vestibulum aliquet ac eros.
												</p>
												<h6 class="client-name">John Marker</h6>
											</div>        
										</div>

										<?php 
									}
								} ?>
							</div>
							<script>
								$(document).ready(function() {
									$('section#appointment .owl-carousel').owlCarousel({
										loop:true,
										margin:0,
										dots:true,
										nav:false,
										mouseDrag:true,
										autoplay:true,
										animateOut: 'slideOutDown',
										responsive:{
											0:{
												items:1
											},
											600:{
												items:1
											},
											1000:{
												items:1
											}
										}
									})
								})
							</script>
							<?php if( get_theme_mod('appo_animation_display','show' ) == 'show') :
								?>
								<ul class="bubbles"> 
									<li></li>
									<li></li>
									<li></li>
									<li></li>
									<li></li>
									<li></li>
									<li></li>
								</ul>
							<?php endif ?>
						</div>
					<?php endif ?>
					<?php if( get_theme_mod('formdetailsbx_button_display','show' ) == 'show') :
						?>	
						<div class="col-md-4 col-sm-4 appointmentsection padding0">
							<div class="inside-full-height">
								<?php
								$addresstime_formsubtitle = get_theme_mod('addresstime_formsubtitle', 'HEADING HERE');
								$addresstime_formtitle = get_theme_mod('addresstime_formtitle', 'Booking <span>Form</span>');
								$addresstime_form_shortcode = get_theme_mod('addresstime_form_shortcode', 'Add your form shortcode on customiser');
								?>

								<?php 
								if( get_theme_mod('AppointmentFormBoxTpadding',true) ) {
									$AppointmentFormBoxTpadding = 'padding-top:'.esc_attr(get_theme_mod('AppointmentFormBoxTpadding')).';';
								}
								if( get_theme_mod('AppointmentFormBoxBpadding',true) ) {
									$AppointmentFormBoxBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('AppointmentFormBoxBpadding')).';';
								}
								if( get_theme_mod('AppointmentFormBoxLpadding',true) ) {
									$AppointmentFormBoxLpadding = 'padding-left:'.esc_attr(get_theme_mod('AppointmentFormBoxLpadding')).';';
								}

								if( get_theme_mod('AppointmentFormBoxRpadding',true) ) {
									$AppointmentFormBoxRpadding = 'padding-right:'.esc_attr(get_theme_mod('AppointmentFormBoxRpadding')).';';
								}
								?>									
								<div class="ht-appintment-member-wrap" >

									<?php if($addresstime_formsubtitle){ ?>
										<div class="section-subheading text-center">
											<?php echo ($addresstime_formsubtitle); ?>
										</div>
									<?php } ?>
									<?php if($addresstime_formtitle){ ?>
										<div class="section-heading text-center main">
											<?php echo ($addresstime_formtitle); ?>
										</div>
									<?php } ?>
									<div class="clearfix"></div>
									<?php echo do_shortcode($addresstime_form_shortcode);?>
									<div class="clearfix"></div>
								</div>
							</div>
							<div class="clearfix"></div>
						</div>
					<?php endif ?>
					<?php if( get_theme_mod('timingdetailsbx_button_display','show' ) == 'show') :
						?>	
						<div class="col-md-4 col-sm-4 padding0">
							<div class="timesection">
								<?php 
								if( get_theme_mod('OpeningHoursBoxTpadding',true) ) {
									$OpeningHoursBoxTpadding = 'padding-top:'.esc_attr(get_theme_mod('OpeningHoursBoxTpadding')).';';
								}
								if( get_theme_mod('OpeningHoursBoxBpadding',true) ) {
									$OpeningHoursBoxBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('OpeningHoursBoxBpadding')).';';
								}
								if( get_theme_mod('OpeningHoursBoxLpadding',true) ) {
									$OpeningHoursBoxLpadding = 'padding-left:'.esc_attr(get_theme_mod('OpeningHoursBoxLpadding')).';';
								}

								if( get_theme_mod('OpeningHoursBoxRpadding',true) ) {
									$OpeningHoursBoxRpadding = 'padding-right:'.esc_attr(get_theme_mod('OpeningHoursBoxRpadding')).';';
								}
								?>		
								<div class="inside-full-height" >

									<?php
									$addresstime_timesubtitle = get_theme_mod('addresstime_timesubtitle', 'HEADING HERE');
									$addresstime_timetitle = get_theme_mod('addresstime_timetitle', 'Opening <span>Hours</span>');

									$addresstime_subtimetitle = get_theme_mod('addresstime_subtimetitle', 'Contact us for appointment');
									$addresstime_subtimephone = get_theme_mod('addresstime_subtimephone', '012-345-78953');

									$addresstime_monday = get_theme_mod('addresstime_monday', 'MONDAY');
									$addresstime_tueday = get_theme_mod('addresstime_tueday', 'TUESDAY');
									$addresstime_wedday = get_theme_mod('addresstime_wedday', 'WEDNSDAY');
									$addresstime_thurdday = get_theme_mod('addresstime_thurdday', 'THURSDAY');
									$addresstime_friday = get_theme_mod('addresstime_friday', 'FRIDAY');
									$addresstime_satday = get_theme_mod('addresstime_satday', 'SATURDAY ');
									$addresstime_sunday = get_theme_mod('addresstime_sunday', 'SUNDAY');

									$addresstime_montime = get_theme_mod('addresstime_montime', '10 am - 7 pm');
									$addresstime_tuetime = get_theme_mod('addresstime_tuetime', '10 am - 7 pm');
									$addresstime_wedtime = get_theme_mod('addresstime_wedtime', '10 am - 7 pm');
									$addresstime_thurdtime = get_theme_mod('addresstime_thurdtime', '10 am - 7 pm');
									$addresstime_fritime = get_theme_mod('addresstime_fritime', '10 am - 7 pm');
									$addresstime_sattime = get_theme_mod('addresstime_sattime', '11 am - 5 pm');
									$addresstime_suntime = get_theme_mod('addresstime_suntime', '11 am - 5 pm');
									?>
									<?php if($addresstime_timesubtitle){ ?>
										<div class="section-subheading text-center subtagline">
											<?php echo ($addresstime_timesubtitle); ?>
										</div>
									<?php } ?>
									<?php if($addresstime_timetitle){ ?>
										<div class="section-heading text-center">
											<?php echo ($addresstime_timetitle); ?>
										</div>
									<?php } ?>
									<div class="time-content">
										<?php if($addresstime_monday || $addresstime_montime ){ ?>
											<div class="single-time">
												<span><?php echo ($addresstime_monday); ?></span><br>
												<span class="time"><?php echo ($addresstime_montime); ?></span>
											</div>
										<?php }?>

										<?php if($addresstime_tueday || $addresstime_tuetime ){ ?>
											<div class="single-time"><span><?php echo ($addresstime_tueday); ?></span><br>
												<span class="time"><?php echo ($addresstime_tuetime); ?></span></div>
											<?php }?>
											<?php if($addresstime_wedday || $addresstime_wedtime ){ ?>
												<div class="single-time">
													<span><?php echo ($addresstime_wedday); ?></span><br>
													<span class="time"><?php echo ($addresstime_wedtime); ?></span>
												</div>
											<?php }?>
											<?php if($addresstime_thurdday || $addresstime_thurdtime ){ ?>
												<div class="single-time"><span><?php echo ($addresstime_thurdday); ?></span><br>
													<span class="time"><?php echo ($addresstime_thurdtime); ?></span></div>
												<?php }?>

												<?php if($addresstime_friday || $addresstime_fritime ){ ?>
													<div class="single-time"><span><?php echo ($addresstime_friday); ?></span><br>
														<span class="time"><?php echo ($addresstime_fritime); ?></span></div>
													<?php }?>

													<?php if($addresstime_satday || $addresstime_fritime ){ ?>
														<div class="single-time"><span><?php echo ($addresstime_satday); ?></span><br>
															<span class="time"><?php echo ($addresstime_sattime); ?></span></div>
														<?php }?>
														<?php if($addresstime_sunday || $addresstime_suntime ){ ?>
															<div class="single-time"><span><?php echo ($addresstime_sunday); ?></span><br>
																<span class="time"><?php echo ($addresstime_suntime); ?></span></div>
															<?php }?>
														</div>
													</div>
												</div>
											</div>
										<?php endif ?>
									</div>
									<div class="clearfix"></div>
								</div>
								<div class="clearfix"></div>

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

						</section>
						<script>
							jQuery.noConflict();
							$(function(){
								function innerappHeight(){
									var ht = 0;
									$('section#appointment .inner-app').each(function(i){
										var tHt = $(this).height();
										if(ht<tHt){
											ht=tHt;
										}
									});
									$('section#appointment .inner-app').height(ht+'px');
								}
								innerappHeight();
							});
							$( window ).resize(function(){
								innerappHeight();
							});
						</script>

					<?php } 