$(document).ready(function(){

    var animationTime = 100;

    $("#menu li:not(.active) a").hover(
        function(e) {
            var itemWrapper = $(this).parent();
            itemWrapper.hoverFlow(e.type, {marginTop: "5", height: "142"}, {duration: animationTime, easing: "easeInQuart"});
        },
        function(e) {
            var itemWrapper = $(this).parent();
            itemWrapper.hoverFlow(e.type, {marginTop: "15", height: "132"}, {duration: animationTime, easing: "easeOutQuart"});
        }
    );

    $("#menu li.active a").hover(
        function(e) {
            var itemWrapper = $(this).parent();
            itemWrapper.hoverFlow(e.type,
                                  {marginTop: "35"},
                                  {duration: animationTime,
                                   easing: "easeInQuart",
                                   step: function(now, fx) {
                                              $(".bottom-shadow", itemWrapper).css({'top': 102 - (now - 45) + 'px', 'height': 41 + (now - 45) + 'px'});
                                         }
                                  }
                                 );
        },
        function(e) {
            var itemWrapper = $(this).parent();
            itemWrapper.hoverFlow(e.type,
                                  {marginTop: "45"},
                                  {duration: animationTime,
                                   easing: "easeOutQuart",
                                   step: function(now, fx) {
                                              $(".bottom-shadow", itemWrapper).css({'top': 102 - (now - 45) + 'px', 'height': 41 + (now - 45) + 'px'});
                                         }
                                  }
                                 );
        }
    );

    $("a[rel^='prettyPhoto']").prettyPhoto({
                                            theme: 'light_rounded',
                                            counter_separator_label: ' / ',
                                            opacity: 0.9,
                                            showTitle: false
                                           });
});