$(document).ready(function(){

/* changes news items description length */
   $('div#home-news div.home-news-item-intro').each(function(){
      news_html = $(this).text();
      news_html ="<p>" +news_html.substring(0,146)+ "</p>";
      $(this).html(news_html);
   });


/*changes time format on newsfeed atrticles */

   $('p.home-news-item-date span.pubdate').each(function(){
      var this_text = $(this).text();
      this_text = this_text.substring(4,this_text.length - 9) + " GMT";
      $(this).text(this_text);
   });

/* moves ...more label to the end of descritpion */
$('p.right_aligned').each(function(){
  var more = $(this).html();
  $(this).siblings('div.home-news-item-intro').children('p').append(more);
  $(this).remove();
});

/* sets news-boxes equal heights */
 var maxheight = 0;

 $('div.home-news-item').each(function(){
   if ( $(this).height() > maxheight) {maxheight = $(this).height();}
 });

 $('div.home-news-item').each(function(){
   $(this).height(maxheight);
 });


});






