<div id="baxtop" class="clearfix">
	<div id="boxtop" class="clearfix">
		<div id="boxlogom">
			<?php
				include "../libs/functiondb.php";
				$ldb = mysqli_query($koneksi, "SELECT * FROM cmas_logo");
				$ldt = mysqli_fetch_array($ldb);
			?>
			<a href="./">
				<img src="assets/images/<?php echo $ldt['logo_gambar']; ?>" alt="<?php echo $ldt['logo_nama']; ?>" title="<?php echo $ldt['logo_nama']; ?>" width="<?php echo $ldt['logo_lebar']; ?>" height="<?php echo $ldt['logo_panjang']; ?>">
			</a>
		</div>
		<link href="assets/css/menufixed.css" rel="stylesheet" type="text/css" />
		<nav id="nav">
			<div id="boxsnav" class="clearfix">
				<div id="boxlogo">
					<?php
						include "../libs/functiondb.php";
						$ldb = mysqli_query($koneksi, "SELECT * FROM cmas_logo");
						$ldt = mysqli_fetch_array($ldb);
					?>
					<a href="./">
						<img src="assets/images/<?php echo $ldt['logo_gambar']; ?>" alt="<?php echo $ldt['logo_nama']; ?>" title="<?php echo $ldt['logo_nama']; ?>" width="<?php echo $ldt['logo_lebar']; ?>" height="<?php echo $ldt['logo_panjang']; ?>">
					</a>
				</div>
				<div id="boxmenu">
					<ul>
						<?php
							$medb = mysqli_query($koneksi, "SELECT * FROM cmas_menu WHERE menu_status='Aktif' AND menucat_id='1' ORDER BY menu_order ASC");
							while($medt = mysqli_fetch_array($medb)) {
						?>
							<a href="<?php echo $medt['menu_seo']; ?>"><li><span><?php echo $medt['menu_nama']; ?></span></li></a>
						<?php } ?>
					</ul>
				</div>
			</div>
		</nav>	
		<script>
			$(document).ready(function(){
				
				$('nav').prepend('<div id="responsive-nav" style="display:none;vertical-align:middle;">MENU</div>');
				$('#responsive-nav').on('click',function(){
					$('nav ul').slideToggle()
				});
				
				$(window).resize(function(){
					
					if ($(window).innerWidth() < 768) {
						$('nav ul li').css('display','block');
						$('nav ul').hide()
						$('#responsive-nav').show()
						} else {
						$('nav ul li').css('display','inline-block');
						$('nav ul').show()
						$('#responsive-nav').hide()
					}
					
				});
				
				$(window).resize();
				
			});
			
			$(document).on('scroll',function(){
				
				if ($(document).scrollTop() > 60) {
					$('#nav').addClass('fixed')
					} else {
					$('#nav').removeClass('fixed')
				}
				
			});
		</script>
	</div>
</div>