function newsHeadlines(urlprefix) {
    // get the feed and plug its contents into "headlines" div
    // There is a DRY violation between this, generic.html and news.html
    $.getJSON (
        urlprefix + 'feed/json/5/?callback=?',
        function (data) {
            if (data[1].length == 0)
                return;
            $("#headlines").append ('<h2>News <a href="' + urlprefix +
                'feed/atom/"><img class="bare" ' +
                'src="/media/images/feed.png" alt="Atom feed"/></a></h2>');
            $.each (data[1], function (i, item) {
                $("#headlines").append (
                    '<h4><a href="' +item.link +'">' + item.title + '</a></h4>'
                    + '<p>' + item.description
                    + ' <a href="' +item.link +'">more...</a></p>'
                );
            });
        }
    )
}

