$(document).ready(function(){
    //$(".scroll").mousemove(function(e) {
    //    var x = -((e.clientY - $(".scroll").offset().top) / $(".scroll").height()) * ($(".works").height() - $(".scroll").height()) * 1.03 - 150;
    //    $(".works").css('top', x + 'px');
    //});
    
    $(".album").mouseenter(function(){
        $(this).find(".albumName").animate({'height':'0%'}, "slow");
    });
    $(".album").mouseleave(function(){
        $(this).find(".albumName").animate({'height':'40%'}, "slow");
    });
    
    $(".aboutMore").mouseenter(function () {
	$(this).fadeOut(500);
	$(".aboutText").fadeOut(500);
	$("#scrollbar1").fadeIn(500);
    });
    
    $(".main").mouseenter(function(){
        $("footer").fadeIn(500);
    });

    $(".listItem").mouseenter(function()
    {
        $(this).find(".item").vibrate('x', 10, 2, 4);
        $(".listItem").removeClass("selected");
    });
    $(".listItem").mouseleave(function()
    {
        $("#selected").addClass("selected");
    });
    
    $(".header").height($(".header").width()*.25);

      
    var originalFontSize = getOriginalFontSize();
 
    $("html").css("font-size", originalFontSize+"em");
 
    $(window).resize(function()
    {
	$(".header").height($(".header").width()*.25);
	
        var winWidth = $(window).width();
        var thisFontSize = winWidth / 1920;

        $("html").css("font-size", thisFontSize+"em");
    });
    
    $(".sculpture").hover(
        function() {
            $(this).find("img.bw").stop().animate({"opacity": "0"}, "slow");
            $(this).find(".description").fadeIn(500);
        },
        function() {
            $(this).find("img.bw").stop().animate({"opacity": "1"}, "slow");
            $(this).find(".description").fadeOut(500);
    });
    
    $("a[rel^='prettyPhoto']").prettyPhoto({
        theme: 'light_square',
        horizontal_padding: 28
    });
    $(".prettyPhoto").click(function() {
        $.prettyPhoto.open('images/fullscreen/image.jpg','Title','Description');
    })
    
});
 
getOriginalFontSize = function()
{
    var windowWidth = $(window).width();
 
    var thisFontSize = windowWidth / 1920;
 
    return thisFontSize;
}
