(function(b){b.fn.imageCaption=function(e){var d=b.extend({captionContainer:'<span class="re-imagecaption-wrapper" />',imageWrapper:'<span class="re-imagecaption-image" />',captionWrapper:'<span class="re-imagecaption-caption" />'},e);return this.each(function(e,f){if(b(f).attr("title")!==""){var a=b(f),g=a.width(),c=a.parent(),c=c.is("a")?c:a,a=b(d.captionContainer).addClass(a.attr("class")).append(b(d.imageWrapper).html(c.clone())).append(b(d.captionWrapper).text(a.attr("title")));g>0&&a.width(g);
a.find("img").removeAttr("class").removeAttr("align").removeAttr("border").removeAttr("style").parents(".re-imagecaption-wrapper");c.replaceWith(a)}})}})(jQuery);;
/**
 * @file
 * This file provides whatever javascript logic and functions are necessary for
 * the RE Image Caption plugin in the re_contextlibraries module.
 *
 * Originally developed for use with the raisedeyebrow.com Drupal site. You can
 * override this file in the theme.
 */
(function ($) {  
  Drupal.behaviors.re_imagecaption = {
    attach: function(context) {
      $('.field-name-body img, .field-name-field-blog-image img').imageCaption();
    }
  }; /* Drupal.behaviors.re_imagecaption */
})(jQuery);
;

