$(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});}
			
	$('#logo').hover(function() { //mouse in
   		$(this).find('img').stop().animate({ opacity: '0' }, 250);
  	}, function() { //mouse out
    	$(this).find('img').stop().animate({ opacity: '1' }, 250);
   	});
	
	var opened=false;
	
	$('#ctrl').click(function(){
    $('html,body').animate({
    scrollTop: $('#end').offset().top + 'px'
   }, 'slow');
 }) 
	
	$('#ctrl').click(function() {
		if(!opened) {
			$('#panel_footer_frame').stop().animate({'height':'200px'},250);
			opened=true;
			return false;
			
   
		}
		else {
			$('#panel_footer_frame').stop().animate({'height':'0'},250);
			opened=false;
			return false;
		}
		
		
	});
	$("#ctrl").click(function () {
      $("#ctrl").stop(0,1).toggleClass("btn-panel-hover");
	});
});


      

