jQuery(document).ready(function($){
 
//  var hdif = $("#sidebar").height() - $("#main").height();
//  if (hdif > 0) {
//    hdif = hdif + Number($("#sidebar").css('paddingTop').replace('px',''));
//    
//    if ($("#content .content:last-child").length > 0)
//      $("#content .content:last-child").css('paddingBottom', hdif + 'px');
//    else if ($("#content.content").length > 0)
//      $("#content.content").css('paddingBottom', hdif + 'px');
//  }
  
  var sideheight = $("#sidebar").height() + 
                   Number($("#sidebar").css('paddingTop').replace('px',''));
  var hadd = 0;
  var i = 3;
  while (((hdif = sideheight - $("#main").height()) > 0) && (i>0))
  {
    hadd += hdif;
    if ($("#content .content:last-child").length > 0)
      $("#content .content:last-child").css('paddingBottom', hadd + 'px');
    else if ($("#content.content").length > 0)
      $("#content.content").css('paddingBottom', hadd + 'px');
    --i;
  }
  
  
  
});
