//$=jQuery.noConflict(true);
$(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	$("#menuBar a").click(function(){
		$(this).blur();
	});
	
	//When mouse rolls over
	/*$("li.productions").mouseover(function(){
		$("li.productions ul").stop().animate({height:'168px'},{queue:false, duration:900})
	});
	
	//When mouse is removed
	$("li.productions").mouseout(function(){
		$("li.productions ul").stop().animate({height:'0'},{queue:false, duration:900})
	});*/
	
});

$(function(){

	$('#menuBar .accueil a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
			}});
		});
	
	$('#menuBar .productions a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
			}});
		});
	$('#menuBar .productions li a')
		.css( {backgroundPosition: "center bottom"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(center bottom)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(center bottom)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "center bottom"});
			}});
		});
		
	$('#menuBar .productionTv a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
			}});
		});
		
	$('#menuBar .dernieres a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
			}});
		});
	$('#menuBar .groupeGalaxe a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
			}});
		});
	$('#menuBar .contact a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(0 -70px)"}, {duration:500});
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(0 -36px)"}, {duration:200, complete:function(){
				$(this).css({backgroundPosition: "0 36px"});
				$(this).css({color:'#696767'});
			}});
		});
		
	$('#menuBar .courant a')
		.css( {backgroundPosition: "0 -70px"} )
		.mouseover(function(){
			$(this).stop();
		})
		.mouseout(function(){
			$(this).stop();
		});
		
	$(".archiveList li").hover(
		function () {
    $(this).addClass("hover");
	},
		function () {
    $(this).removeClass("hover");
	}
	);
	
});
