function redirecciona(pageWeb){
	document.location.href = pageWeb;
}

function openWindow(mypage, myname, w, h, t, l, scroll,resizable) {				
	if (t == 0 || l == 0){
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
	}else{
		var winl = l;
		var wint = t;
	}
	
	var winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+',toolbar=no'
	var win = window.open(mypage, myname, winprops)
		if (parseInt(navigator.appVersion) >= 4)
		{
			win.window.focus();
		}
}	




	

$(document).ready(function()
{
	
	$("#formulario").submit( function(){
				var datos_form= $("#formulario").serialize();
				$("#log-msg").removeClass().addClass('status-msg').text('Procesando...').fadeIn(1000);	
				$.post("send.php",datos_form, function(data){
					switch(data)
		  			{
					  case 'yes':
		  				$("#log-msg").fadeTo(200,0.1,function()  
						{ $(this).html('Proceso Completado').removeClass().addClass('warning-msg').fadeTo(900,1, function(){	document.location='index.php?mod=contacto';});});
		 			 break;
		 			 case 'falta':
		 				 $("#log-msg").fadeTo(200,0.1,function() 
						 {$(this).html('Datos Incompletos.').removeClass().addClass('error-msg').fadeTo(900,1);});	
		     		 break;
		 			 case 'no':
		  				$("#log-msg").fadeTo(200,0.1,function() 
						{ $(this).html('Datos Incorrectos.').removeClass().addClass('error-msg').fadeTo(900,1);});	
					  break;
					  }
						
				});
				return false;
		});
	

	
});


$(document).ready(function(){
                //Examples of how to assign the ColorBox event to elements
                $("a[rel='example1']").colorbox();
                $("a[rel='example2']").colorbox({transition:"fade"});
                $("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
                $("a[rel='example4']").colorbox({slideshow:true});
                $(".single").colorbox({}, function(){
                    alert('Howdy, this is an example callback.');
                });
                $(".colorbox").colorbox();
                $(".youtube").colorbox({iframe:true, width:650, height:550});
                $(".iframe").colorbox({width:"80%", height:"80%", iframe:true});
                $(".inline").colorbox({width:"50%", inline:true, href:"#inline_example1"});
                
                
            });

