$(function() {
  jQuery.fn.outerHTML = function(s) {
  return (s)
  ? this.before(s).remove()
  : jQuery("<p>").append(this.eq(0).clone()).html();
  }

  $("#sponsors-list a").jcarousel({auto:2});


  $("ul.bio-grid li").each(function() {
    var elm = $(this);

    var readmore = $("<a>read more</a>").addClass("readmore");
    var short_bio = $(".short-bio", this);
    var bio = $(".bio", this);

    short_bio.append(readmore);
    bio.prepend($(this).find("img").clone());
    bio.prepend($(this).find(".caption").clone()),

    readmore.fancybox({
      content: bio.outerHTML(),
      scrolling:"auto",
      padding: 0
    }).resize();

  });

});

