$(document).ready(function() {
						   
	//InicializaAcordeon();
	
	$("#enlaces_header").hover(function() 
		{	
		},
	function(){
		$("#hover").stop().animate({ left: "-20000" }, 100);      
		//$("#hover_separador_izq").stop().animate({ left: "-5" }, 100);   
		//$("#hover_separador_der").stop().animate({ left: "90" }, 100);   
		}
	);
	
	
	function AvanzaImagen()
	{
		imagenSeleccionada++;
			if (imagenSeleccionada > numImagenes)
				imagenSeleccionada = 1;
			$("#numero").html(imagenSeleccionada);
			
	}
	
	function RetrocedeImagen()
	{
		imagenSeleccionada--;
			if (imagenSeleccionada < 1)
				imagenSeleccionada = numImagenes;
			$("#numero").html(imagenSeleccionada);
	}
	
	
	imagenSeleccionada = 0;
	numImagenes = $(".contenido_banner_imagenes").length;

		
		
	$('#presentacion').cycle({ 
		fx:    'fade', 
		timeout: 8000 
		 });

		$('#logos_clientes').cycle({ 
		fx:    'fade', 
		timeout: 8000
	 });
		
	$('#imagenes_Banner_2').cycle({ 
		fx:    'fade', 
		timeout: 10000,  
		next:   '#boton_derecha', 
		prev:   '#boton_izquierda',
		before: AvanzaImagen
	 });
			
	$('.contenido_banner_img').cycle({ 
		fx:    'fade', 
		timeout: 10000,  
		next:   '#boton_derecha',
		prev:   '#boton_izquierda' 
	 });
		
	function InicializaAcordeon()
	{
		$("#texto_banner_1").hide();
		$("#texto_banner_2").hide();
		$("#texto_banner_3").hide();
	}
	
	$("#enlaces_header").hover(function() 
		{	
		},
		function(){
		$("#hover").stop().animate({ left: "-2" }, 100);      
		//$("#hover_separador_izq").stop().animate({ left: "-5" }, 100);   
		//$("#hover_separador_der").stop().animate({ left: "90" }, 100);   
		}
	);
});

/*FIN DOCUMENT READY */

function MuestraSeccion(seccion)
{	
	seccionReal = "#texto_banner_" + seccion;
	if ($(seccionReal).css("display") == "none")
	{
		CierraSecciones();	
		switch (seccion)
		{
			case 1:
			$("#que_necesitas").attr("src","/images/home/que_necesitas_des.png");
			break;
			case 2:
			$("#que_funcion").attr("src","/images/home/que_funcion_des.png");
			break;
			case 3:
			$("#conoces").attr("src","/images/home/conoces_des.png");
			break;
		}
		$(seccionReal).slideDown();	
	}
	else
		CierraSecciones();

}

function CierraSecciones()
{
	$("#que_necesitas").attr("src","/images/home/que_necesitas.png");
	$("#que_funcion").attr("src","/images/home/que_funcion.png");
	$("#conoces").attr("src","/images/home/conoces.png");
	
	if ($("#texto_banner_descripcion").css("display") != "none")
		$("#texto_banner_descripcion").slideUp("slow");
	if ($("#texto_banner_1").css("display") != "none")
		$("#texto_banner_1").slideUp("slow");
	if ($("#texto_banner_2").css("display") != "none")
		$("#texto_banner_2").slideUp("slow");
	if ($("#texto_banner_3").css("display") != "none")
		$("#texto_banner_3").slideUp("slow");
}

	
