/*
 * jQuery WidowFix Plugin
 * http://matthewlein.com/widowfix/
 * Copyright (c) 2010 Matthew Lein
 * Version: 1.2 (10/6/2010)
 * Dual licensed under the MIT and GPL licenses
 * Requires: jQuery v1.4 or later
 */

(function(a){jQuery.fn.widowFix=function(d){var c={letterLimit:null,linkFix:false};var b=a.extend(c,d);return this.each(function(){if(b.linkFix){a(this).find("a:last").wrap("<var>");var e=a("var").html();a("var").each(function(){a(this).find("a").contents().unwrap()})}var h="";var g=a(this).html().split(" ");var i=g.pop();if(b.letterLimit!==null&&i.length>=b.letterLimit){return}function f(){if(i===""){i=g.pop();f()}}f();h=g.join(" ")+"&nbsp;"+i;a(this).html(h);if(b.linkFix){a("var").each(function(){a(this).contents().replaceWith(e);a(this).contents().unwrap()})}})}})(jQuery);
