<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');
  
  require_once(ZAZAVILITE . "admin/modules/jtabs/admin_class.php");
  $tab = new jTabs();
  $count = count($tab->renderTabs());
?>
<!-- Start Tab Slider -->
<?php if($tab->renderTabs()):?>
<div id="tabholder">
<div class="tab_controll">
  <ul class="tabs">
    <?php foreach ($tab->renderTabs() as $tbrow):?>
    <li> <span class="inner-pad"><a href="#tab-<?php echo $tbrow['id'];?>"> <?php echo $tbrow['title'.$core->dblang];?></a></span> </li>
    <?php endforeach;?>
  </ul>
  </div>
  <div class="tab_container">
    <?php foreach ($tab->renderTabs() as $tbrow):?>
    <div class="tab_content" id="tab-<?php echo $tbrow['id'];?>"><?php echo cleanOut($tbrow['body'.$core->dblang]);?></div>
    <?php endforeach;?>
  </div>
  <div class="clear"></div>
</div>
<?php unset($tbrow);?>
<script type="text/javascript">
$(document).ready(function () {
	$(".tab_content").hide(); 
	$("ul.tabs li:first").addClass("active").show(); 
	$("ul.tabs li:last").addClass("tabend");
	$(".tab_content:first").show(); 

	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active");
		$(this).addClass("active"); 
		$(".tab_content").hide(); 
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).show();
		return false;
	});
});
</script>
<?php endif;?>
<!-- End Tab Slider /-->