// JavaScript Document
window.onload = function() {
	$("a.lightbox").fancybox({ padding: 0, overlayOpacity: 0.3, overlayColor: '#000' });
	$("a.inline").fancybox({ padding: 0, overlayOpacity: 0.3, overlayColor: '#000' });
	$("a.iframe").fancybox({padding: 10, overlayOpcaity: 0.3, overlayColor: '#000', hideOnContentClick: false, width: 783, height: 600, autoScale: false, scrolling: 'no' });
}

$(window).ready( updateScreen );
$(window).resize( updateScreen );

function updateScreen()
{
	$('#container').height('auto');
	$('#left-column').height('auto')
	
	var newContentHeight = $(window).height() - $('#left-column').position().top - 45;
	
	if($('#container').height() < $(window).height())
	{
		if($('#content').height() < newContentHeight)
		{ 
			$('#container').height( $(window).height() );
			$('#left-column').height( newContentHeight );
		}
	}
	else
		$('#left-column').height( $('#content').height() );
}

function showHeaderTekst(p_id)
{
	$('#imagetekst p').each( function() {
		$(this).addClass('hidden');
	} );
	
	$('p#'+p_id).removeClass('hidden');
}

