var $j = jQuery.noConflict();

$j(document).ready(function () {

  $j('div.case-study-info a.expand').click(createExpandable('+ READ MORE', '- READ LESS'));
  $j('div.item-list-container a.expand').click(createExpandable('+ EXPAND', '- CLOSE'));

});

function createExpandable(onText, offText) {
  return function(event) {
   event.preventDefault();
   var anchor =$j(event.target);
   var expandable = anchor.parents('.expandable');
   var oldHeight = expandable.height(); 
   expandable.height(''); /* remove explicit style, fallback to CSS definition */
   expandable.toggleClass('expandable-closed');
   var newHeight = expandable.height()
   if (expandable.hasClass('expandable-closed')) {
   /* close it */
   expandable.height(oldHeight);
   expandable.animate({ height: newHeight}, "fast");
   anchor.text( onText );
   } else {
   /* open it */
   expandable.height(oldHeight);
   expandable.animate({ height: newHeight}, "fast");
   anchor.text( offText );
   }
  }
}