$(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	});}
		
	function effect(var1){
		if(var1==1){
			$("#sousMenu").stop(true).animate({'height':170+'px', 'opacity':0.95},300);
		}
		else{
			$("#sousMenu").stop(true).animate({'height':0+'px', 'opacity':0.1},300);
		}
	}
	
	$("#menu .element2 a").hover(
      function () {
		effect(1)
      }, function () {
		effect(0)
      }
    );	
	$("#sousMenu").hover(
      function () {
		effect(1)        
      }, function () {
		effect(0)
      }
    );
	
	$('#logo').hover(function() { //mouse in
   		$(this).find('img').stop().animate({ opacity: '0' }, 750);
  	}, function() { //mouse out
    	$(this).find('img').stop().animate({ opacity: '1' }, 750);
   	}); 
	
	$("#icarrousel").easySlider({
		auto: true, 
		continuous: true,
		prevId: 'prevBtn',
		prevText: 'Précédent',
		nextId: 'nextBtn',	
		nextText: 'Suivant',
		speed: 1000,
		pause: 3300
	});
	
	$('#menu li a:not(.selected)').hover(function() { //mouse in
   		$(this).stop().animate({ backgroundPosition: '(20px 0)' }, 250);
		var id=$(this).parent().attr('class').substr(7,1);
		$('#col'+id).stop().animate({ backgroundPosition: '(0 20px)' }, 250);
   	}, function() { //mouse out
    	$(this).stop().animate({ backgroundPosition: '(0 0)' }, 250);
		var id=$(this).parent().attr('class').substr(7,1);
		$('#col'+id).stop().animate({ backgroundPosition: '(0 0)' }, 250);
   	});
	
});

