try {
$(function(){
  $('.expandingBox, .expandingBoxOpen').each(function(){
  $(this).wrap('<div class="expandOuter"><div class="expandInner"></div></div>');
  var $hTag = $(this).find('h1,h2,h3,h4,h5').eq(0);
  if(!$hTag.size()) $hTag = $('<h4/>');
  var spanClass = 'expandClick'
  if($(this).attr('class') == 'expandingBoxOpen') spanClass = 'expandClickLoad';
  $hTag.append('<span class="' + spanClass + '"></span>');
  $(this).closest('.expandOuter').prepend($hTag);
  $(this).removeClass('expandingBox expandingBoxOpen');
  });
  $('span.expandClick, span.expandClickOpen, span.expandClickLoad').toggle(function(){
  $(this).attr('class', 'expandClickOpen').closest('.expandOuter').find('> div.expandInner').slideDown(350);
  },
  function(){
  $(this).attr('class', 'expandClick').closest('.expandOuter').find('> div.expandInner').animate({'height': '1px', 'padding-bottom': 0}, 350, function(){$(this).css({'display': 'none', 'height': 'auto', 'padding-bottom': ''})});
  });
  setTimeout(function(){$('span.expandClickLoad').click()}, 500);
});
}catch(e){}
