$(document).ready(function(){
	$('#cross-sites').hover(
		function(e){
			$('#cross-sites>div').hoverFlow(e.type).slideDown('fast');
		},
		function(e){
			$('#cross-sites>div').hoverFlow(e.type).slideUp(70);
		}
	);
	
	$('#menu_nav a').click(function(a){
		var id = $(this).attr('href');
		$.scrollTo( id, 800, {easing:'easeInOutCirc'} );
		
		return false;
	});
	
	var currentImgPatchwork = '';

	function turnPatchwork(){
		clearInterval(startPatchwork);
		$('#patchwork img:last-child').fadeOut(2500, function(){
			currentImgPatchwork = $(this).detach();
			$('#patchwork img:first-child').before(currentImgPatchwork).show();
		});
	}
	var startPatchwork = setInterval(turnPatchwork, 2500);
	var timerPatchwork = setInterval(turnPatchwork, 5000);

});
