$(document).ready(function() {
	
	$("a.beeldbankImg").fancybox({
				'titlePosition'  : 'inside'
			});

//	$(".toggleFaqItem").toggle(function () {
//		$('span.antwoord',$(this).parent().parent()).slideDown();
//		//$(".homeHeight1").css('height','auto');
//	},
//	function () {
//		$('span.antwoord',$(this).parent().parent()).slideUp();
//	})
//	$('span.antwoord').css('overflow','hidden');
//	
//	$(".toggleFaqItem").toggle(function () {
//		
//		var faqid=$(this).attr('faqId');
//		$('li#faqId_'+faqid).slideDown('fast',function(){
//				window.location.href="#faqId_"+faqid;
//			});
//	},
//	function () {
//		var faqid=$(this).attr('faqId');
//		$('li#faqId_'+faqid).hide();
//	})
//	$('li.antwoord').css('display','none');
//	
//	
////	$('span.antwoord').slideUp();
//
//$(".tempalte3FotoReplace").click( function() {
//	//	alert($(".t3titel1",$(this).parent()).text());
//	// dit is de div $(this).parent()
//	$("#t3VideoHolder").hide();
//	$("#t3mainImg").attr('src',$(this).attr('href')).show();
//	$("#t3titel1").text($(".t3titel1",$(this).parent()).text());
//	$("#t3titel2").text($(".t3titel2",$(this).parent()).text());
//	return false;
//});
//
//$(".tempalte3VideoReplacevimeo").click( function() {
//	//alert($(this).attr('videoId'));
//	// dit is de div $(this).parent()
//	$("#t3mainImg").hide();
//	$("#t3VideoHolder").replaceWith("<span id='t3VideoHolder'><p><object width='651' height='366'><param name='allowfullscreen' value='true' /><param name='allowscriptaccess' value='always' /><param name=wmode value=transparent><param name='movie' value='http://vimeo.com/moogaloop.swf?clip_id="+$(this).attr('videoId')+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=049ce3&amp;fullscreen=1' /><embed src='http://vimeo.com/moogaloop.swf?clip_id="+$(this).attr('videoId')+"&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=049ce3&amp;fullscreen=1' type='application/x-shockwave-flash' allowfullscreen='true' allowscriptaccess='always' width='651' height='366' wmode='transparent'></embed></object></p></span>").show();
////	$("#t3mainImg").attr('src',$(this).attr('href'));
//	$("#t3titel1").text($(".t3titel1",$(this).parent()).text());
//	$("#t3titel2").text($(".t3titel2",$(this).parent()).text());
//	return false;
//});
//
//$(".tempalte3VideoReplaceyoutube").click( function() {
//	$("#t3mainImg").hide();
//	$("#t3VideoHolder").replaceWith("<span id='t3VideoHolder'><p><object width='651' height='366'><param name='movie' value='http://www.youtube.com/v/"+$(this).attr('videoId')+"&hl=nl&fs=1'></param><param name='allowFullScreen' value='true'><param name='wmode' value='transparent'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/"+$(this).attr('videoId')+"&hl=nl&fs=1' type='application/x-shockwave-flash'  wmode='transparent' allowscriptaccess='always' allowfullscreen='true' width='651' height='366'></embed></object></p></span>").show();
//	$("#t3titel1").text($(".t3titel1",$(this).parent()).text());
//	$("#t3titel2").text($(".t3titel2",$(this).parent()).text());
//	return false;
//});
//
//$(".tempalte2VideoLink").fancybox({
//				'padding'			: 0,
//				'width'		:651,
//				'height'	:366,
//				'overlayOpacity':0.8,
//				'overlayColor':'#000',
//				'autoScale'			: false,
//				'transitionIn'		: 'none',
//				'transitionOut'		: 'none',
//				'type'			: 'swf',
//				'swf'			: {
//								    'wmode'				: 'transparent',
//										'allowfullscreen'	: 'true'
//										}
//
//			});
//$(".buyForm").fancybox({
//				'padding'			: 0,
//				'width'		:550,
//				'height'	:450,
//				'overlayOpacity':0.8,
//				'overlayColor':'#000',
//				'autoScale'			: false,
//				'transitionIn'		: 'none',
//				'transitionOut'		: 'none',
//				'type'			: 'iframe'
//			});
//			
//$(".docAccess").fancybox({
//				'padding'			: 0,
//				'width'		:550,
//				'height'	:180,
//				'overlayOpacity':0.8,
//				'overlayColor':'#000',
//				'autoScale'			: false,
//				'transitionIn'		: 'none',
//				'transitionOut'		: 'none',
//				'type'			: 'iframe'
//			});
//
//	$('form #categorieHoofd, form #categorieSub').change(function () {
//		$(this).parents('form').submit();
//		});
//
//$(".itemscroller").each(function(){
//	//$(this). = een div class='.itemscroller'
//	var items=$('.item',this);
//	var crollerBlock=this;
//	var counter=0;
//	if(items.length <= 4){
//		$('.control_left',crollerBlock).hide();
//		$('.control_right',crollerBlock).hide();
//	}else{
//		$('.control_left',crollerBlock).hide();
//		$('.control_right',crollerBlock).show();
//		$('.control_left',crollerBlock).click(function(e){
//				e.preventDefault();
//				$('.itemcontainer_inner',crollerBlock).animate({"left": "+=230px"}, "slow");
//				counter--;
//				if(counter <= 0){
//					$('.control_left',crollerBlock).fadeOut();
//				}
//				if(counter+4 < items.length){
//					$('.control_right',crollerBlock).fadeIn();
//				}		
//		});
//		$('.control_right',crollerBlock).click(function(e){
//				e.preventDefault();
//				$('.itemcontainer_inner',crollerBlock).animate({"left": "-=230px"}, "slow");
//				counter++;
//				if(counter > 0){
//					$('.control_left',crollerBlock).fadeIn();
//				}
//				if((counter+4) >= (items.length)){
//					$('.control_right',crollerBlock).fadeOut();
//				}
//		});
//	}
//	$('.itemcontainer_outer',crollerBlock).css({'overflow':'hidden'});
//	$('.itemcontainer_inner',crollerBlock).css({'width':(items.length*230)+'px','position':'relative'});	
//});
//
//
//
//$(".itemsContainer").each(function(){
//	//$(this). = een div class='.itemscroller'
//	var items=$('.item',this);
//	var crollerBlock=this;
//	var counter=0;
//	if(items.length <= 3){
//		$('.control_left',crollerBlock).hide();
//		$('.control_right',crollerBlock).hide();
//	}else{
//		$('.control_left',crollerBlock).hide();
//		$('.control_right',crollerBlock).show();
//		$('.control_left',crollerBlock).click(function(e){
//				e.preventDefault();
//				$('.itemcontainer_inner',crollerBlock).animate({"left": "+=230px"}, "slow");
//				counter--;
//				if(counter <= 0){
//					$('.control_left',crollerBlock).fadeOut();
//				}
//				if(counter+3 < items.length){
//					$('.control_right',crollerBlock).fadeIn();
//				}		
//		});
//		$('.control_right',crollerBlock).click(function(e){
//				e.preventDefault();
//				$('.itemcontainer_inner',crollerBlock).animate({"left": "-=230px"}, "slow");
//				counter++;
//				if(counter > 0){
//					$('.control_left',crollerBlock).fadeIn();
//				}
//				if((counter+3) >= (items.length)){
//					$('.control_right',crollerBlock).fadeOut();
//				}
//		});
//	}
//	$('.itemcontainer_outer',crollerBlock).css({'overflow':'hidden'});
//	$('.itemcontainer_inner',crollerBlock).css({'width':(items.length*230)+'px','position':'relative'});	
//});
//
//initItem_wide=function(){
//		$(".item_wide").each(function(){
//			var items=$('.item',this);
//			var crollerBlock=this;
//			var counter=0;
//			if(items.length <= 1){
//				$('.control_left',crollerBlock).hide();
//				$('.control_right',crollerBlock).hide();
//			}else{
//				$('.control_left',crollerBlock).hide();
//				$('.control_right',crollerBlock).show();
//				$('.control_left',crollerBlock).unbind('click');
//				$('.control_left',crollerBlock).click(function(e){
//						e.preventDefault();
//						
//						$('.itemcontainer_inner',crollerBlock).animate({"left": "+=690px"}, "slow");
//						counter--;
//						$('.slidenummer').text(counter+1);
//						if(counter <= 0){
//							$('.control_left',crollerBlock).fadeOut();
//						}
//						if(counter+1 < items.length){
//							$('.control_right',crollerBlock).fadeIn();
//						}
//				});
//				$('.control_right',crollerBlock).unbind('click');
//				$('.control_right',crollerBlock).click(function(e){
//						e.preventDefault();
//						$('.itemcontainer_inner',crollerBlock).animate({"left": "-=690px"}, "slow");
//						counter++;
//						$('.slidenummer').text(counter+1);
//						if(counter > 0){
//							$('.control_left',crollerBlock).fadeIn();
//						}
//						if((counter+1) >= (items.length)){
//							$('.control_right',crollerBlock).fadeOut();
//						}
//				});
//			}
//			$('.itemcontainer_outer',crollerBlock).css({'overflow':'hidden'});
//			$('.itemcontainer_inner',crollerBlock).css({'width':(items.length*690)+'px','position':'relative','left':'0px'});	
//		});
//}
//initItem_wide();
//
//$("a.placeBigImage").click(function(e){
//	e.preventDefault();
//	$(".bigImage").attr('src',$(this).attr('href')).show();
//});
//
//$("a.placeProject").click(function(e){
//	e.preventDefault();
//	var projectId=$(this).attr('projectId');
//	$.getJSON(
//		'/ajaxProject.php',
//		{ 'item': projectId},
//		function(data){
//			$('.item_wide .caption h3').text(data.titel);
//			$('.item_wide .caption .date').text(data.jaar);
//			$('.item_wide .captionTxt').html(data.bericht);
//			$('.item_wide .slidenummer').text('1');
//			$('.item_wide .totalSlides').text(data.beelden.length);
//			$('.item_wide .itemcontainer_inner').empty();
//			var html="";
//      $.each(data.beelden, function(i,item){
//      	html+="<div class='item item2 marginright'><img src='/"+item['bigImage']+"' width='650' height='470' /></div>";
//      });
//			$('.item_wide .itemcontainer_inner').html(html);
//			initItem_wide();
//		}
//	);
//});
//

	


//$('.itemscroller:first')

//
//	$('.ratingActive').starRating({
//                        clickable:true,
//												/*rating:$('.ratingActive').attr("rating"), // dit staat nu in de idv rating='3' en wordt opgepikt in de plugin*/
//                        showNumber:false,
//                        ratingUrl:'/rate.php?',
//                        paramId: 'item'
//                        
//   });
//
//	$('.ratingPasive').starRating({
//                        clickable:false,
//                        hoverable :false,
//                        rating:3,
//                        showNumber:false
//   });
//	
//	$('A[rel="uceeradio"]').click( function() {
//		      window.open( $(this).attr('href'),'uceeradio','width=800, height=500, location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=yes' );
//		      return false;
//		  });
//
//// ik kan er een functie of plugin van schrijven.
//// widt's kan je uitlezen
//// ik moet nog iets met die hoogte doen!
//// en ik moet er 1 functie van maken ipv 3!
//// 
////		nieuwsteArtikelen
////		meestBekekenArtikelen
////		bestGewaardeerdeArtikelen
//
//function tabSlider(tabClassNamesArray,ref){
//	this.tabClassNamesArray=tabClassNamesArray;
//	this.tabClassNamesCopyArray=this.tabClassNamesArray;
//	this.sliderMainX=0;	
//	this.sliderwidth=$("."+this.tabClassNamesArray[0]).width();
//	this.reference=ref;
//	
//	for(var i=0; i < this.tabClassNamesArray.length; i++) {
//		$("."+this.tabClassNamesArray[i]+"Link")
//		.attr("i",i)
//		.attr("ref",this.reference)
//		.bind('click', function() {
//			i=$(this).attr("i");
//			reference=$(this).attr("ref");
//			_this=window[reference];
//			var verplaatsing=_this.sliderMainX-(i*_this.sliderwidth);
//			if(verplaatsing < 0){
//				verplaatsing="-="+Math.abs(verplaatsing);
//			}
//			if(verplaatsing >= 0){
//				verplaatsing="+="+Math.abs(verplaatsing);
//			}
//			for(var j=0; j < _this.tabClassNamesCopyArray.length; j++) {
//				//alert(verplaatsing)
//				$("."+_this.tabClassNamesCopyArray[j]).animate({"left": verplaatsing+"px"}, "slow" );
//				//alert("."+_this.tabClassNamesCopyArray[j]);
//			}
//			_this.sliderMainX=(i*_this.sliderwidth);		
//			for(var j=0; j < _this.tabClassNamesCopyArray.length; j++) {
//				$("."+_this.tabClassNamesCopyArray[j]+"Link").removeClass('active');
//			}			
//			$(this).addClass('active');
//			return false;
//		});
//	}
//	this.testFunc=function(){
//		alert(window[this.reference].tabClassNamesArray.length);
//	}
//}
//
//ReactieTabs = new tabSlider(["laatsteReacties","populaireReacties"],'ReactieTabs');
//homeTabs = new tabSlider(["nieuwsteArtikelen", "meestBekekenArtikelen", "bestGewaardeerdeArtikelen"],'homeTabs');
//
//
//// homeTabs.testFunc()
//// ReactieTabs.testFunc()
//
///*
//// alert( $(".nieuwsteArtikelen").width() );
//
//	var sliderMainX=0;
//	var sliderXA=0;
//	var sliderXB=480;
//	var sliderXC=960;
////	$(".meestBekekenArtikelen").hide();
////	$(".bestGewaardeerdeArtikelen").hide();
//	$(".nieuwsteArtikelenLink").click(function(){
//		$(".nieuwsteArtikelen").show();
//		$(".meestBekekenArtikelen").show();
//		$(".bestGewaardeerdeArtikelen").show();	
//		verplaatsing=sliderMainX-sliderXA;
//		if(verplaatsing<0){
//			verplaatsing="-="+Math.abs(verplaatsing);
//		}
//		if(verplaatsing >= 0){
//			verplaatsing="+="+Math.abs(verplaatsing);
//		}
//		$(".nieuwsteArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".meestBekekenArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".bestGewaardeerdeArtikelen").animate({"left": verplaatsing+"px"}, "slow",'',function(){$(".nieuwsteArtikelen").show();$(".meestBekekenArtikelen").hide();$(".bestGewaardeerdeArtikelen").hide();	});
//		sliderMainX=sliderXA;
//		$(".nieuwsteArtikelenLink").removeClass('active');
//		$(".meestBekekenArtikelenLink").removeClass('active');
//		$(".bestGewaardeerdeArtikelenLink").removeClass('active');
//		$(this).addClass('active');
//		return false;
//	});
//
//	$(".meestBekekenArtikelenLink").click(function(){
//		$(".nieuwsteArtikelen").show();
//		$(".meestBekekenArtikelen").show();
//		$(".bestGewaardeerdeArtikelen").show();	
//		verplaatsing=sliderMainX-sliderXB;
//		if(verplaatsing<0){
//			verplaatsing="-="+Math.abs(verplaatsing);
//		}
//		if(verplaatsing >= 0){
//			verplaatsing="+="+Math.abs(verplaatsing);
//		}
//		$(".nieuwsteArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".meestBekekenArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".bestGewaardeerdeArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		sliderMainX=sliderXB;
//		$(".nieuwsteArtikelenLink").removeClass('active');
//		$(".bestGewaardeerdeArtikelenLink").removeClass('active');
//		$(".bestGewaardeerdeArtikelenLink").removeClass('active');
//		$(this).addClass('active');
//		return false;
//	});
//
//	$(".bestGewaardeerdeArtikelenLink").click(function(){
//		$(".nieuwsteArtikelen").show();
//		$(".meestBekekenArtikelen").show();
//		$(".bestGewaardeerdeArtikelen").show();	
//		verplaatsing=sliderMainX-sliderXC;
//		if(verplaatsing<0){
//			verplaatsing="-="+Math.abs(verplaatsing);
//		}
//		if(verplaatsing >= 0){
//			verplaatsing="+="+Math.abs(verplaatsing);
//		}
//		$(".nieuwsteArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".meestBekekenArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		$(".bestGewaardeerdeArtikelen").animate({"left": verplaatsing+"px"}, "slow");
//		sliderMainX=sliderXC;
//		$(".nieuwsteArtikelenLink").removeClass('active');
//		$(".meestBekekenArtikelenLink").removeClass('active');
//		$(".bestGewaardeerdeArtikelenLink").removeClass('active');
//		$(this).addClass('active');
//		return false;
//	});
//	
//	*/
//	
//		  
//	$(".mp3").jmp3({
//			backcolor: "000000",
//			forecolor: "00ff00",
//			width: 200,
//			showdownload: "false",
//			showfilename: "false"
//	});
//	
//	$("a.medium").fancybox({
//		'frameWidth': 520, 
//		'frameHeight': 360,
//		'callbackOnClose':function() {
//                location.reload(); 
//                } 
//		}); 
//		$("a.imagePop").fancybox({
//			'zoomSpeedIn'			: 500,
//			'zoomSpeedOut'			: 500,
//			'imageScale': true
//		 }); 
//	
//		// submit form on change selectbox
//		$('form .changeOnUpdate').change(function () {
//		$(this).parents('form').submit();
//		});
//		
//		$("#animateHeadDown").click(function(){
//	     $(".visual .im1").slideUp();
//	       $(".visual").animate({ 
//	        height:"500px"
//	      }, 400 );
//	 		});
//		$("#animateHeadUp").click(function(){
//	     $(".visual .im1").slideDown();
//	       $(".visual").animate({ 
//	        height:"142px"
//	      }, 400 );
//	    });
//		/*
//		$("#animateHead").toggle(function(){
//	     $(".visual .im1").slideUp();
//	       $(".visual").animate({ 
//	        height:"500px"
//	      }, 400 );
//	 			
//	    },
//	    function(){
//	     $(".visual .im1").slideDown();
//	       $(".visual").animate({ 
//	        height:"142px"
//	      }, 400 );
//	    }
//    );
//*/
//
//	// uitgelicht
//	var idBlockInt=1;
////	var maxBlocks=Number( $("#uitgelicht .navigatie a:last").text() ) ;
//	var maxBlocks=Number($(".homeslide #slide_navi li").length) ;
////	alert(maxBlocks);
//	var timeoutID;
////	$("#uitgelicht .navigatie a").click(function(event){
//	$(".homeslide #slide_navi li a").click(function(event){
////	idBlockInt=Number($(this).text());	
//		idBlockInt=Number($(this).attr("num"));		
//		clearTimeout(timeoutID);
//		
//		showHomeItem();
//		event.preventDefault();
//		this.blur();
//	});
//	function showHomeItem(){
//		//alert(idBlockInt);
//		var idBlock="uitL"+idBlockInt.toString();
//		// zet de boxen uit en de nieuwe aan
//		
//		$(".uitgelichtbox").fadeOut("slow");
//	
//		$("#"+idBlock).fadeIn("slow");
//		// set de juiste navigatie bolletje aan
//		$(".homeslide #slide_navi li a").removeClass("active");
//
//		$(".homeslide #slide_navi li a").each(function (i){
//        //if ( $(this).text() == idBlockInt ){
//        
//        if ( $(this).attr("num") == idBlockInt ){
//          $(this).addClass("active");
//        }
//     });
//      
//		// 
//		timeout();
//	}
//	function timeout(){
//		timeoutID=setTimeout(function() { 
//			idBlockInt++;
//			if(idBlockInt > maxBlocks) idBlockInt=1;
//			showHomeItem();
//			//timeout();
//			 }, 8000); 
//	}
//	if(maxBlocks > 1)	timeout();
//	// end uitgelicht
//	/*
//		$("a.#maps").fancybox({ 'frameWidth': 640, 'frameHeight': 485}); 
//		$("a.beeldbankPop").fancybox({ 'frameWidth': 800, 'frameHeight': 505});
//		$("a.nieuwsbriefPop").fancybox({ 'frameWidth': 400, 'frameHeight': 500}); 
//		$("a.anieuwsbriefPop").fancybox({ 'frameWidth': 400, 'frameHeight': 550}); 
//		$("a.stuurdoorPop").fancybox({ 'frameWidth': 500, 'frameHeight': 470}); 
//		$("a.vriendenPop").fancybox({ 'frameWidth': 500, 'frameHeight': 500, 'hideOnContentClick': false}); 
//				
//		$('.sitemap').click(function(){
//			$("#sidemapContainer").toggle();
//			//return false;
//		});
//		
//		// submit form on change selectbox
//		$('form #genre, form #periode').change(function () {
//		$(this).parents('form').submit();
//		});
//		
//		var headerW=$("#header").width();
//		
//		function resizeMenu()
//		{
//		    var h = $(window).height();
//		    var w = $(window).width();
//		    
//		    
//		    var hBigMin=920+250+30;
//		    if(w > hBigMin){
//		    	$("#wrapper").css('width',hBigMin);
//		    	$("#header").css('width',headerW+14);
//		    	//$("#taalkeuze").insertAfter("#floatfix");
//		    	$("#taalkeuze").css("right",-145);//-159
//		    	$("#hoofdNavi2").css('left',690);
//		    	$("#hoofdNavi3").css('left',860);
//		    }else{
//		    	$("#header").css('width',headerW);
//		    	//$("#nieuwsHome").css('top',0).insertAfter("#hierKomtNieuws");
//		    	$("#taalkeuze").css("right",0);
//		    	$("#hoofdNavi2").css('left',665);
//		    	$("#hoofdNavi3").css('left',785);
//		    	$("#wrapper").css('width',920);
//		    }
//		}
//		resizeMenu();
//		jQuery.event.add(window, "resize", resizeMenu);
//		*/
});

