function showGebitActief() {
	$.fn.colorbox({width:"50%", inline:true, open:true, href:"#gebitactief"});
	return false;
}

(function($) {
	$(document).ready(function() {
		$(".data-overzicht:first td").css("border-top", "1px solid #CCCCCC");
		$(".rowSpacer:last td").css("border-bottom", "none");

		$('.btn-character').click(function() {
			/* when a letter is clicked, follow it's link */
			window.location = $($(this).find('a')[0]).attr('href');
		});
		
//		$('.descriptionToggle').click(function() {
//			/* toggle the clicked image and the comments */
//			if($(this).attr('src') == 'images/new_plus.gif') {
//				$(this).attr('src', 'images/new_min.gif');
//				$(this).parent().parent().find('.comments').show();
//			} else {
//				$(this).attr('src', 'images/new_plus.gif');
//				$(this).parent().parent().find('.comments').hide();
//			}
//		});
		
		$('.data-overzicht').click(function() {
			var img = $(this).find('.descriptionToggle')[0];
			if ($(img).attr('src') == 'images/new_plus.gif') {
				$(img).attr('src', 'images/new_min.gif');
				if (!$(this).hasClass("behandeling-child")) {
					$(this).find('.comments').show();
					$(this).nextAll().each(function() {
						if ($(this).hasClass("behandeling-child")) {
							$(this).show();
							$(this).find('.comments').show();
						}
						else {
							return false;
						}
					});
				}
			} else {
				$(img).attr('src', 'images/new_plus.gif');
				if (!$(this).hasClass("behandeling-child")) {
					$(this).find('.comments').hide();
					$(this).nextAll().each(function() {
						if ($(this).hasClass("behandeling-child")) {
							$(this).hide();
							$(this).find('.comments').hide();
						}
						else {
							return false;
						}
					});
				}
			}
		});
		
	});
})(jQuery);