var EffectSpeed = 200;



/**
*	Standaard alle links met # false laten returnen zodat er niet naar boven gegaan wordt
*/

$(document).ready(function()
{
	$("a[href=#]").click(function()
	{
		return false;
	})

	$("a[rel=external]").click(function()
	{
		$(this).attr("target", "_blank");
	})
});


function limitText(limitField, limitCount, limitNum)
{
	if (limitField.value.length > limitNum)
	{
		limitField.value = limitField.value.substring(0, limitNum);
	}
	else
	{
		limitCount.value = limitNum - limitField.value.length;
	}
}

function writeFlash(p) {
	writeEmbed(
	'D27CDB6E-AE6D-11cf-96B8-444553540000',
	'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
	'application/x-shockwave-flash',
	p
	);
}

function writeEmbed(cls, cb, mt, p) {
	var h = '', n;

	h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
	h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
	h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
	h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
	h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
	h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
	h += '>';

	for (n in p)
	h += '<param name="' + n + '" value="' + p[n] + '">';

	h += '<embed type="' + mt + '"';

	for (n in p)
	h += n + '="' + p[n] + '" ';

	h += '></embed></object>';

	document.write(h);
}

$(document).ready(function()
{

	//$('.head a.logo img').rotate(-0);

	$('div.images span.image1 img').rotate(2);
	$('div.images span.image2 img').rotate(-9);
	$('div.images span.image3 img').rotate(17);
	$('div.images.blogoverview span.blog1 img,div.images.blogoverview span.blog4 img').rotate(4.5);
	$('div.images.blogoverview span.blog2 img').rotate(10);
	$('div.images.blogoverview span.blog3 img').rotate(-8.5);
	$('div.images.blogoverview span.blog5 img').rotate(19);
	$('div.images.blogoverview span.blog6 img').rotate(-1);


	$("a.fancy").fancybox();

	$("a.font-size-small").mousedown(function()
	{
		$("#body").css("fontSize","10px");
		$.post(strPath + "ajax_utilities.php", "type=font-size&value=1");
	});
	$("a.font-size-medium").click(function()
	{
		$("#body").css("fontSize","12px");
		$.post(strPath + "ajax_utilities.php", "type=font-size&value=2");
	});
	$("a.font-size-large").click(function()
	{
		$("#body").css("fontSize","15px");
		$.post(strPath + "ajax_utilities.php", "type=font-size&value=3");
	});
});



