		$(document).ready(function() {
				$.localScroll();
				
				$('#celular').SoloNumeros();
				
				$('#enviar').click(function(e)
					{
						e.preventDefault();
						
						if($.trim($('#nombre_completo').val()) == '')
						{
							alert('Por favor ingresa tu nombre completo');
							$('#nombre_completo').focus();
						}
						else if($.trim($('#mail').val()) == '')
						{
							alert('Por favor ingresa tu mail');
							$('#mail').focus();
						}
						else if(!$('#mail').validarMail())
						{
							alert('Por favor ingresa un mail válido');
							$('#mail').focus();
						}
						else if($.trim($('#celular').val()) == '')
						{
							alert('Por favor ingresa tu número de celular');
							$('#celular').focus();
						}
						else if($.trim($('#carrera').val()) == '')
						{
							alert('Por favor selecciona una carrera');
							$('#carrera').focus();
						}
						else
						{
							$('#enviar').attr('disabled', 'disabled').val('Enviando...');
							var datos = 'nombre_completo='+$.trim($('#nombre_completo').val())+'&mail='+$.trim($('#mail').val())+'&celular='+$.trim($('#celular').val())+'&carrera='+$.trim($('#carrera').val());
							$.ajax({
								type: "POST",
								url: "contacto.php",
								data: datos
							}).done(function(msg)
								{
									if(msg == 1)
									{
										$.colorbox(
											{
												href:"ok-envio.html",
												iframe:true,
												width:"290",
												height:"250",
												scrolling:false,
												onClosed:function()
													{
														document.getElementById('contacto').reset();
														$('#enviar').removeAttr('disabled').val('Enviar');
													}
											});
									}
									else
									{
										$.colorbox(
											{
												href:"error-envio.html",
												iframe:true,
												width:"270",
												height:"220",
												scrolling:false,
												onClosed:function()
													{
														$('#enviar').removeAttr('disabled').val('Enviar');
													}
											});
									}
								});
						}
					}
				);
			}
		);
		
		$(window).load(function() {
        $('#slider').nivoSlider();
    		}
    	);
    	
    $(window).bind("load", function() { 
    	$("div#Galeria").slideViewerPro(); 
			}
		);
		
		jQuery.fn.SoloNumeros =
			function()
			{
					return this.each(function()
					{
							$(this).keydown(function(e)
							{
									var key = e.charCode || e.keyCode || 0;
									// allow backspace, tab, delete, arrows, numbers and keypad numbers ONLY
									return (
											key == 8 ||
											key == 9 || 
											key == 13 ||
											key == 46 ||
											(key >= 37 && key <= 40) ||
											(key >= 48 && key <= 57) ||
											(key >= 96 && key <= 105));
							})
					})
			};
			
		jQuery.fn.validarMail = 
			function()
			{
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($(this).val()))
				{
					return true;
				}
				else
				{
					//$(this).focus();
					return false;
				}
				
			};
			
			//Ventana Modal
			$(document).ready(function(){
				//Examples of how to assign the ColorBox event to elements
				$(".iframe").colorbox({iframe:true, width:"385", height:"500"});
				$(".video").colorbox({iframe:true, innerWidth:735, innerHeight:510});
				$(".callbacks").colorbox({
					onOpen:function(){ alert('onOpen: color box is about to open'); },
					onLoad:function(){ alert('onLoad: color box has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: color box has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: color box has begun the close process'); },
					onClosed:function(){ alert('onClosed: color box has completely closed'); }
				});
				
				//Example of preserving a JavaScript event for inline calls.
				$("#click").click(function(){ 
					$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});
			});
