var color1 = '#202020';
var size = 0;
	
function fade(c1,c2) {
	NLBfadeBg('body',c1,c2,'250');
	ctx.fillStyle = c2;
	ctx.fillRect( 0, 0, canvas.width, canvas.height );
	return c2;
}

function resizeText(multiplier) {
	if(size+multiplier>-3 && size+multiplier<3){
		$('.content').css('font-size', parseInt($('.content').css('font-size')) + multiplier + "px");
		size+=multiplier;
	}
}

$(document).ready(function() {

	$('ul li a').hover(function() { //mouse in
		jQuery.easing.def = "easeOutQuad";
		$(this).stop().animate({ paddingLeft: '20px'}, 200);
	}, function() { //mouse out
		jQuery.easing.def = "easeOutQuad";
		$(this).stop().animate({ paddingLeft: 0 }, 200);
	});
	
	$('#links').hide();
	
	$('#links_b').hover(
		function(){
			if($('#links').css('height')!='65px')
			{
				$('#links').hide();
				$('#links').css("height",'')			
				$('#links').stop().slideDown(1000,'easeOutBounce');
			}
		}, function(){}			
	); 	
		
	$('#content_left').hover(
		function(){}, 
		function(){ $('#links').stop().slideUp(1000,'easeOutBounce');}			
	); 
	
	$('.home').click( function(){
		$('#content_right').hide().load('pages/home.php').fadeIn();
		document.body.className = "t1";
		color1 = fade(color1, '#202020');
	});
	
	$('.about').click( function(){
		$('#content_right').hide().load('pages/about.php').fadeIn();
		document.body.className = "t2";
		color1 = fade(color1, '#211b26');
	});
	
	$('.portfolio').click( function(){
		$('#content_right').hide().load('pages/portfolio.php').fadeIn();
		document.body.className = "t3";
		color1 = fade(color1, '#261616');
	});
	
	$('.contact').click( function(){
		$('#content_right').hide().load('pages/contact.php').fadeIn();
		document.body.className = "t4";
		color1 = fade(color1, '#1b2626');
	});
	
	$('.links').click( function(){
		$('#content_right').hide().load('pages/links.php').fadeIn();
		document.body.className = "t5";
		color1 = fade(color1, '#21261b');
	});
	
	
});


