function swapI(obj,focus){
	if(focus){
		if(obj.value == obj.attributes["label"].value){
			obj.value = "";
		}
	} else {
		if(obj.value.trim() == ""){
			obj.value = obj.attributes["label"].value;
		}
	}
}
function swapP(obj,focus){
	if(focus){
		var pass = document.getElementById(obj.attributes["parent"].value);
		if(pass){
			obj.innerHTML = "";
			pass.focus();
		}
	} else {
		if(obj.value == ""){
			var div = document.getElementById("div"+obj.id);
			if(div){
				div.innerHTML = obj.attributes["label"].value;
			}
		}
	}
}

$(document).ready(function(){
	
	//hack para remover a borda azul dos maps
	$('area').focus(function(){
		$(this).blur();
	});
	
	//ajusta o tamanho do body
	var docHeight = $(window).height();
	$("#site_body").height(docHeight - 100);
	
	$('.btFecharOverlay').click(function(){
		$('.overlay').fadeOut(300);
	});
	
	$('.btOverlay').click(function(){
		$('#'+$(this).attr('data-rel')).fadeIn(300);
	});
	
});

