jQuery(function(){
	// pegando url e título da página para colocar nos links sociais
	var $_pageURL = unescape(encodeURIComponent( document.location.href ));
	var $_pageTitle = unescape(encodeURIComponent( document.title ));
	$('.rodape-sharing-facebook').attr('href','http://www.facebook.com/sharer.php?u='+$_pageURL+'&t='+$_pageTitle);
	$('.rodape-sharing-twitter').attr('href','http://twitter.com/home?status='+$_pageTitle+': '+$_pageURL);
});

jQuery(window).load(function(){
	// verificando a altura da página e do container
	function rodapeResize() {
		var $_mh = 0;
		if ((window.XMLHttpRequest == undefined) && (ActiveXObject != undefined)) {
			$('#container').children('div').each(function(){
				$_mh = $_mh + parseInt($(this).height());
			})
		} else {
			$_mh = $_mh + $('#container').height();
		}
		var $_diff = $(window).height() - $_mh;
		if ($_diff > 0) {
			$('#rodape').css({'padding-top':$_diff+'px'});
		}
	}

	if($('body').attr('id') != "home") {
		rodapeResize();
		$(window).resize(function() {
			rodapeResize();
		});
	}
})
