var _padding = 100;
var _height=586;
var max_height=586;
var _top= 90;

$(document).ready(function(){
	$('.port_container').get(0).style.left=$(window).width()-50+'px';
	$('.port_container').get(0).style.top=_top+'px';
	$('.port_container').get(0).style.display='block';
	
});

$(window).bind('resize', function(){
	$('.port_container').get(0).style.left=$(window).width()-50+'px';
});

function portfolioState1to2(){
	$('.port_container').get(0).style.width=$(window).width()-50+'px';
	$('.port_container').get(0).style.left='50px';
	
	$('.port_flash_container').get(0).style.width=$(window).width()-50+'px';
	$('.port_flash_container').get(0).style.left=$('.port_container').width()-50+'px';
	$('.port_flash_container').animate({'left':0}, 1000);
}

function portfolioState2to3(){
	$('.port_container').get(0).style.top=_top+_height-max_height+'px';
	$('.port_container').get(0).style.height=max_height+'px';
	
 	$('.port_flash_container').get(0).style.height=max_height+'px';
}

function portfolioState3to2(){
	$('.port_container').get(0).style.top=_top+'px';
	$('.port_container').get(0).style.height=_height+'px';
	
	$('.port_flash_container').get(0).style.height=_height+'px';
}

function portfolioState2to1(){
	
	$('.port_flash_container').animate({'left': $('.port_container').width()-50}, 1000, function(){
		$('.port_container').get(0).style.left=$(window).width()-50+'px';
		$('.port_container').get(0).style.width='50px';
		$('.port_flash_container').get(0).style.left='0px';
	});
}