$(document).ready(function() {	

	// Navigatie
	$('#navigation li a:not(.active)').append('<span class="hover"></span>');
	$('#navigation li a').hover(function() {
		$('.hover', this).stop().animate({'opacity':1},300);
	},function() {
		$('.hover', this).stop().animate({'opacity':0},300);
	})
	
	// Content-right ul li
	if($('#content-right').length>0){
		var spaties = "";
		for(i=0;i<16;i++){
			spaties += "&nbsp;";
		}
		$('#content-right p').prepend(spaties);
		$('#content-right ul li').prepend('<span class="wit">&bull;&nbsp;</span>');
		var exp = [12,9,6,4,2,1,0,1,2,4,6,9,12,16,20];
		for(var i=0; i<$('#content-right ul li').size(); i++){
			var spaties = "";
			for(var j=0; j<exp[i]; j++){
				spaties += "&nbsp;";
			}
			$('#content-right ul li:eq('+i+')').prepend(spaties);
		}
	}
	
	// Gallery
	if($("#gallery").length>0){
		 $("#gallery a[rel=fancybox]").fancybox();
	}
	if($("#gallery2").length>0){
		var fotos = [];
		var curfoto = 0;
		$('#gallery2 a').each(function(index) {
			fotos.push('/'+$(this).attr('href'));
		});
		$("#gallery2 a").click(function(){
			curfoto = $(this).index();
			$("#slideshow img").attr('src','phpthumb/phpThumb.php?src=../'+fotos[curfoto]+'&w=318&h=448&q=95&zc=1');
			return false;
		});
		
	}
	
  // Slideshow
  /*if($('#slideshow').length>0){
    setInterval(function(){
      $('#slideshow :first-child').fadeOut()
         .next('img').fadeIn()
         .end().appendTo('#slideshow');}, 
      6000);
  }*/
});
