<!-- PRELOAD IMAGENS -->
(function($) {
  var cache = [];
  // Arguments are image paths relative to the current page.
  $.preLoadImages = function() {
	var args_len = arguments.length;
	for (var i = args_len; i--;) {
	  var cacheImage = document.createElement('img');
	  cacheImage.src = arguments[i];
	  cache.push(cacheImage);
	}
  }
})(jQuery)

jQuery.preLoadImages("imagens/estrutura/bg_bt_empreendimentos_ov.png", "imagens/estrutura/bg_bt_servicos_ov.png");

function overBt(id){
	$("#bt_"+id).css('background-image','url(imagens/estrutura/bg_bt_'+id+'_ov.png)');
}
function outBt(id){
	$("#bt_"+id).css('background-image','url(imagens/estrutura/bg_bt_'+id+'.png)');
}
function resize(){
	$("#mnTop a").each(function(){
		if($(this).height() < 20){
			$(this).css('height','32px');
			$(this).css('line-height','32px');	
		}
	});
	if($(window).width() > 980){
		$("#logo").css('left',($(window).width()/2 - $("#logo").width()/2));
		$("#logo_int").css('left',($(window).width()/2 - $("#logo_int").width()/2));
		$("#header").css('background-position','center')
		$("#footer").css('background-position','center 0px')
		$("body").css('background-position',((-1215)+$(window).width()/2.40)+'px 0')
	}
	else{
		$("#logo").css('left',380)
		$("#logo_int").css('left',390)
		$("#header").css('background-position','-510px 0px')
		$("#footer").css('background-position','-510px 0px')
		$("body").css('background-position','px 0')
	}
}

$(document).ready(function(){
	if($("body").attr('id') != "home"){
		$("#logo_int").show();
	}
	else{$("#logo").show();}
})

$(function(){
	$("#bt_empreendimentos a").mouseover(function(){
		$("#bt_empreendimentos div").show();
	});
	$("#bt_empreendimentos a").mouseout(function(){
		$("#bt_empreendimentos div").hide();
	});
})
$(function(){
	$("#bt_servicos a").mouseover(function(){
		$("#bt_servicos div").show();
	});
	$("#bt_servicos a").mouseout(function(){
		$("#bt_servicos div").hide();
	});
})

$(function(){
	$("#mnServicos_top").mouseover(function(){
		$("#mnServicos_top ul").show();
	});
	$("#mnServicos_top").mouseout(function(){
		$("#mnServicos_top ul").hide();
	});
})
$(function(){
	$("#mnEmpreendimentos_top").mouseover(function(){
		$("#mnEmpreendimentos_top ul").show();
	});
	$("#mnEmpreendimentos_top").mouseout(function(){
		$("#mnEmpreendimentos_top ul").hide();
	});
})
