function activateStartpageNav($overlap, $div_nav, $span_item) {
    var count = 0;
    $div_nav.removeClass('noscript');
    $span_item.each(function() {
        count += 1;
        var t = $(this);
        if (t.hasClass("selected")) {
            t.css('margin-right', -3);
            $div_nav.mouseenter(function() {
                t.animate( {'marginRight': 0}, 150);
            });
            $div_nav.mouseleave(function() {
                t.animate( {'marginRight': -3}, 330);
            });
        }
        else {
            t.css('margin-right', -t.width()+$overlap);
            $div_nav.mouseenter(function() {
                t.animate( {'marginRight': 0}, 150);
            });
            $div_nav.mouseleave(function() {
                t.animate( {'marginRight': -t.width()+$overlap}, 330);
            });
        }
        var shadow = t.parent().next("div.shadow");
        shadow.html('<a href="' + t.parent().attr('href') + 
            '" style="display:block; width:' + shadow.css('width') + 
            '; height:' + shadow.css('height') + ';">&nbsp;</a>');
        shadow.mouseenter(function() {
            t.parent().addClass('hover');
        });
        shadow.mouseleave(function() {
            t.parent().removeClass('hover');
        });
    });
    $div_nav.css('height', count * ($span_item.parent().parent().height() + 
	  	parseInt($span_item.parent().parent().css('margin-top'))) + 
	  	parseInt($span_item.parent().parent().css('margin-bottom')) + 10);
    //$div_nav.css('height', count * ($span_item.parent().parent().height() + 
	  //	parseInt($span_item.parent().parent().css('margin-top'))));
}


