$(document).ready(function(){ 
						   
	// PNG fix					   
	$(document).pngFix(); 

	//  slide panel:    noslide is een custom effect
    $('img.menu_class').click(function () {
		$('ul.the_menu').slideToggle('noslide');
    });
	
	// Z-index fix
	var zIndexNumber = 10000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});

	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
	//Full Caption Sliding (Hidden to Visible)
	/* oorspronkelijk : */
// 	$('.detailbox.captionfull').hover(function(){
// 		$(".cover", this).stop().animate({top:'180px'},{queue:false,duration:160});
// 		}, function() {
// 			$(".cover", this).stop().animate({top:'270px'},{queue:false,duration:160});
// 		});
// 	$('.newslistbox.captionfull').hover(function(){
// 		$(".cover", this).stop().animate({top:'180px'},{queue:false,duration:160});
// 		}, function() {
// 			$(".cover", this).stop().animate({top:'270px'},{queue:false,duration:160});
// 		});
	/* height-aware : */
		jQuery('.detailbox.captionfull').hover( function()
		{
			var coverHeight = jQuery(".cover", this).outerHeight();
			var heightDiff = 310 - coverHeight;
			jQuery(".cover", this).stop().animate({top:heightDiff+'px'},{queue:false,duration:160});
		}, function()
			{
				jQuery(".cover", this).stop().animate({top:'270px'},{queue:false,duration:160});
			});

		jQuery('.newslistbox.captionfull').hover( function()
		{
			var coverHeight = jQuery(".cover", this).outerHeight();
			var heightDiff = 310 - coverHeight;
			jQuery(".cover", this).stop().animate({top:heightDiff+'px'},{queue:false,duration:160});
		}, function()
			{
				jQuery(".cover", this).stop().animate({top:'270px'},{queue:false,duration:160});
			});


				
		$(".btn-slide").click(function(){
		$("#panel").slideToggle("noslide");
		$(this).toggleClass("active"); return false;
	});
		
	// auto column
	$('.wide').columnize({columns: 2, balanced: false});
	
	Shadowbox.init({
		handleOversize:     "drag",
		displayNav:         true,
		handleUnsupported:  "remove",
		continuous:			true,
		onOpen:				function() { jQuery('.movie').css('visibility','hidden'); },
		onClose:			function() { jQuery('.movie').css('visibility','visible'); }
	});


	// tabs met AJAX
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content
	
	//On Click Event
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content
		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active content
		return false;
	});




});




