$(document).ready(function() {
    $('#slider').nivoSlider();
});

function home_expand(test){
	
if(test){
	$('.expand_home').fadeOut('slow',function(){
		$('#arch_info').stop().animate({height: "450px"}, 1000,
			function(){
			$('.hidde').fadeIn('slow')
		});
	});
}else{
	$('.hidde').fadeOut('slow',
		function(){
			$('#arch_info').stop().animate({height: "280px"}, 2000);
			$('.expand_home').fadeIn('slow');
	});
}
}

function mapTool(pais){
	var tip = "#tool_" + pais;
	$(tip).fadeIn('fast');
	$(tip).bind("mouseleave",
		function(){
			$(tip).fadeOut('fast');
		});
	
}

$(function() {
	// if the function argument is given to overlay,
	// it is assumed to be the onBeforeLoad event listener
	var real = $("body").height();
	$('a[rel]').overlay({

		mask: {color: '#000',
			loadSpeed: 200,
			opacity: 0.8},
		effect: 'apple',

		onBeforeLoad: function() {
			// grab wrapper element inside content
			var wrap = this.getOverlay().find(".contentWrap");
			// load the page specified in the trigger
			wrap.load(this.getTrigger().attr("href"));
		},
		onLoad: function(){
			$("#exposeMask + img").css('display', 'none');
			var alto = $(".contentWrap").height();
			$("body").css('height', alto+'px');
			$("#overlay").css('position', 'absolute');
			
		},
		onClose: function(){
			$("body").css('height', real-20+'px');	
		}	
	});
	

});

$(function(){
	$('.hidden:first').show();
	$('.upl_divs:first').show();
});




