var $ = jQuery.noConflict();
$(function() {
  var em = 10;
  var content_width = 0;
  $("#content .post").each(function() {
    content_width += $(this).width() + parseInt($(this).css('paddingRight'));
  });
  $("#content").css({width: (content_width/em)+"em"});
  $('a[href*=#]').click(function(event) {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
      if ($target.length) {
        window.scroll($target.offset().left, $target.offset().top);
        event.preventDefault();
      }
    };
  });
});