$(document).ready(function(){
						
	// recherche
	$("#recherche_champs").val("Votre recherche");
	$("#recherche_champs").focus(function() {
		$(this).attr("value", "");
	});
	
	// recherche
	$("#recherche_agenda").val("Votre recherche");
	$("#recherche_agenda").focus(function() {
		$(this).attr("value", "");
	});
	
	// portfolio
	$('#mycarousel a').click(function(e){
		var bigUrl = $(this).attr('href');
		$('#big').attr('src', bigUrl);
		return false;
	});
	
	// Titres Noirs
	/*$(".articles h2 span, #agenda h2, #sorties h2, #pratique h2, #annuaires h2, #motscles h2").sifr({
		strSWF: '../flash/impact.swf',
		strWmode: 'transparent',
		strColor: '#000000'
	});*/
	
	// Titres Blancs
	/*$("#menu_bulle li a, #alaune_titre_s1").sifr({
		strSWF: '../flash/impact.swf',
		strWmode: 'transparent',
		strColor: '#FFFFFF'
	});*/
	
	// Titres Bleus
	/*$("#alaune_titre_s2, #buzz h2, #vallee_tv h2").sifr({
		strSWF: '../flash/impact.swf',
		strWmode: 'transparent',
		strColor: '#00A7EB'
	});*/
	
	// Titres Roses
	/*$(".articles h3 a").sifr({
		strSWF: '../flash/impact.swf',
		strWmode: 'transparent',
		strColor: '#E1007A'
	});*/
	
	// Titres gris
	/*$(".agenda_date, #sorties h4 a").sifr({
		strSWF: '../flash/impact.swf',
		strWmode: 'transparent',
		strColor: '#666666'
	});*/	
	
	// VCU TV
	$('#vallee_tv h2').after('<div id="video">'+$($('#videoList li a:first').attr('href')).html()+'</div>');
	$('#videoList li:gt(2)').width("0").hide();
	$('#videoList').prepend('<li class="previous" style="width:24px;"><div> </div></li>')
		.append('<li class="next" style="width:24px;"><div> </div></li>');
	$('#videoList .previous div').hide();
	$('#videoList .previous div').click(function () { 
		vallee_tv_previous();
	});
	$('#videoList .next div').click(function () { 
		vallee_tv_next();
	});
	$('#videoList a').click(function() {
		if (! $(this).parent().hasClass('next') && ! $(this).parent().hasClass('previous')) {
			var act = "display_"+$(this).attr('href').replace("#", "");
			$('#video').html('<a href="javascript:'+act+'();">'+$(this).html()+'</a>');
		}
	});
	
	if ($('#videoList li:eq(4)').hasClass('next'))
		$('#videoList .next div').hide();
	
	$('#video').html('<a href="javascript:display_video_0();">'+$('#videoList li a:eq(0)').html()+'</a>');
		
	
	// Accordéon
	$(".accordeon-content").each(function() {
		if($(this).prev("h2").attr("class").indexOf("titre-bulle-pointe") < 0) {
			$(this).hide();
		}
	});
	$(".accordeon h2").click(function() {
		// Animation
		$(".accordeon-content").slideUp();
		$(this).next("div").slideDown();
		// Initialisation des classes
		$(".accordeon h2").removeClass("titre-bulle-pointe");
		$(".accordeon h2").removeClass("titre-bulle-grisfonce");
		$(".accordeon h2").addClass("titre-bulle-grisclair");
		// Ajout des classes statut ouvert
		$(this).addClass("titre-bulle-pointe");
		$(this).removeClass("titre-bulle-grisclair");
		$(this).addClass("titre-bulle-grisfonce");
	});
	
	
	
});