$(document).ready(function(){
	/* Logo animation -- coming to rest */
	var logo_rest=465;
	var logo_bottom=500;
	
	/* Logo animation -- hovering */
	var image_top=-158;
	var image_bottom=591;
	
	var amount=4;
	Bum_img(1);
	var nav=[];
	
	$('.splash_menu .nav1 a').mouseenter (function() {
		nav1 = $(this);
		nav1.find('.text_hover').stop().animate({top:image_top},0);
		nav1.find('.text').stop().animate({top:image_bottom},200, function(){
			nav1.find('.text_hover').stop().animate({top:logo_bottom},300, function(){
				nav1.find('.text_hover').animate({top:logo_rest},300);															 
			});												   
		});											   
	}).mouseleave (function() {
		nav1.find('.text').stop().animate({top:image_top},0);
		nav1.find('.text_hover').stop().animate({top:image_bottom},200, function(){
			nav1.find('.text').stop().animate({top:logo_bottom},300, function(){
				nav1.find('.text').animate({top:logo_rest},300);															 
			});												   
		});	
	});
	$('.splash_menu .nav2 a').mouseenter (function() {
		nav2 = $(this);
		nav2.find('.text_hover').stop().animate({top:image_top},0);
		nav2.find('.text').stop().animate({top:image_bottom},200, function(){
			nav2.find('.text_hover').stop().animate({top:logo_bottom},300, function(){
				nav2.find('.text_hover').animate({top:logo_rest},300);															 
			});												   
		});											   
	}).mouseleave (function() {
		nav2.find('.text').stop().animate({top:image_top},0);
		nav2.find('.text_hover').stop().animate({top:image_bottom},200, function(){
			nav2.find('.text').stop().animate({top:logo_bottom},300, function(){
				nav2.find('.text').animate({top:logo_rest},300);															 
			});												   
		});	
	});
	$('.splash_menu .nav3 a').mouseenter (function() {
		nav3 = $(this);
		nav3.find('.text_hover').stop().animate({top:image_top},0);
		nav3.find('.text').stop().animate({top:image_bottom},200, function(){
			nav3.find('.text_hover').stop().animate({top:logo_bottom},300, function(){
				nav3.find('.text_hover').animate({top:logo_rest},300);															 
			});												   
		});											   
	}).mouseleave (function() {
		nav3.find('.text').stop().animate({top:image_top},0);
		nav3.find('.text_hover').stop().animate({top:image_bottom},200, function(){
			nav3.find('.text').stop().animate({top:logo_bottom},300, function(){
				nav3.find('.text').animate({top:logo_rest},300);															 
			});												   
		});	
	});
	$('.splash_menu .nav4 a').mouseenter (function() {
		nav4 = $(this);
		nav4.find('.text').stop().animate({top:logo_bottom},300, function(){
			nav4.find('.text').animate({top:logo_rest},300);															 
		});				
	}).mouseleave (function() {
		nav4 = $(this);
		nav4.find('.text').stop().animate({top:logo_rest-20},300, function(){
			nav4.find('.text').animate({top:logo_rest},300);															 
		});	
	});

	
	function Bum_img(i){
		if (i<=amount) {
			$('.splash_menu .nav'+i+' img').animate({top:'0'},400, function(){Bum_img(i+1)});
			Down_text(i);
		}
	}
	function Down_text(i){
		if (i<=amount) {
			$('.splash_menu .nav'+i+' .text').stop().animate({top:logo_bottom},1200, function(){
					Down_text(i+1);
					Up_text(i);
			});
		}
	}
	function Up_text(i){
			$('.splash_menu .nav'+i+' .text').animate({top:logo_rest},400);
	}
	
	
});

