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

$( document ).ready(function(){

	
	//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 ) });
	
	
	$( ".project" ).hover(function(){
		//$( ".project .label" ).hide();
		$( ".project .label[rel='" + $(this).attr("title") + "']" ).show("slow");
	});
	
	
	$( ".btnPortafolio" ).click(function(){
		ruta = $(this).children().attr("src");
		$( ".big" ).attr("src", ruta );
		return false;
	});
	
});


function addNotify()
{
	if( !window.contactonotify )
	{
		window.contactonotify = $( '<div id="volatilnotif" class="info_notify">Obteniendo datos...</div>' )
					.css({ 
							"position":"absolute",
							"top" : "1200px",
							"left" : "650px",
							"width" : "400px",
							"height" : "50px",
							"z-index" : "10"
				}).get();
				
		$( document.body ).append( window.contactonotify );
	}
	else
		$( window.contactonotify ).show();
		
	setTimeout( function(){$( "#volatilnotif" ).fadeOut( "slow" )} , 600 );	
}


