;(function($){
	$(function(){
		var nav=$('nav'),
			navRfrsh=function(){
				var hovered=$('a._hover,.active a',nav),
					_fu=arguments.callee
				hovered
					.stop()
					.animate({
							 paddingBottom:82,
							 backgroundColor:'#fff',
							 color:'#15212e'
							 },{
							 easing:'easeOutCirc',
							 duration:300,
							 complete:function(){
								 _fu()
							 }
							})
				$('li:not(.active) a:not(:animated)',nav).not(hovered)
					.stop()
					.animate({
							 paddingBottom:0,
							 color:'#fff',
							 backgroundColor:'#15212e'
							 },{
							 easing:'easeInExpo',
							 duration:500,
							 complete:function(){
								 _fu()
							 }
							})
				}
		
		nav
			.delegate('li:not(.active) a','mouseenter',function(){
				$(this).addClass('_hover')
			})
			.delegate('li:not(.active) a','mouseleave',function(){
				$(this).removeClass('_hover')
			})
			.delegate('a','mouseenter mouseleave focus',navRfrsh)
			
		$('#content')
			.bind('_change',function(){
				setTimeout(function(){
					$('a',nav).trigger('mouseout')
				},100)
			})
			.bind('_pagRefreshEv',function(){
				navRfrsh()
			})
		
	})
})(jQuery)
