(function ($) {

Drupal.behaviors.expandcode = {
  attach: function(context) {
    $('div.geshifilter', context).each(function() {
      var fullWidth = $(this).css('position', 'absolute').width();
      var normalWidth = $(this).css('position', 'relative').width();

      if (fullWidth > normalWidth) {
        $(this).addClass('geshi-overflowed');
        $(this).hover(function() {
          $(this).stop().animate({ width: fullWidth + "px" }, 400).css('overflow-x', 'scroll');
        }, function() {
          $(this).stop().animate({ width: normalWidth + "px" }, 400).css('overflow-x', 'scroll');
        });
      }
    });
  }
};

})(jQuery);
;

