jQuery(function( $ ){
	var target = $('#slider').get(0);
	
	target.scrollLeft = target.scrollTop = 0; // naar het begin zetten, voor firefox :-)
	
	$.localScroll.hash({
		target: target, //could be a selector or a jQuery object too.
		axis:'xy',//the default is 'y'
		queue:true,
		duration:1500
	});
	
	var $last = $([]); // laatste link
	
	$.localScroll({
		target: target, //could be a selector or a jQuery object too.
		axis:'xy',//the default is 'y'
		queue:true,
		duration:1200,
		hash:false,
		onBefore:function( e, anchor, $target ){//'this' is the clicked link
			this.blur();//remove the awful outline
		}
	});
	
	//this one is important, many browsers don't reset scroll on refreshes
	$('div#tekst').scrollTo( 0 );//reset all scrollable panes to (0,0)
	$.scrollTo( 0 );//reset the screen to (0,0)
	
	//Target examples bindings
	var $paneTarget = $('#tekst');	

	$('ul.submenu li a').click(function(){
		$paneTarget.stop().scrollTo( $(this).attr('href') , 1800, {
			onAfter:function(){
				
			}
		});
	});
	
	// PNG hack
	$(document).pngFix();
	
	$("ul.menu").show();
});
