jQuery(function() {

    jQuery.getFeed({
        url: '/rssproxy.php?url=http://xfanz.com/feeds/newsRSS.xml',
        success: function(feed) {
           
            var thisdate = feed.updated;
            var date_array = thisdate.split(/ /);
            var thisdateparsed = date_array[0] + ' ' + date_array[2] + ' ' + date_array[1] + ' ' + date_array[3];

            var html = '<p class="newsdate">' + thisdateparsed + '</p>';
            
            for(var i = 0; i < feed.items.length && i < 2; i++) {
            
                var item = feed.items[i];
                
                html += '<p><strong>'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</strong></p>';
                
                //html += '<div class="updated">'
                //+ item.updated
                //+ '</div>';
                
                html += '<p>'
                + item.description
                + '<br><a href="' + item.link + '" target="_blank">View article</a></p>';
              
            }
            
            jQuery('#newsdump').append(html);
        }    
    });
});