$(function() {   
	$(".slider").scrollable({circular: true, vertical: true, speed: 1000}).navigator().autoscroll({
		interval: 5000
	});
	$('.slideshow').cycle({
		fx: 'fade',
		timeout: 5000
	});
	$('.slideshow_news').cycle({
		fx: 'fade',
		timeout: 3000
	});
	
	//run = setInterval('moveY()', 5000);	
	$('#mainNav li').hover(
		function () {
			var main = ($(this).width() / 2);
			var sub = ($('ul', this).width() / 2);
			var gap = 8;
			
			$('ul', this).css('marginLeft', -((sub - main) - gap)+'px')
			$('ul', this).slideDown(200);
		}, 
		function () {
			$('ul', this).slideUp(200);			
		}
	);  
	
	$('.more_news').click(function() {						 
		id = $(this).attr('id');
		$('#contentAll').load('include/news.php', { id: id }, function() {
			
		});
	});
		
	Cufon.replace('h1,h3',{hover:true,hoverables:{a:true}});	
	
});

function moveY(){
	$('.items').css('marginTop', '0px');
	clearInterval(run);
}





