$(document).ready(function() {
    $('html').removeClass('no-js');
    
    /* Image hover */
    $('.nav a, a.button').hover(
        function() {
            $(this).not('.current').find('img').each(function() {
                var src = $(this).attr('src');
                var newSrc = src.replace(new RegExp("(\.png|\.jpg)", "i"), "_active$1");
                $(this).attr('src',newSrc);
            });
        },
        function() {
            $(this).not('.current').find('img').each(function() {
                var src = $(this).attr('src');
                var newSrc = src.replace('_active','');
                $(this).attr('src',newSrc);
            });
        }
    )
})
