// JavaScript Document

$(document).ready(function(){

	
	
	/*POS_X, POS_Y, WIDTH & HEEIGHT
	$("#mark-menu li.active").children().children().css({'left' : logoActivePosX, 'top' : logoActivePosY, 'width' : logoActiveWidth, 'height' : logoActiveHeight})
	$("#mark-menu li.active").prevAll().children().children('img').css({'left' : logoPosX, 'top' : logoPosY})
	$("#mark-menu li.active").nextAll().children().children('img').css({'right' : logoPosX, 'top' : logoPosY})
	*/	
	
	$("#main-menu li ul").css({'display' : 'none'})
	
	$("#main-menu li").hover(
		function() {
                    
			$(this).children('ul').css({'display' : 'block'})
                        $(this).addClass("hover");
                        $(this).parents().addClass("active");
                        $(this).siblings().removeClass("active");
		},
                function() {
                        $(this).parent().removeClass("active");
			$(this).children('ul').css({'display' : 'none'})
                        $(this).removeClass("hover");
		}
	);
	
	/*MOUSE EVENTS*/
	/*Bouton positionné avant le btn active*/
	$("#mark-menu li.active").prevAll().children().children('span').mouseover( 
		function() {
			$(this).parent().animate({
				  top: '4px'
			  }, 200);
			$(this).siblings('img').animate({
				  top: logoHoverPosY,
				  left: logoHoverPosX
			  }, 50);
		}
	);
	$("#mark-menu li.active").prevAll().children().children('span').mouseout( 
		function () {
			$(this).parent().animate({
				  top: '0px'
			  }, 200);
			$(this).siblings('img').animate({
				  top: logoPosY,
				  left: logoPosX
			  }, 0);
		}
	);
	
	/*Bouton positionné après le btn active*/
	$("#mark-menu li.active").nextAll().children().children('span').mouseover( 
		function() {
			$(this).parent().animate({
				  top: '4px'
			  }, 200);
			$(this).siblings('img').animate({
				  top: logoHoverPosY,
				  right: logoHoverPosX
			  }, 50);
		}
	);
	$("#mark-menu li.active").nextAll().children().children('span').mouseout( 
		function () {
			$(this).parent().animate({
				  top: '0px'
			  }, 200);
			$(this).siblings('img').animate({
				  top: logoPosY,
				  right: logoPosX
			  }, 0);
		}
	);
	
	/*GALLLERY*/
	$(".gallery li a span").mouseover (
		function () {
			$(this).animate({
				  top: '-16px'
			  }, 200);
			$(this).siblings('img').animate({
				  top: '-6px'
			  }, 200)
		}
	);
	$(".gallery li a span").mouseout (
		function () {
			$(this).animate({
				  top: '5px'
			  }, 300);
			$(this).siblings('img').animate({
				  top: '2px'
			  }, 200)
		}
	);
	
});
