<?php  
if (get_theme_mod('dinero_ourclient_enable', true) == true) { ?>		
	<div class="ourclient-area" id="ourclient">
		<div class="ourclient-bg"></div>
		<?php
		$showStatic = true;
		for( $i = 1; $i < 3; $i++ ){
			$url = get_theme_mod('dinero_ourclient_page_url_'.$i, '#');
			$link = get_theme_mod('dinero_ourclient_page_link'.$i);
			$dinero_ourclient_page_id = get_theme_mod('dinero_ourclient_page_icon'.$i); 
			if(!empty($dinero_ourclient_page_id)){
				$showStatic = false;
				break;
			}
		}

		?>
		<div class="<?php if(get_theme_mod('dinero_ourclient_section_width','Box Width') == 'Box Width'){ ?>container <?php } elseif(get_theme_mod('dinero_ourclient_section_width','Box Width') == 'Full Width'){ ?> container-fluid <?php }?>">
			<div class="dinero-ourclient-single-area">  
				<div class="owl-carousel owl-theme">	
				<?php
				$cols = get_theme_mod('dinero_ourclient_npp_count', 5);
				$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-6';
					break;
					case 3:
					case 9:
					$colCls = 'col-md-4 col-sm-4 col-xs-6';
					break;
					case 5:
					case 6:
					case 9:
					case 10:
					case 11:
					case 12:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 13:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 14:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 15:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 16:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 17:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 18:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 19:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					case 20:
					$colCls = 'col-md-2 col-sm-2 col-xs-6';
					break;
					
					default: 
					$colCls = 'col-md-3 col-sm-3 col-xs-6';
					break;
				}
				$icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
				?>

				<?php
				for( $i = 1; $i <= $cols; $i++ ){
					
					if($showStatic === false){
						$url = get_theme_mod('dinero_ourclient_page_url_'.$i, '#');
						$dinero_ourclient_page_id = get_theme_mod('dinero_ourclient_page'.$i); 
						$dinero_ourclient_page_icon = get_theme_mod('dinero_ourclient_page_icon'.$i);
						if($dinero_ourclient_page_icon){
							?>
							<div class="item">
								<div step-match-height="groupName" class="dinero-ourclient-single <?php echo esc_attr(get_theme_mod('dinero_ourclient_box_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('dinero_ourclient_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('dinero_ourclient_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('dinero_ourclient_box_align','Right') == 'Right'){ ?> right <?php } ?> ">
										<a href="<?php echo esc_url(!empty($url)?$url:'#');?>">
											<figure class="dinero-ourclient-logo">
												<img src="<?php echo esc_url($dinero_ourclient_page_icon); ?>" class="img-responsive" />								
											</figure>
										</a>
									</div>
							</div>
							<?php
						}
					}else{?>
						<div class="item">
								<div step-match-height="groupName" class="dinero-ourclient-single <?php echo esc_attr(get_theme_mod('dinero_ourclient_box_onload_effects','wow zoomIn')); ?>" data-wow-duration="2s" style="text-align : <?php if(get_theme_mod('dinero_ourclient_box_align','Left') == 'Left'){ ?> left <?php } elseif(get_theme_mod('dinero_ourclient_box_align','Center') == 'Center'){ ?> center <?php } elseif(get_theme_mod('dinero_ourclient_box_align','Right') == 'Right'){ ?> right <?php } ?> ">										
								<a href="#">
									<figure class="dinero-ourclient-logo">
										<img src="<?php echo esc_html(get_template_directory_uri()); ?>/images/logo1.png" class="img-responsive" />
									</figure>

								</a>
							</div>
					</div>
					<?php }

				}?>
			</div>
			<div class="clearfix"></div>
			</div>
		</div>
	</div> 
	<!-- ourclient Area end -->
	 	<script>
        $(document).ready(function() {
          $('.ourclient-area .owl-carousel').owlCarousel({
           slideSpeed : 1500,
            autoplay: true,
              loop: true,
              margin: 30,
              responsiveClass: true,
              responsive: {
                0: {
                  items: 2,
                  nav: true
                },
                600: {
                  items:3,
                  nav: true
                },
                1000: {
                  items:5,
                  nav: true,
                  loop: true,
                  margin: 15
              }
            }
          })
        })
      </script>
<?php } 