// Jquery functionality to parse the rss from the wordpress 
// blog and feed it into the latest news section on the site

jQuery(function() {
		$(document).ready(function() {
			jQuery.getFeed({
				url: 'blog/?feed=rss',
				success: function(feed) {
					
					var latestNews = $('#latestNews');
					//latestNews.html('');
					for(var i = 0; i < feed.items.length && i < 3; i++) {
						var item = feed.items[i];
						latestNews.append('<li><a href="'+item.link+'"><span class="date">'+item.title+'</span></a><h3><a href="'+item.link+'">'+item.description.substring(0, 58)+' <span class="readMore">more&hellip;</span></a></h3></li>');
					};
				}
			});
		});
	});
