//here is the complete code for responsive the navigation menue
function ResponsiveMenu() {
	
    var x = document.getElementById("myTopnav");
	
    if (x.className === "topnav") {
		
        x.className += " responsive";
		
    } else {
		
        x.className = "topnav";
    }
}

$(document).ready(function() {
	
	$('#show_record').DataTable();
//	 $('#show_record').DataTable( {
//        "paging":   false, //Turn off paging, all records on one page
//    } );
	/*here is the complete code for general settings fo dopdowns */
	  $(".ranges").hide();
   
	   $(".specific_date").hide();
	   
	   $(".select_time").change(function(){
		   
			if($(".select_time option:selected").val()=="cr"){
				
			   $(".ranges").show();
			   
			   $(".specific_date").hide();
			   
			 } else if($(".select_time option:selected").val()=="sd"){
				 
				$(".specific_date").show();
				
				$(".ranges").hide();
				
			 }else{
				 
				$(".ranges").hide();
				
				$(".specific_date").hide();
			 }
		  })
		  
	$('#myTopnav a:first').addClass("active");
	
	$('#main_content').append('<span id="load">LOADING...</span>');
//	
	$('#main_content').load("https://wishlist.appsserver.net/bigcommerace_app/cart_rules_app/includes/general.php","",function(){
		
		$('#load').hide();	
		
	});
	
	$('#myTopnav a').click(function(){
		
		$(this).siblings().removeClass("active");
		
		$(this).addClass("active")
								  
		var toLoad = $(this).attr('href');
		
		$('#main_content').hide('fast',loadContent);
		
		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-4);
		
		function loadContent() {
			
			$('#main_content').show().empty().append('<span id="load">LOADING...</span>');
			
			$('#main_content').load(toLoad,"",function(){
				
				$('#load').hide();
				
				$('#main_content').show()
				
			})
		}
		
		return false;
		
	});

});