$(document).ready(function() {
	$("a.thickbox, a[rel='lightbox']").fancybox({
		'hideOnContentClick': false,
		imageScale : true
	}); 	
	$("a[rel='videobox']").fancybox({
		frameWidth : 565,
		frameHeight : 430
	});
	$("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,.btn-contact,.btn-news,.header-top a').hover(function() { 
   		$(this).stop().animate({ opacity: '0.7' }, 250);
  	}, function() {
    	$(this).stop().animate({ opacity: '1' }, 250);
   	});
	
	//	MENU
	$('.menuHorizontal ul').css('display','none');
	$('.menuHorizontal li').hover(
		function(){
			$(this).find('ul').stop(1,1).slideDown(200);
		},
		function(){
			$(this).find('ul').stop(1,1).slideUp(200);
		}
	);
	/*
	$('#slides').slides({
				preload: true,
				preloadImage: 'img/loading.gif',
				play: 3000,
				pause: 3000,
				hoverPause: true
			});
	*/
	
	$('#slides').bxSlider({
		mode:'fade',
		auto:1,
		autoHover:1,
		pager:0,
		pause:6000,
		controls:1,
		prevText:null,
		nextText:null,
		prevImage:"gifs/prevarrow.png",
		nextImage:"gifs/nextarrow.png"
	});
	$('#encart_actualite ul').bxSlider({
		mode:'fade',
		auto:1,
		autoHover:1,
		pager:0,
		pause:6000,
		controls:1,
		prevText:null,
		nextText:null,
		prevImage:"gifs/prevarrow.png",
		nextImage:"gifs/nextarrow.png"
	});
	
	$('#refLinks').click(function(){
		$('#footer_links').stop(1,1).slideToggle();
	});
	
	$('#search-keyword').focus( function() {
		if ($(this).val() == 'Mots clés...') {
			$(this).val('');
		}
	}).blur( function() {
		if ($(this).val() == '') {
			$(this).val('Mots clés...');
		}
	});
});
