$(document).ready(function(){

	var snow = false;
	
	if (snow == true){

		$().jSnow({
	        vSize:'300',
	        fadeAway:true,
	        flakes : 30,
	        fallingSpeedMax : 3,  
	        fallingSpeedMin : 0,  
	        interval : 30
	    });	
	
	}
	
	$('#antispam').html('<strong>eMail</strong>: <a href="mailto:consulta@tecnasformacion.es">consulta@tecnasformacion.es</a>');
	$('#googleMap img').css('margin' , '100px');
		
});

function doWarning(message){
	alert(message);
	return false;
}

function solicitarCarnet(){
	
	var errorSolicitud = false;
	var nombre = $('#nombre').val();
	var email = $('#email').val();
	
	if (nombre == ''){ errorSolicitud = true; }
	if (email  == ''){ errorSolicitud = true; }
	
	if (errorSolicitud == true){
		
		alert('Es necesario que indiques tus datos para completar la solicitud.');
		$('#nombre').focus();
	
	} else {
		
		$('#solicitarSubmit').val('Enviando datos...');
		$('#solicitarCarnet').submit();		
	}

}

$('.respuesta_item').click( function(){
	
	$(this).parent().parent().parent().css('background-color' , '#EFEFEF');

})

// Scrolls smoothly to the top of the page
function scroll_up(){
	$('html, body').animate({scrollTop:0}, 'slow');
	return false;
}
// Scrolls smoothly to the top of the page END
