$(document).ready(function() {
	//document.getElementById('NL_box').innerHTML="<span>Inscrivez-vous</span> � notre lettre d'information";
	$("a.thickbox, a[rel='lightbox']").fancybox({'hideOnContentClick': false,imageScale : true}); 
	$("a#box_ami").fancybox({frameWidth : 300,frameHeight : 200}); 
	if(document.all){$("a#box_fav").click(function(){window.external.AddFavorite(location.href, document.title);});
	}else{$("a#box_fav").fancybox({'hideOnContentClick': true,frameWidth : 400,frameHeight : 100});}
	
	/*-------------animation logo---------*/
	
	$('.logo,#img-plan').hover(function() { //mouse in
		$(this).stop().animate({ opacity: '0.5' }, 250);
	}, function() { //mouse out
    	$(this).stop().animate({ opacity: '1' }, 250);
   	});

/*-------------image de fond---------*/
	
	$(document).bgStretcher({
		images: ['gifs/fond.jpg'],
		imageWidth: 1600, imageHeight: 1200, resizeAnimate: false, resizeProportionally:false, nextSlideDelay:7000
	});	
	
	/*-------------Footer animate ---------*/
	$('#navigation_frame, .black').hide();
	
	$('#navigation').click(function() { 
		$('.black').stop(1,1).fadeIn(1100);
		$('#navigation_frame').stop(1,1).fadeIn(1000);
	});
	
	$('.black').click(function() { 
		$(this).stop(1,1).fadeOut(2000);
		$('#navigation_frame').stop(1,1).fadeOut(1100);
	});
	
	$('.close').click(function() { 
		$('.black').stop(1,1).fadeOut(2000);
		$('#navigation_frame').stop(1,1).fadeOut(1100);
	});
	
	/*-------------Newsletter ---------*/
	$('#input_newsletter').val('Votre adresse mail');
	 $(".all_actu a").html('Toutes nos actualit&eacute;s');
	/*-------------menuv-hover ---------*/
	$('#menuv li').hover(function() {
		$(this).find('.bg-menuv, .bg-menuv-last').stop().animate({'width':'100%'});
	}, function() {
		$(this).find('.bg-menuv, .bg-menuv-last').stop().animate({'width':'0%'});  
	});
	
	   $('#menuv li:not(li.select)').click(function(){
		$('#menuv li ul:not(li.select ul)').stop(1,1).slideUp();											
		$(this).find('ul').stop(1,1).slideToggle();
	});	
	
});

