/**
 * JS
 * @author Darío Ruellan <druellan@ecimtech.com>
 * @copyright ecimTech 2009
 */

$(function()
{
	// AUTOMAP
	var map = $("#automap");
	$("area", map).hover(function()
	{
		var name = $(this).attr("alt");
		$(".detail."+name, map).css("width", 0).animate(
		{
			display: 'block',
			width: 200
		});
	}, function()
	{
		var name = $(this).attr("alt");
		$(".detail."+name, map).stop('false','true').fadeOut();
	});
	
	// BAFICI en imagenes
	$("#bimages .caption").css("opacity", "0.9");
	$("#bimages img").ready(scrollDown());
	
});

function scrollDown(){
	$("#bimages .image").animate({ top: -175 }, 20000, function(){ scrollUp() });
}

function scrollUp(){
	$("#bimages .image").animate({ top: -20 }, 20000,  function(){ scrollDown() });
}