////////////////////////////
////////////////////////////
//		ONLOAD
////////////////////////////


$(document).ready(function(){						   
	
	if ($('.Column')[0]){
		$('.Column').columnize({
				width : 70,
				height : 500
		});
	}
		

	
	//SCROLLPANE TEXT//
	if ($('#VerticalScrollPane')[0]){
	$('#VerticalScrollPane').jScrollPane({showArrows:true, scrollbarWidth: 3, scrollbarMargin: 25});
	}

	
	
	//THUMBS//
	if ($('ul.thumbs')[0]){
		
		$('ul.thumbs li').hover(function(){
					$(this).find('img').animate({left:'75px'},{queue:false,duration:300});
				}, function(){
					$(this).find('img').animate({left:'0px'},{queue:false,duration:300});
		});
		
		$('div.thumbs li a').each(function() {
			var test = '';
			test = $(this).find('img').attr('src');
			test = test.replace('/66x59/','/714x494/');
			$(this).attr('href', test);
		});
		
		 var gallery = $('.thumbs').galleriffic({											
				delay: 6000,
				numThumbs: 24,
				imageContainerSel: '#middle',
				autoStart: true,
				enableTopPager: false,
				enableBottomPager: false
		});
	
	}
	
	
});




$(function() {
	
	//REMEMBER MENU//
	$("div#menu ul li a").each(function(el) {
		var th = String($(this).attr("href"));
        var wh = String($(window).attr("location"));
        var tpage = th.substring(th.lastIndexOf("/"));
        var wpage = wh.substring(wh.lastIndexOf("/"));
		
		
        if (tpage == wpage) {
            //als je class gebruikt ipv id
			//$(".current").removeClass("current");
            //$(this).parent().addClass("current");
				
			$("#current").attr("id", "");
			$(this).parent().attr("id","current");
				
            return false;
        }
		
	});
});

