<?php 
/**
 *
 * @package Luzuk Premium
 */
if(get_theme_mod('testimonialals_section_disable') != 'on' ){ ?>
<section id="testimonials-section" class="ht-section lz-testimonials-section">
  <div class="container">
    <?php     
     $testimonialals_title = get_theme_mod('testimonialals_title', 'TESTIMONIALS');
      ?>
      
      <div class="row">
          <div class="ht-section-title-tagline">
            <?php if($testimonialals_title){ ?>
            <?php if($testimonialals_title){ ?>
            <h2 class="ht-section-title lz-testimonials-heading"><?php echo ($testimonialals_title); ?></h2>
            <?php } ?>
            <div class="titleborder"></div>
          <div class="border-separator-outer">
            <div class="outerborder-separator"></div>
                <div class="innerborder-separator"></div>
            </div>
          </div>
          <div class="clearfix"></div>
      </div>

      <?php } ?>  
  <div class="clearfix"></div>
</div>
<div class="container">
    <div class="owl-carousel owl-theme">    
      <?php 
      $showStatic = true;
      $cols = get_theme_mod('luzuk_test_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">        
          <div class="ht-test-member wow fadeInRight">
              <div class="test-contentbox">
                 <div class="test-content">The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc. Richard McClintock, a Latin professor.</div> 
                    <div class="clearfix"></div>
                    <div class="text-designation">CEO of American BDS</div> 
                     <h6 class="member-name">Rabie Elkheir</h6>
                </div>
                    <div class="ht-test-member-image">
                      <img class="secondry-bg" src="<?php echo esc_url(get_template_directory_uri().'/images/test.jpg');?>" alt="testimonials" />
                    </div> 
            <div class="clearfix"></div>
          </div>        
        </div>
        
        <?php 
        }
      } ?>
    </div>
    <div class="clearfix"></div>
    </div>
  <script>
            $(document).ready(function() {
              $('#testimonials-section .owl-carousel').owlCarousel({
                slideSpeed : 1500,
                autoplay: true,
                loop: true,
                margin: 30,
                responsiveClass: true,
                responsive: {
                  0: {
                    items: 1,
                    nav: true
                  },
                  600: {
                    items:1,
                    nav: true
                  },
                  1000: {
                    items:1,
                    nav: true,
                    loop: true,
                    margin: 45
                  }
                }
              })
            })
          </script>
  <script>
        jQuery.noConflict();
        $(function(){
          function httestmemberHeight(){
            var ht = 0;
            $('#testimonials-section .ht-test-member').each(function(i){
              var tHt = $(this).height();
              if(ht<tHt){
                ht=tHt;
              }
            });
            $('#testimonials-section .ht-test-member').height(ht+'px');
          }
          httestmemberHeight();
        });
        $( window ).resize(function(){
          httestmemberHeight();
        });
</script>
</section>

<?php }
