jQuery(document).ready(clipNewsItems);

function clipNewsItems() {
   $('.hi_actueel li').each(function () {
      var $this = $(this);
      var $a = $this.children('a');
      var liWidth = $this.width();
      var wasClipped = false;


      while ($a.width() > liWidth - 6) {
         $a.html( $a.html().substr(0, $a.html().length - 2) );
         wasClipped = true;
      }

      if (wasClipped) {
         $a.html( $a.html() + '...' );
      }

   });
}
