$(document).ready(function(){
    
    $('#back-to-top, #intro-menu-intro, #post-menu-content, #other-menu-about').click(function(){
	$.scrollTo( 0, 1200 );
    });
    
    $('#intro-menu-id, #index-intro-id').click(function(){
	$.scrollTo( {
	    top:577, 
	    left:0
	}, 1200 );
    });
    
    $('#intro-menu-skills, #index-intro-skills').click(function(){
	$.scrollTo( {
	    top:2160, 
	    left:0
	}, 1200 );
    });
    
    $('#intro-menu-contact, #post-menu-about, #other-menu-contact').click(function(){
	$.scrollTo( {
	    top:'100%', 
	    left:0
	}, 1200 );
    });
    
    $('#index-intro-gui, #intro-menu-gui').click(function(){
	$.scrollTo( {
	    top:1548, 
	    left:0
	}, 1200 );
    });
    
    $('#post-menu-comment').click(function(){
	$.scrollTo( $('.comment-pattern'), 1200 );
    });
    
    $('#post-menu-description').click(function(){
	$.scrollTo( $('#post-description'), 1200 );
    });
    
    $("#top-menu-list a").hover(
	function(){
	    $(this).stop(true).animate({
		backgroundColor: "#f4f4f4" , 
		color: "#000"
	    }, 300)
	},
	function(){
	    $(this).stop(true).animate({
		backgroundColor: "#fff", 
		color: "#666"
	    }, 300)
	});

    $("#top-menu-back-home a").hover(
	function(){
	    $(this).stop(true).animate({
		color: "#666"
	    }, 300)
	},
	function(){
	    $(this).stop(true).animate({
		color: "#fff"
	    }, 300)
	});
	    
    $("#top-menu p a, .comment-body a, .home p a, #footer p a, #comment-loop a, .comment-pattern a, #not-found-intro a, #index-intro-info a").hover(
	function(){
	    $(this).stop(true).animate({
		color: "#999"
	    }, 300)
	},
	function(){
	    $(this).stop(true).animate({
		color: "#333"
	    }, 300)
	});
	    
    $("#respond a, #footer-contact-intro a").hover(
	function(){
	    $(this).stop(true).animate({
		color: "#ee1c25"
	    }, 300)
	},
	function(){
	    $(this).stop(true).animate({
		color: "#fff"
	    }, 300)
	});
	    
    $("#submit").hover(
	function(){
	    $(this).stop(true).animate({
		backgroundColor: "#ee1c25" , 
		color: "#fff"
	    }, 300)
	},
	function(){
	    $(this).stop(true).animate({
		backgroundColor: "#fff" , 
		color: "#ee1c25"
	    }, 300)
	});
	
    $("a").has(".hover-info").hover(
	function(){
	    $(".hover-info", this).stop(true).delay(150).animate({
		opacity: 1 , 
		marginTop: "16px"
	    }, 300)
	},
	function(){
	    $(".hover-info", this).stop(true).animate({
		opacity: 0 , 
		marginTop: "40px"
	    }, 100)
	});
	
    $("a").has(".hover-info-big").hover(
	function(){
	    $(".hover-info-big", this).stop(true).delay(150).animate({
		opacity: 1 , 
		bottom: "0"
	    }, 300)
	},
	function(){
	    $(".hover-info-big", this).stop(true).animate({
		opacity: 0 , 
		bottom: "-24px"
	    }, 100)
	});
    
    $(".hover-info, .hover-info-big").css({
	opacity: 0
    });
    
    $(".grid-toggle").toggle(
	function(){
	    $(this).addClass("grid-toggle-red"),
	    $("#grid-mask").fadeIn()
	},
	function(){
	    $(this).removeClass("grid-toggle-red"),
	    $("#grid-mask").fadeOut()
	});
	
    
    if (($.browser.msie == true && $.browser.version < 7 )) {} else{
	$("#back-to-top, #index-intro-works a, #index-id-works-big a, #index-id-works-small a, #index-gui-works-big a, #index-gui-works-small a, #index-skills a, #self-portrait, #workspace, #footer-contact-form .wpcf7-submit").blend(300);
    }
	

//$("#post-content img").hide();
//setTimeout(function(){
//$("#post-content img").fadeIn(500);
//},1000)
	
//setTimeout(function(){
//$("#mask1").fadeOut(500);
//},1000)
//setTimeout(function(){
//$("#mask2").fadeOut(500);
//},1100)
//setTimeout(function(){
//$("#mask3").fadeOut(500);
//},1200)
//setTimeout(function(){
//$("#mask4").fadeOut(500);
//},1300)
});

//$(document).ready(function(){
//    if (($.browser.msie == true && $.browser.version < 7 )) {} else{
//	$("#back-to-top, #index-intro-works a, #index-id-works-big a, #index-id-works-small a, #index-gui-works-big a, #index-gui-works-small a, #index-skills a, #self-portrait, #workspace, #footer-contact-form .wpcf7-submit").blend(300);
//    }
//});
