jQuery(function() {
    jQuery(window).scroll(function(){
        var scrollTop = jQuery(window).scrollTop();
        if(scrollTop != 0)
            jQuery('#NavigationWrapper').stop().animate({'opacity':'0.2'},400);
        else
            jQuery('#NavigationWrapper').stop().animate({'opacity':'1'},400);
    });

    jQuery('#NavigationWrapper').hover(
        function (e) {
            var scrollTop = jQuery(window).scrollTop();
            if(scrollTop != 0){
                jQuery('#NavigationWrapper').stop().animate({'opacity':'1'},400);
            }
        },
        function (e) {
            var scrollTop = jQuery(window).scrollTop();
            if(scrollTop != 0){
                jQuery('#NavigationWrapper').stop().animate({'opacity':'0.2'},400);
            }
        }
    );
});
