Changing images when hovering over links
Refactor the function from the data. Then you can just bind the same function to all of the links.

html

  &lt;li&gt;&lt;a id="1" href="#" data-img='image1.jpg'&gt;Link 1&lt;/a&gt;&lt;/li&gt;


js

$('#navigation li a').hover(
    function(){
        $(this).addClass('hover');
        $('.box img').attr('src', $(this).data('img');
    },
    function(){
        $(this).removeClass('hover');
        $('.box img').attr('src', 'default.jpg');
    }
);