// JavaScript Document
function template_functions () {
	// this function is called from the 'document ready' in a template
	$('#menu img').hover(mover, mout);	
	$('#button_content').bind('click',show_content);
	$('#button_list').bind('mouseover',show_list);
	$('#button_list').bind('click',hide_list);
	$('#menu_list a b').append('<img src="/media/_systeem/new.gif" />');
	
	document.title = 'Morskieft Ontwerpers';
};

function mover () {
	$(this).attr('src','/media/menu-afbeeldingen/' + $(this).attr('class') + '_hover.gif');
}	

function mout () {
	$(this).attr('src','/media/menu-afbeeldingen/' + $(this).attr('class') + '.gif');
}

function show_content() {
		if( $('#content').is(':visible') ) {
			// close the content section only (to toggle the content section)
			$('#content').slideUp();
			$('#button_content').removeClass('pijltje_verticaal');	
		}
		else {
			// open the content and close the list
			$('#content').slideDown();
			$('#button_content').addClass('pijltje_verticaal');
			$('#menu_list').slideUp();
			$('#button_list').removeClass('pijltje_verticaal');			
		}
		this.blur();
		return (false);
}	

function show_list() {
	// open the list section and close the content section
	$('#button_list').addClass('pijltje_verticaal');
	$('#button_content').removeClass('pijltje_verticaal');
	$('#content').slideUp();
	$('#menu_list').slideDown();
	
	this.blur();
	return (false);
}

function hide_list() {
	// close the list section only (to toggle the list section)
	$('#menu_list').slideUp();
	$('#button_list').removeClass('pijltje_verticaal');
	this.blur();
	return (false);
}

