$(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;
	});


	// Een klik op 'Controleer spelling' afvangen, en toevoegen aan statistieken
	$('#mce_0_spellchecker_action').live('click', function()
	{
		$.ajax(
		{
			type: "POST",
			url: "http://www.wurdboek.imano.nl/misc/dictionary_wurdboek/spellcheckerAddStat.php",
			data: "value=add",
			success: function(msg)
			{
			}
		});
	});

	// Woordenboek open of dicht schuiven
	$('#dictionary_activate').click(function()
	{
		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()
	{
		$('#spelling_div').slideToggle();
	});


});
