$(window).load(function() {
	//something
	var $newsPanels = $('#scroller-news .scrollContainer-news > div');
	var $newsContainer = $('#scroller-news .scrollContainer-news');
	var $newsScroll = $('#scroller-news .scroll-news');
	
	$newsScroll.css('overflow', 'hidden');
	
	// if false, we'll float all the panels left and fix the width 
	// of the container
	var horizontal = true;
	
	// float the panels left if we're going horizontal
	if (horizontal) {
	  $newsPanels.css({
	    'float' : 'left',
	    'position' : 'relative' // IE fix to ensure overflow is hidden
	  });
	  
	  // calculate a new width for the container (so it holds all panels)
	  $newsContainer.css('width', $newsPanels[0].offsetWidth * $newsPanels.length);
	}
			
	var scrollOptionsNews = {
	  target: $newsScroll, // the element that has the overflow
	  
	  // can be a selector which will be relative to the target
	  items: $newsPanels,
	  
	  interval:8000,
		
	  force: true, // Start auto scrolling

	  // allow the scroll effect to run both directions
	  axis: 'xy',
	  
	  // duration of the sliding effect
	  duration: 1000,
	  
	  // easing - can be used with the easing plugin: 
	  // http://gsgd.co.uk/sandbox/jquery/easing/
	  easing: 'swing'
	};
	
	// apply serialScroll to the slider - we chose this plugin because it 
	// supports// the indexed next and previous scroll along with hooking 
	// in to our navigation.
	$('#scroller-news').serialScroll(scrollOptionsNews);
	$('#scroller-news').localScroll(scrollOptionsNews);
	//$newsContainer.serialScroll(scrollOptionsNews);
	//$newsContainer.localScroll(scrollOptionsNews);
	
	$newsScroll.trigger('start'); //doesn't do anything
	
	$('#scroller-news div.next').click(function(){
		$newsScroll.trigger('next');
	});
	$('#scroller-news div.prev').click(function(){
		$newsScroll.trigger('prev');
	});
});
