/**
*Procedimientos y funciones de uso general
*
*/
var nav4 = window.event ? true : false;

jQuery( document ).ready(function(){
	
	$("#noticia ul li").css("height","1500px");
	
	$("#noticias_destacadas").jCarouselLite({
		auto: 9000,
		btnNext: ".next",
		btnPrev: ".prev",
		scroll: 1,
		visible: 1,
		speed:2000
	});
	
	$("#noticia").jCarouselLite({
		btnNext: ".next",
		btnPrev: ".prev",
		scroll: 1,
		visible: 1,
		speed:2000
	});
	
	$("#video").jCarouselLite({
		btnNext: ".next",
		btnPrev: ".prev",
		scroll: 1,
		visible: 1,
		speed:2000
	});

	$("#foto").jCarouselLite({
		btnNext: ".btn_next",
		btnPrev: ".btn_prev",
		scroll: 1,
		visible: 1,
		speed:2000
	});

//solo numeros
	$( "input.onlynumber" ).keypress(function( evt ){
		var key = nav4 ? evt.keyCode : evt.which;
		return /[\d]/.test( String.fromCharCode( key ) );
	});
	
	//monetario
	$( "input.money" ).keyup(function(){
		this.value = number_format( this.value );
	});
	
	//solo letras
	$( "input.onlyword" ).keypress(function(){
		var key = nav4 ? evt.keyCode : evt.which;
		return /[\w]/.test( String.fromCharCode( key ) );
	});
	
	$( "form.formvalida" ).submit(function(){ return EvaluaReg( this ) });
	
});