$.fn.extend({
  nowidow: function()
  {
    return $(this).each(function()
    {
      var el = $(this);
      el.html(el.html().replace(/(\S+)\s+(\S+)$/gm, "$1&#160;$2"));
    });
  }
});

$(function()
{
  $("h1,h2,h3,h4,h5,h6,p,.wfix").nowidow();
});
