$(document).ready(function(){

	/*** fade in elements ***/
	$("#title").delay(400).fadeTo(500, 1.0);
	$("#subtitle").delay(700).fadeTo(500, 1.0);
	$("#frontmenu").delay(1100).fadeTo(500, 1.0);
	$("#twitter").delay(1400).fadeTo(500, 0.3);
	$("#facebook").delay(1400).fadeTo(500, 0.3);
	$("#photogallery").delay(500).slideDown(2000);
	
	$('#contacto').click(function() {
	$('#containerform').fadeIn(200);
	$('#containertop').slideUp(200);
	});
    
	$('#curriculum').click(function() {
	$('#containercv').fadeIn(200);
	$('#containertop').slideUp(200);
	});
    
	$(".scroll").click(function(event){		
	event.preventDefault();
	$('html,body').animate({scrollTop:$(this.hash).offset().top}, 500);
	});
    
    $('.up').click(function() {
    $('#containertop').slideDown(200);
    $('#containerform').fadeOut(200);
    $('#containercv').fadeOut(200);
    });
    
    $(".up").hover(function(){
	$(this).fadeTo("100", 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo("100", 0.3); // This should set the opacity back to 30% on mouseout
	});
							   						   
	$("#twitter").hover(function(){
	$(this).fadeTo(300, 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo(300, 0.3); // This should set the opacity back to 30% on mouseout
	});
	
	$("#facebook").hover(function(){
	$(this).fadeTo(300, 1.0); // This should set the opacity to 100% on hover
	},function(){
	$(this).fadeTo(300, 0.3); // This should set the opacity back to 30% on mouseout
	});		
});
