$(document).ready(function()
{
	// Toevoegen aan favorieten (IE & Firefox)
	$('#add_to_favorites').click(function()
	{
		if(document.all)
		{
			if(window.external != undefined && window.external != null)
			{
				window.external.AddFavorite(location.href, document.title);
			}
			else
			{
				alert('Uw browser ondersteunt deze functie niet. Probeer de website a.u.b. handmatig toe te voegen.');
			}
		}
		else if(window.sidebar)
		{
			window.sidebar.addPanel(document.title, location.href, "");
		}
		else
		{
			alert('Uw browser ondersteunt deze functie niet. Probeer de website a.u.b. handmatig toe te voegen.');
		}
		return false;
	});


	// Woordenboek open of dicht schuiven
	$('#dictionary_activate').click(function()
	{
		$('#translation_container').slideUp('fast');
		$('#wordbox_container').slideUp('fast');
		$('#dictionary_input_text').val('');
		$('#spelling_div').slideUp('fast');
		
		if( $('#dictionary_activate').attr('src') == '/themes/hallofryslan.nl/styles/images/menu_dictionary_button.jpg' )
		{
			$('#dictionary_activate').attr('src', '/themes/hallofryslan.nl/styles/images/menu_dictionary_button_close.jpg');
			$('#dictionary_div').slideDown();
		}
		else
		{
			$('#dictionary_activate').attr('src', '/themes/hallofryslan.nl/styles/images/menu_dictionary_button.jpg');
			$('#dictionary_div').slideUp();
		}
	});


	// Spellingscontrole open of dicht schuiven
	$('#spelling_activate').click(function()
	{
		$('#dictionary_div').slideUp('fast');
		$('#wordbox_container').slideUp('fast');
		$('#translation_container').slideUp('fast');
		$('#dictionary_activate').attr('src', '/themes/hallofryslan.nl/styles/images/menu_dictionary_button.jpg');
		
		$('#spelling_div').slideToggle();
	});

});
