<script src="<?php echo base_url();?>resources/js/jquery.idTabs.min.js"></script>
<hr class="thick-line" style="clear:both;">
<a href="<?php echo $main_history;?>">Kembali</a>
<div id='content' style="margin: 5px;margin-top:10px;">
	<div id="usual2" class="usual"> 
		<ul>
			<li class='tab'><a href="#tabs1" id= 'tabInfo' class="selected loaded">Data Arsip</a></li>
			<li class='tab'><a href="#tabs2" id= 'tabInfo'>Data Peminjaman</a></li>
		</ul>
		<input type="hidden" id="refresh_dest" value="<?php echo $history;?>">
		<div id="tabs1"></div>
		<div id="tabs2"></div>
	</div>
</div>

<script type="text/javascript"> 
$("#usual2 ul").idTabs("tabs1");
$('#tabs1').load('<?php echo base_url("manage_arsip_c/tab_arsip_detail/".$enc);?>');
$( document ).ready(function() {
	$('a#tabInfo').click(function(event){
		if (!$(this).hasClass('loaded')){
			if($(this).attr('href')=='#tabs1'){
				$('#tabs1').load('<?php echo base_url("manage_arsip_c/tab_arsip_detail/".$enc);?>');
				$('a[href=#tabs1]').addClass('loaded');
			}else if($(this).attr('href')=='#tabs2'){
				$('#tabs2').load('<?php echo base_url("manage_arsip_c/tab_peminjaman_detail/".$enc);?>');
				$('a[href=#tabs2]').addClass('loaded');
			}
		}
	});
});
function refreshPage(){
    window.open('<?php echo $history;?>','_self');
};
</script>