/* requires jQuery */
window.newIcon || (function() {

    window.newIcon = _newIcon;

    function _newIcon() {
        var duration = 5;
        var now = new Date();
        var tag = '<span><img src="img/scroll-news_new.gif" width="32" height="13" alt="new" /></span>';
    
        $('#scroll-news .scroll ul li').each(function() {
            var past = new Date($('span', this).text());
            if (now.getTime() - past.getTime() < duration * 24 * 60 * 60 * 1000
                || now.getTime() < past.getTime()
            ) {
                $('span', this).after(tag);
            }
        });
    }

})();

$(function() {
    try {
        new newIcon();
    } catch(e) {
        //alert(e);
    }
});

