swapVideo = function(vid){
  	        videoURL = 'videos/' + vid + '.html';
           new Ajax.Updater('digital-content', videoURL, {asynchronous:true});
       }
       
function initCarousel_html_carousel() {carousel = new Carousel('html-carousel', {animHandler:animHandler, animParameters:{duration:0.5}, buttonStateHandler:buttonStateHandler, nextElementID:'next-arrow', prevElementID:'prev-arrow', size:14})};Event.observe(window, 'load', initCarousel_html_carousel);

function buttonStateHandler(button, enabled) {
 if (button == "prev-arrow") 
   $('prev-arrow').src = enabled ? "../images/left3-enabled.gif" : "../images/left3-disabled.gif"
 else 
   $('next-arrow').src = enabled ? "../images/right3-enabled.gif" : "../images/right3-disabled.gif"
}

function animHandler(carouselID, status, direction) {
  var region = $(carouselID).down(".carousel-clip-region")
  if (status == "before") {
    Effect.Fade(region, {to: 0.3, queue: { position:'end', scope: "carousel" }, duration: 0.2})
  }
  if (status == "after") {
    Effect.Fade(region, {to: 1, queue: { position:'end', scope: "carousel" }, duration: 0.2})
  }
}
