<?php global $qaleb;?>
<?php if($qaleb['media-home-ac']=='1'){?>
<div class="pwstabs">
<div class="container">
<div class="pwshead">
<div class="pwsheadr"><span><?php echo $qaleb['media-home-title']; ?></span><b></b></div>
<div class="pwsheadl">
<button class="tablinks" onclick="openCity(event, 'video')" id="defaultOpen"><?php echo $qaleb['video-h-title']; ?></button>
<?php if($qaleb['photo-h']=='1'){?><button class="tablinks" onclick="openCity(event, 'photo')"><?php echo $qaleb['photo-h-title']; ?></button><?php } ?>
<?php if($qaleb['sound-h']=='1'){?><button class="tablinks" onclick="openCity(event, 'sound')"><?php echo $qaleb['sound-h-title']; ?></button><?php } ?> 
</div>
</div>

<div id="video" class="pwscontent"><?php get_template_part('inc/templates/media/video'); ?></div>

<?php if($qaleb['photo-h']=='1'){?>
<div id="photo" class="pwscontent"><?php get_template_part('inc/templates/media/photo'); ?></div>
<?php } ?>
<?php if($qaleb['sound-h']=='1'){?>
<div id="sound" class="pwscontent"><?php get_template_part('inc/templates/media/sound'); ?></div>
<?php } ?>

</div>
</div>
<script>				
	function openCity(evt, cityName) {
    var i, pwscontent, tablinks;
    pwscontent = document.getElementsByClassName("pwscontent");
    for (i = 0; i < pwscontent.length; i++) {
        pwscontent[i].style.display = "none";
    }
    tablinks = document.getElementsByClassName("tablinks");
    for (i = 0; i < tablinks.length; i++) {
        tablinks[i].className = tablinks[i].className.replace(" active", "");
    }
    document.getElementById(cityName).style.display = "block";
    evt.currentTarget.className += " active";
} 		
</script>		
<script>
document.getElementById("defaultOpen").click();
</script>
          <script>
            $(document).ready(function() {
              var owl = $('.owl-carousel-1');
              owl.owlCarousel({
                rtl: true,
                margin: 20,
                nav: true,
                loop: true,
				autoplay:true,
                autoplayTimeout:5000,
                responsive: {
                  0: {
                    items: 1
                  },				  
                  400: {
                    items: 2
                  },				  				  
                  900: {
                    items: 3
                  },				  				  
                  1300: {
                    items: 4
                  }
                }
              })
            })
          </script>	
<?php } ?>		  