$(document).ready(function() {
	$("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(){
	    jQuery('img.bgmaximage').maxImage({
	        isBackground: true, overflow:'auto'
		});
	});
	
	
	$('.menuTop ul').css('display','none');
	$('.menuTop li').hover(
		function(){
			$(this).find('ul').stop(true,true).slideDown();
		},
		function(){
		   $(this).find('ul').stop(true,true).slideUp();
		}
	);
	
	
	var h=$('#footer').css('height');
	$('#footer').css({'height':'8px'});
	$('#btnFooter').click(function() { 
		if($('#footer').height()<10) {
   			$('#footer').stop().animate({ 'height': 180 }, 250);
			$('#btnFooter').html('&raquo; Masquer la navigation');
			$('#btnFooter').addClass('current');
		}
		else {
   			$('#footer').stop().animate({ 'height': '8px' }, 250);
			$('#btnFooter').html('&raquo; Afficher la navigation');
			$('#btnFooter').removeClass('current');
		}
  		return false;
   	});
	
	$("#carou-partenaires").carouFredSel({
		items 		: 1,
		direction	: "up",
		circular: true,
		prev: "#prev",
		next: "#next",
		auto : {
			pauseOnHover: true
		}
	});	
	
	$("#carou-cdc").carouFredSel({
		items 		: 1,
		direction	: "up",
		circular: true,
		prev: "#prev2",
		next: "#next2",
		auto : {
			pauseOnHover: true
		}
	});
	
});
