//Menu hover
function menu_hover(){
    $(document).ready(function() {
        $('#navi ul li a, .cp_back, .cp_next_arrow, .cp_prev_arrow, a').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({color: "#2A8FBD"}, 500);
            },
            function() {
                if (!$(this).is('#navi ul li.current-menu-item a, #navi ul li.current-post-parent a')){ // Only for topnavigation
                    $(this).stop().animate({color: "#000C24"}, 500); 
                }
            });
        });
    });    
}

//Splash-page hover
function display_opacity(){
    $(document).ready(function() {
        $('.attachment-thumbnail').each(function() {
            $(this).css("opacity", "0.8");
            $(this).hover(function() {
                $(this).stop().animate({opacity: 1, backgroundColor: '#d9d8d8'}, 500);
            },
            function() {
                $(this).stop().animate({ opacity: 0.8, backgroundColor: '#ededed'}, 500);
                
                
            });
        });
    });    
}
//case hover
function casepic_hover(){
    
    $('#case img').each(function() {
        $(this).wrap('<div class="case-imgwrap" />');
    });
    
    $(document).ready(function() {
        $('a .case-imgwrap').each(function() {
            $(this).hover(function() {
                $(this).stop().animate({backgroundColor: '#d9d8d8'}, 500);
            },
        function(){
        $(this).stop().animate({backgroundColor: '#ededed'}, 500);
            });
        });
    });    
}
//Nivoslider
function nivoslider(){
    $(window).load(function() {
        $('#slider').nivoSlider({
            effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
            animSpeed: 1000, // Slide transition speed
            pauseTime: 8000, // How long each slide will show
            directionNav: false, // Next & Prev navigation
            directionNavHide: false, // Only show on hover
            controlNav: false, // 1,2,3... navigation
            pauseOnHover: true // Stop animation while hovering
        });
    });    
}

