function goToByScroll(id){
	switch (id) {
		case "#services":
			$('html, body').animate({
				scrollTop: 1080
			}, 1500, 'swing');
			break;
		case "#portfolio":
			$('html, body').animate({
				scrollTop: 1610
			}, 1500, 'swing');
			break;					
		case "#contact":
			$('html, body').animate({
				scrollTop: $(document).height()
			}, 3500, 'swing');
			break;
		case "#top":
			$('html, body').animate({
				scrollTop: 0
			}, 2500, 'swing');
			break;
	}
}
		
$(function() {
	var $window = $(window);
	var $xTop = 0;
	var $xServices = 0;
	
	$window.resize(function() {
		$('#contact').css('height', $window.height());
	});
	
	$('#contact').css('height', $window.height());
	
	$window.scroll(function() {
		$xTop = Math.floor(($window.scrollTop() / 3));
		$xServices = Math.floor(($window.scrollTop() / 8));
		$('#top').css('paddingTop', $xTop);
		$('#services').css('paddingTop', $xServices);
	});
				
	$('#navigation a').click(function() {
		goToByScroll($(this).attr('href'));
		return false;
	});
				
	var intLabelMax = 0;
	$("label").each(function() {
		if ($(this).width() > intLabelMax)
			intLabelMax = $(this).width();    
	});
	$("label").width(intLabelMax);
				
});
