$(document).ready(function(){
	
	$("#jflow_slider_control").jFlow({
		slides: "#jflow_slider_slides",
		width: "587px",
		height: "280px",
		easing: "swing",
		duration: 500,
		auto: true
	});
	
	$('#home-watchlist-list').jcarousel({
		auto: 4,
		wrap: 'last'
    });
    
    function cycle_commitments()
    {
    	$('#home-news-headlines li:first').clone(true).hide().insertAfter('#home-news-headlines li:last');
    	$('#home-news-headlines li:first').fadeTo('slow', 0).slideUp('slow', function(){
    		$('#home-news-headlines li:hidden').eq(1).fadeIn('slow');
    		$(this).remove();
    	})
    }
    
    $('#home-news-headlines').each(function(){
    	$(this).css({
    		'height': $(this).height(),
    		'overflow': 'hidden'
		})
    });
    setInterval(cycle_commitments, 5000);
	
	
	
});
