    <script>
    $(document).ready(function() {
    $('.sidebar-nav').navgoco();
    });
    </script>   
    
      <script type="text/javascript">
      /*
      $(document).ready(function() {
      $('.sidebar-nav').navgoco();
      });
      */
      </script> 

<script type="text/javascript" >
$(document).ready(function() {
	// Initialize navgoco with default options
	$(".sidebar-nav").navgoco({
		caretHtml: '',
		accordion: true,
		openClass: 'open',
		save: true,
		cookie: {
			name: 'navgoco',
			expires: false,
			path: '/'
		},
		slide: {
			duration: 400,
			easing: 'swing'
		},
		// Add active class to clicked menu item
		
		onClickAfter: function(e, submenu) {
		//	e.preventDefault();
			$('.sidebar-nav').find('li').removeClass('active');
			var li =  $(this).parent();
			var lis = li.parents('li');
			li.addClass('active');
			lis.addClass('active');
		},
		
	});

	$("#collapseAll").click(function(e) {
		//e.preventDefault();
		$(".sidebar-nav").navgoco('toggle', false);
	});

	$("#expandAll").click(function(e) {
		//e.preventDefault();
		$(".sidebar-nav").navgoco('toggle', true);
	});
});
</script>    