$(document).ready(function() {
  $('.entry .link').each(function() {
    var oLink = $(this);
    var link = oLink.find('a').attr('href');
    if (link.indexOf('http://blogoscoped.com/archive/') == 0) {
      oLink.removeClass('link').addClass('note').html('This post is <a href="http://creativecommons.org/licenses/by-nc/3.0/">CC-licensed</a> and originally appeared on <a href="http://blogoscoped.com/">Google Blogoscoped</a> at the following address: <a href="' + link + '">' + link + '</a>');
    }
  });
  $('.timestamp').each(function() {
    var oTimestamp = $(this);
    var timestamp = oTimestamp.find('a').text();
    if (timestamp == '00:00') {
      oTimestamp.hide();
    }
  });
  $('.comments').each(function() {
    var oComments = $(this);
    var comments = parseInt(oComments.text(), 10);
    if (comments == 1) {
      oComments.text(comments + ' comment');
    }
  });
});