// JavaScript Document

	function sluitEnVervers()
	{
		top.document.location.href='http://www.spiegelzaal.be/koetshuis/vroeger_nu/';
		setTimeout("top.$.fancybox.close();",500);
	}

$(document).ready(function(){
	$('#menu').menu({
			subWidth: 100,
			subHeight: 20,
			subClass: 'sub',
			subBorderStyle: '1px solid #CCCCCC',
			subBackColor: '#FFFFFF',
			linkPadding: '3px',
			topPosition: 17,
			leftPosition: 0,
			showAction: 'slide',
			speed: 500
	});
	
	$("a.fancy").fancybox({
				'width'				: 790,
				'height'			: 575,
				'autoScale'     	: true,
				'transitionIn'		: 'fade',
				'transitionOut'		: 'fade',
				'type'				: 'iframe'		
	});
	
	
	$('#menu').hide();
	$('#logo').hide();
	$('.picture').hide();
	$('#txtbox').hide();
	$('#txtbox2').hide();
	$('#menu').fadeIn(500, function(){
		$('#logo').fadeIn(500, function(){
			$('.picture').fadeIn(1000);
			$('#txtbox').fadeIn(1000);
			$('#txtbox2').fadeIn(1000, function(){
				if ($('#txtbox2 div:first').width() > $('#txtbox2').width()) {
					$('#nextBtn2').fadeIn(500);	
				}
			});		
		});
	});
	
	
	
});

function initVerticalScroller(width)
{
	$('#txtbox2').scroller({
			scrollValue: 388,
			prevId: 'prevBtn2',
			nextId: 'nextBtn2',
			speed: 500,
			hideButtons: 'true',
			direction: 'vertical',
			viewWidth: width + 'px',
			viewHeight: '151px'
	});	
}

function slideImage(target, source)
{
	$('#imagelist li').attr('class', 'thumbBack');
	$(source).parent('li').attr('class', 'active');
	$('#slideshow li').css({'z-index': '0'});
	$('#slideshow li').fadeOut(1000);
	$('#' + target).css({'z-index': '1'});
	$('#' + target).fadeIn(1000);	
	
}

function setCalendar(month, year, url)
{
	location.href = url + $('#' + month).val() + "/" + $('#' + year).val() + "/kalender.htm";	
}
