function rotate_news(){

	var first = 0;
	var speed = 2000;
	var pause = 6500;
	
		function removeFirst(){
			first = jQuery('ul#newslist li:first').html();
			jQuery('ul#newslist li:first')
			.animate({opacity: 0}, speed)
			.fadeOut('slow', function() {jQuery(this).remove();});
			addLast(first);
		}
		
		function addLast(first){
			last = '<li style="display:none">'+first+'</li>';
			jQuery('ul#newslist').append(last)
			jQuery('ul#newslist li:last')
			.animate({opacity: 1}, speed)
			.fadeIn('slow')
		}
	
	interval = setInterval(removeFirst, pause);
}

function smooth_scroll() {

jQuery('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
		var jQuerytarget = jQuery(this.hash);
		jQuerytarget = jQuerytarget.length && jQuerytarget
		|| jQuery('[name=' + this.hash.slice(1) +']');
	if (jQuerytarget.length) {
		var targetOffset = jQuerytarget.offset().top;
		jQuery('html,body')
		.animate({scrollTop: targetOffset}, 1000);
		return false;
	}
	}
});

}


jQuery(document).ready(function(){
						   
	rotate_news();
	smooth_scroll();


});
