function init()
{
	lnks = document.getElementsByTagName("a");
	for(i=0; i<lnks.length; i++)
	{
		lnks[i].onfocus = new Function("if(this.blur)this.blur()");
	}
}
onload = init;


function windowResize(sizeX, sizeY)
{
	posX = (screen.width / 2) - (sizeX / 2);
	posY = (screen.height / 2) - (sizeY / 2);

	window.resizeTo(sizeX, sizeY);
	window.moveTo(posX, posY);
}


$(document).ready(function(){
	// Start: jQuery Fancybox for Contao //
	$('a[rel*=lightbox]').each(function(){
		var value = $(this).attr('rel');
		value = value.replace('[', '_');
    	value = value.replace(']', '');
    	$(this).addClass('lightbox');
		$(this).removeAttr('rel');
		$(this).attr('rel', value);
    });

    $('a.lightbox').fancybox({
    	'cyclic': true,
		'hideOnContentClick': true,
		'overlayColor': '#000000',
		'overlayOpacity': 0.3,
		'titlePosition': 'over' // outside, inside, over
	});
	// End: jQuery Fancybox for Contao //
});
