jQuery(function( $ ){
				
		$.easing.elasout = function (x, t, b, c, d) {
		return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
	};

	var mainHeight;
	var IDname ;
	mainHeight = $("#content-1").height();
	$('.pane').css({
	   'height': mainHeight + 'px' 
	 });
	
	function resizeMe(e) {
			mainHeight = $("#"+e).height();
			$('.pane').animate({
			   'height': mainHeight + 'px' 
			 }, 'fast');
	};

	//by default, the scroll is only done vertically ('y'), change it to both.
	$.scrollTo.defaults.axis = 'y'; 			
	//this one is important, many browsers don't reset scroll on refreshes
	$('div.pane, .propeller-careers-content-outer').scrollTo( 0 );//reset all scrollable panes to (0,0)
	$.scrollTo( 0 );//reset the screen to (0,0)
	

	
	
	
	$('#propeller-leftnav a, #propeller-portfolio-leftnav a, #propeller-casestudy-links a').click(function(){//$.scrollTo works EXACTLY the same way, but scrolls the whole screen
		$('div.pane, .propeller-careers-content-outer').scrollTo( this.hash, 600, {easing:'elasout'} );
		IDname = this.hash
		IDname = IDname.replace('#','');
		resizeMe(IDname);
		return false;
	});


});