//função para calcular o tamanho dos blocos (chamada no evento onload e window resize)
function calculaTamanhoBlocos(velocidade){
	
	//capturando tamanhos
	wrapWidth = document.body.offsetWidth;
	wrapHeight = document.body.offsetHeight;
	firstColumnWidth = jQuery('.first-column').width();
	secondColumnWidth = wrapWidth - firstColumnWidth;
	secondColumnHeight = document.body.offsetHeight;
	firstColumnHeight = jQuery('.first-column').height();
	
	//setando tamanhos
	jQuery('.wrap').width(wrapWidth);
	jQuery('.first-column').width(firstColumnWidth);
	jQuery('.second-column').width(secondColumnWidth - 2);
	//jQuery('.second-column').height(secondColumnHeight - 2);
	//jQuery('.second-column').css({ height : wrapHeight});
	jQuery('.content').width(secondColumnWidth - 40); 
	jQuery('.second-column a .foto-home').width(secondColumnWidth);
	jQuery('.galeria').width(secondColumnWidth);	
//	jQuery('.galeria .img-principal').width(secondColumnWidth - 170);	
	jQuery('#galeria object').width(secondColumnWidth - 170);	
	jQuery('.galeria .thumbs, .galeria .slider').width(secondColumnWidth - 100);	 
//	jQuery('.vertical').hide();	
//  jQuery('.horizontal').animate({width : jQuery('.foto-home').width()}, velocidade);
//	jQuery('.vertical').animate({height : jQuery('.foto-home').height()}, velocidade);
}

jQuery(function(){
	
	//para abrir um uma nova janela rel="external"
	jQuery('a[rel=external]').attr('target','_blank');
	
	//calcula tamanho dos blocos para o restante das páginas
	/*if(jQuery('body').attr('id') == 'home'){
		calculaTamanhoBlocos(3000);
	} else {
		calculaTamanhoBlocos(0);
	}*/
	
	
	calculaTamanhoBlocos(0);
	jQuery(window).resize(function(){
		calculaTamanhoBlocos(0);	
	});
	
});		
