$(document).ready(function() {
	// add a extra li to the mainmenu to force textalign justify
	$('nav ul').append('<li class="stretch"></li>');
	$('nav').show();	
	
	var cur_stus;
	
	//close all on default
	$('#menu dd').hide();
	$('#menu dt').attr('stus', '');
	       
	$('#menu dt').click(function(){
		cur_stus = $(this).attr('stus');
		if(cur_stus != "active")
		{
			//reset everthing - content and attribute
			$('#menu dd').slideUp();
			$('#menu dt').attr('stus', '');
			
			//then open the clicked data
			$(this).next().slideDown();
			$(this).attr('stus', 'active');
		}
		//Remove else part if do not want to close the current opened data
		else
		{
			$(this).next().slideUp();
			$(this).attr('stus', '');
		}
		return false;
	});
	
	//close all on default
	$('.agenda .moreinfo').hide();
	$('.agenda .info').attr('stus', '');
	       
	$('.agenda .info').click(function(){
		cur_stus = $(this).attr('stus');
		if(cur_stus != "active")
		{
			//reset everthing - content and attribute
			$('.agenda .moreinfo').slideUp();
			$('.agenda .info').attr('stus', '');
			
			//then open the clicked data
			$(this).next().slideDown();
			$(this).attr('stus', 'active');
		}
		//Remove else part if do not want to close the current opened data
		else
		{
			$(this).next().slideUp();
			$(this).attr('stus', '');
		}
		return false;
	});
	
	$('#menu dt').hover(
		function () {
			$(this).css('background-color', '#efefef');
		},
		function () {		  
			$(this).css('background-color', '#ffffff');
		}
	);
	
	
	$('.agenda li').hover(
		function () {
			$('h2', this).css( "color", "#000000" );
			$(this).css('background-color', '#efefef');
		},
		function () {		  
			$('h2', this).css( "color", "#bc9b6a" );
			$(this).css('background-color', '#ffffff');
		}
	);
	
});

