
$(document).ready(function(){
	
	//default
	$('a').click(function(){ return false; });
	$.scrollTo({ top:0, left:0 }, 800 )
	//--> toolbar defaults
	$('#toolbar-translate ul').hide();
	$('#toolbar-share ul').hide();
	$('#toolbar-show').hide();
	
	//navigation
	//<-- change active state '.selected'
	$('#navi a').click(function(){
		$('#navi a').removeClass('selected');
		$(this).addClass('selected');
	});
	//<-- scroll to -navigation
	
	$('#home-nav').click(function(){
		$.scrollTo({ top:0, left:0 }, 800 );
	});
	
	$('#portfolio-nav').click(function(){
		$.scrollTo({ top:750, left:0 }, 800 );
	});
	
	$('#about-nav').click(function(){
		$.scrollTo({ top:0, left:0 }, 800 );
	});
		
	//infobars
	//--> default
	$('#infobox-web').hide();
	$('#infobox-grafik').hide();
	$('#infobox-coding').hide();
	
	//--> hover event, make boxes display
		
	//--> webdesign info box
	$('#info-webdesign').hover(
		function() { $('#infobox-web').fadeIn('slow'); },
		
		function(){ $('#infobox-web').fadeOut('fast'); }
	);
	
	//--> grafik box
	$('#info-grafikdesign').hover(
		function() { $('#infobox-grafik').fadeIn('slow'); },
		
		function(){ $('#infobox-grafik').fadeOut('fast'); }
	);
	
	//--> webdesign box
	$('#info-coding').hover(
		function() { $('#infobox-coding').fadeIn('slow'); },
		
		function() { $('#infobox-coding').fadeOut('fast'); }
	);
	
	/////////////////// TESTING
	//<-- translate
	$('#toolbar-translate a').toggle(
		function() 
		{
			$(this).parent().find('ul').fadeIn('fast');	
		},
		function() 
		{
			$(this).parent().find('ul').fadeOut('fast');	
		}
	);
	
	//<-- share
	$('#toolbar-share a').toggle(
		function() 
		{
			$(this).parent().find('ul').fadeIn('fast');	
		},
		function() 
		{
			$(this).parent().find('ul').fadeOut('fast');	
		}
	);
	
	//<-- hide toolbar
	$('#toolbar-hide a').click(function(){
		$('#toolbar').fadeOut();
		$('#toolbar-show').fadeIn().animate({ 'bottom' : '-1px' }, 200);
	});
	
	//<-- show toolbar
	$('#toolbar-show a').click(function(){
		$('#toolbar-show').animate({ 'bottom' : '-32px' }, 200).fadeOut();
		$('#toolbar').fadeIn();
	});
	
	
	
	
	
	
	
	
});