(function(global) {
  var s150 = global.s150 || (global.s150 = {}), $ = global.jQuery;

  /* DEPRECATED - we're not using this code anymore */
  s150.vimeo = (function() {
    var OEMBED_URL = "http://vimeo.com/api/oembed.json?url=http://vimeo.com/";
  
    var attachVideoToDOM = function(target, iframe, options) {
      /* override width and height */
      var iframe = $(iframe)
                    .attr('width', '100%')
                    .attr('height', '100%');
      $(target).html(iframe);
    };
    
    return function(options) {
      var target    = options.target;
      var videoID   = options.videoID;
      var url = OEMBED_URL + videoID + "&callback=?";
      $.getJSON(url, function(data) {
        attachVideoToDOM(target, data.html, options)
      });
    };
  }());

  $(document).ready(function() {
    body = $('body');
    
    if (s150.Carousel) {
      $('.carousel').each(function() {
        new s150.Carousel(this);              
      });
    }
 })

})(this);

