Last = 0;
L_th = 0;
function moover(liid, th) {
	if (Last) {
		Last.style.display = 'none';
		L_th.style.color = '#ffffff';
		L_th.style.background = '#000066';
	}	
	Last = document.getElementById(liid);
	Last.style.display = 'block';
	L_th = document.getElementById(th);
	L_th.style.color = '#000066';
	L_th.style.background = '#99cc33';
}

$(document).ready(function() {
	$('.menu_link').hover(

		//mouse in
		function()
		{
			var id = $(this).attr('id');
			$('#panel_nav').css('background-image','url(Images/' + id + ')');
		},
		//mouse out
		function()
		{
			//doing nothing on 'out', just on 'in'
		}
	);
	
	//preload images dynamically
	preloadImages();
});


function preloadImages()
{
	var preloader = '<div id="preloader" style="display:none;">';

	var i = 0;
	$('.menu_link').each(function() {
		var id = $(this).attr('id');
		
		
		
		preloader += '<img src="Images/' + id + '" />';
		i++;
	});
	
	preloader += '</div>';
	
	$('body').append( preloader );
}

$(document).ready(function() {
	$('.answer').hide();
	$('#faq h2').toggle (
		function() {
		$(this).next('.answer').fadeIn();
		$(this).addClass ('close')
},
	function() {
	$(this).next('.answer').fadeOut();
	$(this).removeClass('close')
}
); //end of toggle()
}); //end of ready()