var tsbjQ = jQuery.noConflict();

function updateLatestPost(feed)
{
  if (feed.items.length == 0)
  {
//  tsbjQ("#blog-headline").show();
    tsbjQ("#blog-content").html("No recent blog posts");
    return;
  }

  var item = feed.items[0];
  tsbjQ("#blog-headline a").attr("href", item.link);
  tsbjQ("#blog-headline a").text(item.title);
  tsbjQ("#blog-content").html(item.description.substr(0, 850) + " ... ")
//  tsbjQ("#blog-headline").show();
}


jQuery(document).ready( function() {

//  tsbjQ("#blog-headline").hide();

  // fetch RSS from blog
  tsbjQ.getFeed( {
    url: '/blog/feed/',
    success: updateLatestPost
  });

});
