$(document).ready(function($){
	function initMenu() {
		$('#menu_top ul').hide();
		$('#menu_top ul.active').show();
		$('#menu_top li a').click( function() {
			var checkElement = $(this).next();
			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
				return false;
			}
			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
				$('#menu_top ul:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		});
		$('#menu_bottom ul').hide();
		$('#menu_bottom ul.active').show();
		$('#menu_bottom li a').click( function() {
			var checkElement = $(this).next();
			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
				return false;
			}
			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
				$('#menu_bottom ul:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		});
	}
	initMenu();
	$('#printbutton').bind('click', function() {
	  window.location = '?print';
	});
	$('.scroll-pane').jScrollPane();
});

