



$(document).ready(function(){
        var links = $('a[rel*=lightbox]');
        links.fancybox({
		'transitionIn'	:'elastic',
		'transitionOut'	:'elastic',
		'speedIn'	:400,
		'speedOut'	:200,
		'overlayShow'	:true
	});
	$('a[rel*=external]').each(function(){$(this).attr('target','_blank')});
	$('#rightblockGreen #thumbs a').each(function(){
		$(this).css('opacity',0.5).bind('mouseover',BB.fadeIn).bind('mouseout',BB.fadeOut);
	})
	var cts = $('div.ct');
	if(cts){
		cts.each(function(n,d){
			var a = $('<a class="readMore">Lees meer ...</a>');
			var ps = $(this).find('p');
			$(a).bind('click',this,BB.showParagraphs);
			$(ps[0]).append(a);
			for(var i =1, l=ps.length;i<l;i++){
				$(ps[i]).hide();
			}
		});
	}

});

var BB = {
	fadeIn:function(el){
		$(this).stop(true,true).animate({opacity:1},250);
	},

	fadeOut:function(el){
		$(this).stop(true,true).animate({opacity:0.5},500);
	},
	
	showParagraphs:function(event){
		$(this).hide();
		$(event.data).find('p:hidden').each(function(n,p){
			$(p).show();
		});
		
	}
}
