$(document).ready(function(){	
									
	kaarten('lunchkaart');
	kaarten('dinerkaart');
									
	Cufon.replace('#containerhome b,#containerhome strong span, #footer, #kalender li *', { fontFamily: 'Eat', hover: true });
Cufon.replace('#container ul li a, h2, h3, a.interactieblok', { fontFamily: 'Eat', hover: true, textShadow: '1px 1px rgba(0,0,0,0.75)' });
									
	$('#top').css('top',-24+'px');
	$('#top').animate({top:0},1000);									
	$('#bottom').css('bottom',-41+'px');
	$('#bottom').animate({bottom:0},1000);					
	$('#footer').css('bottom',-41+'px');
	$('#footer').animate({bottom:40},1000);
	
	if($("#containerhome").length!=0){
		$("#containerhome *").hover(function(){
			$("#containerhome").addClass('hover');
		},function(){
			$("#containerhome").removeClass('hover');			
		});
	}
						   
	center();
	$(window).resize(function() { center(); });

	$('.interactieblok').mouseout(function(){
		Cufon.replace('a.interactieblok', { fontFamily: 'Eat', hover: true, textShadow: '1px 1px rgba(0,0,0,0.75)' });			
	});
						   
	$.preloadCssImages();
	
	/* Hover op home */
	$("#link").hover(function(){ $("#containerhome").addClass("hover"); }, function(){ $("#containerhome").removeClass("hover"); });			
	
	/* Het versleepbare menu bouwen */
	if($("#menu").length!=0){
		$("#menu").buildContainers({ 
				containment:"document", 
				elementsPath:"~general/images/elements/", 
				onResize:function(o){}, 
				onClose:function(o){}, 
				onCollapse:function(o){}, 
				onIconize:function(o){}, 
				onDrag:function(o){togglemenu();}, 
				onLoad:function(o){} 
		});
	}
	/* Zorgen dat touwen animeren 
	$(".n").mouseleave(function(e){
		togglemenu();
	});
	$(".n").click(function(e){
		togglemenu();
	});*/
	
	/* Active menu items regelen */	
	var $this;
	$("#container ul li a").click(function(){ $this = $(this); markActiveLink($this); });
	$(".mbcontainercontent h1 a").click(function(){ $this = $('#container ul li:eq(0) a'); markActiveLink($this); });
	
	$('#toggle img:last').hide();
	/* Toggle menu */
	var $j=0;
	$('#toggle').click(function(){
		if($j==0){
			$j=1;
			$('#toggle img').toggle();
			$('#container').toggleMenu('slow', function() {
				$j=0;
				if($(".mbcontainercontent").height()==0){
					$(".mbcontainercontent").css('height','200px');
				}
				else if($(".mbcontainercontent").height()==200){
					$(".mbcontainercontent").css('height',0);
				}
				togglemenu();
			});
			$('#ropes').toggleFade('slow');
			$('#ropessmall').toggleFade('slow');
		}
	});
	$("#ropessmall").hide();


						   
});
