﻿/*Copyright 2010 by Korri (korrisite.com)*/
$(function(){
		$('#navigation a[hover!=1]').css({color: '#000'});
		
		$('.arrow-center').stop().css({width: $('a[active=1]').attr('m-width')-2});
		$('.pointer-center').stop().css({width: $('a[active=1]').attr('m-width')-2});
		$('.pointer-bottom').stop().css({width: $('a[active=1]').attr('m-width')-20});
		$('#slider').stop().css({left: $('a[active=1]').attr('left')-7});	
		$('a[active=1]').css({color: '#FFF'});
		
		
		$('#navigation a').hover(function(){
	
			$(this).attr('hover','1');
			$('#navigation a[hover!=1]').animate({color: '#000'}, 100, 'easeOutExpo');
			$('#navigation a[active=1]').animate({color: '#000'}, 100, 'easeOutExpo');
			
			$('.arrow-center').stop().animate({width: ($(this).attr('m-width')-2)}, 1000);
			$('.pointer-center').stop().animate({width: ($(this).attr('m-width')-2)}, 1000);
			$('.pointer-bottom').stop().animate({width: ($(this).attr('m-width')-20)}, 1000);
			$('#slider').stop().animate({left: $(this).attr('left')-7}, 1000);
			
			$('#navigation a[hover=1][active!=1]').animate({color: '#FFF'}, 1000, 'easeInExpo');
			
		},function(){
			if($(this).attr('active') != 1){$(this).attr('hover','0');}
		});

		
	
		$('#navigation').hover(function(){},function(){

			
			$('a[hover=1][active!=1]').stop().attr('hover','0');
			$('#navigation a[hover!=1]').animate({color: '#000'}, 100, 'easeOutExpo');
			
			$('.arrow-center').stop().animate({width: ($('a[active=1]').attr('m-width')-2)}, 1000);
			$('.pointer-center').stop().animate({width: ($('a[active=1]').attr('m-width')-2)}, 1000);
			$('.pointer-bottom').stop().animate({width: ($('a[active=1]').attr('m-width')-20)}, 1000);
			$('#slider').stop().animate({left: $('a[active=1]').attr('left')-7}, 1000);
			
			$('a[active=1]').animate({color: '#FFF'}, 1000, 'easeInExpo');
		});
		
});

