$(document).ready(function() {

	jQuery.getFeed({
		url: 'http://coursesmart.info/blog/?tag=ipad&feed=rss2&format=xml',
		success: function(feed) {
			var count = 5;
			var blog = $('#blog');
			$('#blog h3').show();
			for (var i=0; i<count; i++) {
				if (feed.items[i]) {
					var title = feed.items[i].title;
					var link = '...<br /><a href="' + feed.items[i].link + '" target="_blank">Continue Reading</a>';
					var description = feed.items[i].description.replace(' [...]', '');
					var byline = 'By ' + feed.items[i].author + ': ' + date("F dS, Y", feed.items[i].updated);
					var post = '<div><h5>' + title + '</h5><small>' + byline + '</small><p>' + description + link + '</p></div>';
					blog.append(post);
				}
			}
		}
	});

});
