function zoeken(form, where) {
	var values = form.tags.value;
	
	var locationVar = "/"+where+"/search/"+values;
	locationVar=encodeURI(locationVar);
	document.location=locationVar;
	return false;
}

$(function(){

	//aanmeld knop
// 	$('#reg').live('click', function(){
// 		$('body').prepend('<div id="overlayContent" style="position:absolute;z-index:9999;width:300px;background:#fff;border:1px sild black;"></div><div id="overlay" style="top:0;left:0;z-index:999;width:100%;height:100%;position:absolute;background:#000;"></div>');
// 		$('#overlay').css({opacity:0.8});
// 		$.post('/formulier-1', {}, function(html){
// 			$('#overlay').html(html);		
// 		});
// 	});


	$('#pages li').hover(function(){
		$(this).stop(true, true).animate({opacity:0.8});
	}, function(){
		$(this).stop(true, true).animate({opacity:0.5});
	});

	$('#pages .inActive')
		.css('opacity', 0.5)
		.append('<div class="reflectie"/>');
	
	$('#pages li.first').addClass('selected');
	
		
	$('#pages li').click(function(e){
	
		var item = $(this);
		
		$('.content').stop(true, true).animate({
			opacity:0
		}, 100, function(){
			$(this).remove(); 
		});

		$('.active').stop(true, true).animate({
			left:parseInt($(this).position().left)-100,
		}, 1000, function(){
			$('.active').append('<div class="content">'+item.find('.contentSmall').html()+'</div>');
			$('.active .content').css('opacity', 0);
			$('.active .content').stop(true, true).animate({opacity:1}, 1000);
			
			if(item.hasClass('reg')) {
				//$('.content').prepend('<div id="reg">Aanmelden</div>');
			}
			else {
				$('#reg').remove();
			}	
		});

		
	});
	
	$('#footer').css({
		opacity:0.8
	});
	
	
});
