(function($){

  $('#feature ul').cycle({
  fx: 'fade',
  timeout: 10000,
  speed: 'slow'
  });
$('table.team td').hover(
    function () {
      $(this).find('img').show()
    }, 
    function () {
      $(this).find('img').hide()
    }
  );
  $.fn.cellWrap = function() {
      var $el;
      return this.each(function() {
          $el = $(this);
          var newDiv = $("<div />", {
                  "class": "cell-wrap",
                  "css"  : {
                          "height"  : $el.height(),
                          "width"   : "100%",
                          "position": "relative"
                  }
          });
          $el.wrapInner(newDiv);
      });
  };
  $("table.team td").cellWrap();
$('#promo').cycle({
  timeout: 800,
  speed: 80,
  fx: 'scrollLeft'
  }).cycle("pause").hover(function() {
    $('#promo').cycle('resume');
  },function(){
    $('#promo').cycle('pause');
  });

  $("a[href^=http]").each(function(){
    if(this.href.indexOf(location.hostname) == -1) {
      $(this).addClass("external").attr('target', '_blank');
    }
  });
})(jQuery);
