$(function() {
		   
	var $paneTarget = $("body");
	
	var $hello_status = false;
	
	$('a#close_hello_txt').click(function(){
		if ($hello_status) {
			$('#hello_txt').slideUp("slow");
			$('a#close_hello_txt').html("I want to read more because I'm nosey....");
			$paneTarget.stop().scrollTo(0, 800, {offset: -50});
			$hello_status = false;
		} else {
			$paneTarget.stop().scrollTo('#hello', 800);
			$('#hello_txt').slideDown("slow");
			$('a#close_hello_txt').html("Done reading now? Tidy up time...");
			$hello_status = true;
		}
		return false;
	});
	
	$('.hello_btn').click(function(){
		$paneTarget.stop().scrollTo('#hello', 800);
		$('#hello_txt').slideDown("slow");
			$('a#close_hello_txt').html("Done reading now? Tidy up time...");
			$hello_status = true;
		return false;
	});
	
	$('.portfolio_btn').click(function(){
		$paneTarget.stop().scrollTo('#portfolio', 800);
		return false;
	});
	
	$('.services_btn').click(function(){
		$paneTarget.stop().scrollTo('#services', 800);
		return false;
	});
	
	$('.contact_btn').click(function(){
		$paneTarget.stop().scrollTo('#footer', 800);
		return false;
	});
	
	$('#services_list li a:eq(0)').addClass('selected');
	$('#services_content').scrollTo(0, 0);
	$('#services_list li a').click(function(){
		$('#services_list li a.selected').removeClass('selected');
		$(this).addClass('selected');
		
		var $paneTarget = $('#services_content');
		var $currentIndex = $(this).parent().prevAll().length;
		var $target = $paneTarget.find('div.service_item:eq('+$currentIndex+')');
		$paneTarget.stop().scrollTo($target, 800);
		return false;
	});
	
	/*var $port_index = 0;
	var $grid_val = 9;
	$('#p_next').click(function(){
		var $paneTarget = $('#p_grid');
		$port_index = $port_index + $grid_val;
		if ($port_index > $('div.p_thumbnail').length) {
			$port_index = 0;
		}
		var $target = $paneTarget.find('div.p_thumbnail:eq('+$port_index+')');
		$paneTarget.stop().scrollTo($target, 800);
		return false;
	});*/
	
	

	
	
	

});