var ShBoxOptions = {
		language:				'nl',
		counterType:			'skip',//'default',//'skip',
		overlayOpacity:	   		'0.6',
		//handleUnsupported:  	'remove',
		//onFinish:				galleryElemDesc,
		initialHeight:			'450',//'160',
		initialWidth:			'550',//'320',
		resizeDuration:			'0.2',//'0.55',
		fadeDuration:			'0.15',//'0.35',
		animSequence:			'sync',//'wh',
		handleOversize:			'resize',//'drag',
		continuous:				true,
		players:				["swf","flv","qt","wmp"]
};
// Shadowbox start
Shadowbox.init(ShBoxOptions);

jQuery().ready(function()
{
	
		$("#resulttable .person .wachtkamerregistratie").click(function () 
		{
			//alert('dssd');
			var parentdiv = $(this).parent().parent().parent().parent().parent().children(".info");

			$(parentdiv).append($('.wachtkamer-registratie-uitleg'));
		
		});
		
	
		/*
		$("#resulttable .person .bijzonderheden").hide();
			
		$("#resulttable .person span span:not(.functienaam) a,").click(function () 
		{
			//alert(bijzonderheden);
			var bijzonderheden = $(this).parent().parent().parent().parent().parent().parent().children(".info").children(".bijzonderheden");

			$(bijzonderheden).show();
			return false;
		
		});
		*/
		
		
		//filmpje juiste plek plaatsen:
		// >>> oorzaak van traagheid?
		$("b:contains('Bekijk het filmpje')").after($(".video.inline"));

	
	/* 
			$('ul.navcontainer li ul').hide();
			$('ul.navcontainer li ul ul').hide();
			
			$('ul.navcontainer li.selected ul').show();
			
			$('ul.navcontainer li.haskids').hover(
				
				function()
				{
					
					$('ul', this).slideDown('fast');
				},
				
				function()
				{					
					$('ul', this).slideUp('fast');
				}
			);
	*/
	
		
		// Banners Homepage	
		
		$('#banners div.banner div.content').css('opacity',0.8);
			
			$('#banners div.banner').hover(
				
				function()
				{
					
					$('div.content', this).slideDown('normal');
				},
				
				function()
				{					
					$('div.content', this).slideUp('fast');
				}
			);
			
			
			var news; 
			var curritem=0; 
			
			news = $("#ticker ul li").size(); 
			
			//$("#ticker ul li:eq("+(curritem+1)+")").css({'top': '260px'}).animate({top: 70, opacity: 1},"slow");
			$("#ticker ul li:eq("+(curritem+1)+")").css({'top': '277px'}).animate({top: 87, opacity: 1},"slow");
			$("#ticker ul li:eq("+curritem+")").animate({top: 0, opacity: 1},"slow");
				
			setInterval(scrollvacancy,4000); //time in milliseconds 
		
			function scrollvacancy() 
			{ 
			
				$("#ticker ul li:eq("+curritem+")").animate({top: -110, opacity: 0.4},"slow");
				$("#ticker ul li:eq("+(curritem-1)+")").animate({top: -110, opacity: 0.4},"slow");
				
				curritem = ++curritem%news; 
				
				//$("#ticker ul li:eq("+(curritem+1)+")").css({'top': '260px'}).animate({top: 70, opacity: 1},"slow");
				$("#ticker ul li:eq("+(curritem+1)+")").css({'top': '260px'}).animate({top: 87, opacity: 1},"slow");
				$("#ticker ul li:eq("+curritem+")").animate({top: 0, opacity: 1},"slow");
		
			} 
			
	
		
		
		$("#uitleg div.uitleg").click(function () {
			$("div.content", this).slideToggle("normal");
		});
		
			
	});
	
// jquery media
$(function() {
	
	$.fn.media.defaults.flvPlayer = 'gui/flv_player/mediaplayer.swf';
	$.fn.media.defaults.flashvars = {autostart: 'true'};
	
	$('.media').media({
		width:480,
		height:380,
		autoplay:true,
		caption:false
	});
		
});

function wc()
{
	if(window.console)
	{
		for(var i = 0; i < arguments.length; i++)
		{
			window.console.log(arguments[i]);
		}
	}
}