jQuery(function() {
	$(document).ready(function() {

	$('#facebook-content').hide('fast');
	$('#myspace-content').hide('fast');
	$('#youtube-content').hide('fast');

	});

	$('#facebook-container').click(function() {
		if ($('#facebook-content').is(':hidden')){
			$('#facebook-content').show('slow');
			$('#facebook-logo').animate({width: 60}, 'fast');
		} else {
			$('#facebook-content').hide('slow');
			$('#facebook-logo').animate({width: 30}, 'fast');
        }
	});
	
	$('#myspace-container').click(function() {
		if ($('#myspace-content').is(':hidden')){
			$('#myspace-content').show('slow');
			$('#myspace-logo').animate({width: 60}, 'fast');
		} else {
			$('#myspace-content').hide('slow');
			$('#myspace-logo').animate({width: 30}, 'fast');
        }
	});

	$('#youtube-container').click(function() {
		if ($('#youtube-content').is(':hidden')){
			$('#youtube-content').show('slow');
			$('.youtube-iframe').show('fast');
			$('#youtube-logo').animate({width: 60}, 'fast');
		} else {
			$('#youtube-content').hide('slow');
			$('.youtube-iframe').hide('fast');
			$('#youtube-logo').animate({width: 30}, 'fast');
        }
	});


	$('#au-dessus').click(function() {
		$('#au-dessus').hide('slow');
	});


	$("a.fancydisque").click(function() {
		var element = $(this).parent();
		var next = element.children('.disque-content');
		element.fancybox({
	        transitionIn        : 'fade',
	        transitionOut       : 'fade',
	        onStart             : function(){next.show();},
	        onClosed            : function() {next.hide();},
			hideOnContentClick  : true
    })});


	// Fancybox
    // Permet l'ouverture d'une fenêtre au-dessus. Il faut un lien avec la
    // classe fancybox
	$('a.fancybox').fancybox({
       	opacity:true,
        transitionIn: 'elastic',
        transitionOut: 'fade',
        titleShow: false
   	});

});


