var tabCssWidthStart = '5px';
var tabCssWidthEnd = '170px';


$(document).ready(function() {
    
    $('#navigation .tab').not('.active').mouseenter(function() {
        $(this).children('.link').children('a').css('color', '#ffffff');
        $(this).children('.background').animate(
        {
            width: tabCssWidthEnd
        },
        {
            duration: 500,
            complete: function() {
                //$(this).siblings('.link').children('a').css('color', '#ffffff');
            }
        });
    }).mouseleave(function() {
        $(this).children('.background').stop();
        $(this).children('.background').css('width', tabCssWidthStart);
        $(this).children('.link').children('a').css('color', '#000000');
    });
});

window.onunload = function() { }; //Hack: this makes $(document).ready run again when the back button is clicked

