
 //<![CDATA[ 
			 
  window.addEvent('domready', function() {
									   
// set up the instance
var news = new SlideShow('news_slider',{
    delay: 1000,
    duration: 500,
    transition: 'fadeThroughBackground',
    autoplay: false
});

// create navigation controls for references
var navsRef = $$('.news_navi');
navsRef.each(function(element, index){
    element.addEvents({
        click: function(){
            // index of list items match index of slides
            news.show(index, {transition: 'fadeThroughBackground', duration: 1000});
        }
    });
});
news.addEvent('show', function(slideData){
    // args of the show event are the previous/next slides and their index
    // again, nav index matches slide index so this is cake
    navsRef[slideData.previous.index].removeClass('current');
    navsRef[slideData.next.index].addClass('current');
});
  });
  //]]> 
