$(document).ready(function () {
		onMenuChange(jQuery.url.attr("anchor"));
		
		$('.headerNav').click(function() {
			onMenuChange($(this).attr('href').substring(1, 100));
		});
		
		$('.websiteBox').css('opacity', '0.8');
		
		$('.websiteBox').mouseover(function() {
			$(this).css('opacity', '1');
		});

		$('.websiteBox').mouseout(function() {
			$(this).css('opacity', '0.8');
		});		
		
	});
	
	function onMenuChange(id) {
		$('#div_about').hide();
		$('#div_portfolio').hide();
		$('#div_solution').hide();
		$('#div_contact').hide();
		switch (id) {
			case "portfolio":
				$('#div_portfolio').fadeIn();
				break;
			case "solution":
				$('#div_solution').fadeIn();
				break;
			case "contact":
				$('#div_contact').fadeIn();
				break;
			default:
				id = "about";
				$('#div_about').fadeIn();
		}
		
		$('.headerNav').css('border', 'none');
		$('.headerNav').css('color', '#7a7a7a');
		
		$('.headerNav').mouseover(function() {
			$(this).css('color', '#fff');
		});
		$('.headerNav').mouseout(function() {
			$(this).css('color', '#7a7a7a');
		});
		
		$('#a_' + id ).css('border-bottom', "2px solid #fff");
		$('#a_' + id ).css('color', "#fff");
		$('#a_' + id).mouseout(function() {
			$(this).css('color', '#fff');
		});
		
	}
