		var filters = {
			requerido: function(el) {return ($(el).val() != '' && $(el).val() != -1);},
			email: function(el) {return /^[A-Za-z][A-Za-z0-9_.]*@[A-Za-z0-9_]+\.[A-Za-z0-9_.]+[A-za-z]$/.test($(el).val());}
		};

$(document).ready(function(){
	$('.scrollPage').click(function() {
	   var elementClicked = $(this).attr("href");
	   var destination = $(elementClicked).offset().top;
	   $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination-20}, 500 );
	   return false;
	});

	$('.slideshow').cycle({
				fx: 'fade',
				next: '#NavSgte',
				prev: '#NavAnt',
				pause: 1
		});
	$('#NavStop').toggle(
			function(){
				$('.slideshow').cycle('pause');
				$('.img_NavNoticiasConFoto').attr('src', 'imagenes/img_NavNoticiasConFotoPlay.gif')
			},
			function(){
				$('.slideshow').cycle('resume');
				$('.img_NavNoticiasConFoto').attr('src', 'imagenes/img_NavNoticiasConFoto.gif')
			}
		);
	$('#secciones').cycle({
				    fx: 'fade',
					pause: 1,
					next: '#next',
					prev: '#prev'
		});
	$('#plansalvacion').cycle({
				    fx: 'fade',
				    timeout: 0,
				    next: '#next',
				    prev: '#prev'
	});
	$('#btn_link').click(function(){
				$('#vinculos_noticia').fadeIn();
	});
	$('#cerrar_links').click(function(){
				$('#vinculos_noticia').fadeOut();
	});
	$('.ext_link').target = "_blank";
		$('#contacto_inicio').click(function(){
				document.location.href='?pagina=contactenos&modo=ingresar';
	});
	$('#informativo').cycle({
				fx: 'fade'
	});
	
	$('#boton_cerrar, #av_trm_close').click(function() {
			$('#overlay, #boton_cerrar, #temp, #aviso_transmision').fadeOut('slow');
	});
	
	$('#cartel a').click(function() {
		$('#cartel').fadeOut('slow');
	});
});

function cerrarOverlay(){
			$('#overlay, #boton_cerrar, #temp, #aviso_transmision').fadeOut('slow');
	}
	
		setTimeout (cerrarOverlay, 30000);

