/*
 * Copyright : (c) 2006 Webfish IT Services
 * Website   : http://www.webfish.nl
 * Email     : info@webfish.nl
 * -------------------------------------------------------------------------
 *   $Id: script.js 33 2008-01-15 10:53:23Z caspar $
 * -------------------------------------------------------------------------
 */

function appendOnLoadAlert(str_msg)
{
	var appendOnLoadAlert_oldOnload = (window.onload) ? window.onload : function () { };
	window.onload = function () { appendOnLoadAlert_oldOnload(); alert(str_msg); }
}

function toggleItem(str_item)
{
	$(str_item).toggle();

	return false;
}

$(document).ready(function ()
{
	$('#thumb a').each(function ()
	{
		$(this).attr('lbTitle', $(this).attr('title'));
		$(this).removeAttr('title');
	});

	$('#thumb a').hoverIntent(
		function ()
		{
			$(this).children('span').show(); //fadeIn('fast');
		},
		function ()
		{
			$(this).children('span').hide(); //fadeOut('fast');
		}
	);

	$('#button_colofon').hover(function ()
	{
		$('#colofon').show();
	},
	function ()
	{
		$('#colofon').hide();
	});

	$("a[@rel=external]").each(function(i){
		this.target="_blank";
	});

	$('.lightbox').lightBox({
		fixedNavigation: true,
		txtImage: 'Afbeelding',
		txtOf: ' van '
	});

	$('#button_sponsor').click(function ()
	{
		$.modal($('#sponsor'), {overlay: 80, onOpen: modalOpen});
	});
	
	$('#button_video').click(function ()
	{
		$.modal($('#video'), {overlay: 80, onOpen: modalOpen});
	});
});

function modalOpen(o_dialog)
{
	if (bln_has_pngfix)
		$('.modalCloseImg').ifixpng();
	o_dialog.overlay.fadeIn('fast', function ()
	{
		o_dialog.container.fadeIn('fast', function ()
		{
			o_dialog.data.hide().fadeIn('slow');
		});
	});
}
