$(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});}
	
  /* $('#descriptif').click(function() {
		if($(this).find('div:eq(1)').height()<100)
     		$(this).find('div:eq(1)').stop().animate({ 'height': '300px' }, 500);
		else
	      	$(this).find('div:eq(1)').stop().animate({ 'height': '72px' }, 500);
   });*/
  
  	$(function() { $(".lavaLamp").lavaLamp({ fx: "easeOutBounce", speed: 1000 })});
	$('#bulles a').tooltip({ showURL: false, positionLeft: true, top:30,left:30 })

	// Application des border-radius pour IE
	if(!$.support.borderRadius) {
		$('#tooltip').corner('12px cc:#666666');
	}

	

	$('#footer').css({'height':'8px'});
	$('#btnFooter').click(function() { 
		if($('#footer').height()<10) {
   			$('#footer').stop().animate({ 'height': '178px' }, 250);
			$('#btnFooter').html('Masquer la navigation');
			$('#btnFooter').css({'backgroundImage':'url(gifs/btn-footer.png)'});
		}
		else {
   			$('#footer').stop().animate({ 'height': '8px' }, 250);
			$('#btnFooter').html('Afficher la navigation');
			$('#btnFooter').css({'backgroundImage':'url(gifs/btn-footer.png)'});
		}
  		return false;
   	});
	
	function replaceElement() {
		var b=$('body').height();
		var c=$('#container').height();
		if(b>c) {
			var h=(b-462)+'px';
			$('#container').css({'minHeight':h});
		}
	}
	
	replaceElement();
	
	$(window).resize(function() {
		replaceElement();						  
	});
	
	
	
});


