$(document).ready(function(){ $(document).pngFix(); });

Shadowbox.init({ overlayOpacity	: '0.75' });

function slideSwitch(div) {
	var $active = $(div + ' li.active');
	if ($active.length == 0) $active = $(div + ' li:last');
	var $next =  $active.next().length ? $active.next() : $(div + ' li:first');
	$active.addClass('last-active');
	$next.css({opacity: 0.0}).addClass('active').animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active'); });
}

$(function() { setInterval("slideSwitch('.slide-socios')", 8000); });
$(function() { setInterval("slideSwitch('.slide-cabecera')", 8000); });
$(function() { setInterval("slideSwitch('.slide-colaboradores')", 8000); });

$(document).ready(function(){
	
	//Tamanyo de puntitos
	var puntos = 18 + 8;
	
	//Alturas
	var altoFotos = $(".home-gal").height();
	if(altoFotos == null){
		var altoFotos = $(".home-servicios").height() - 14;
	}
	var altoEventos = $(".eventos-home").height() + puntos;
		
	//Accion
	if(altoFotos > altoEventos){
		var diferencia = altoFotos - altoEventos;
		$(".eventos-home").css("padding-bottom",diferencia + "px");
	}
});
