$(window).load(function() {
	/* 
	Orbit: A Slick jQuery Image Slider Plugin
	http://www.zurb.com/playground/orbit-jquery-image-slider
	> Slider header
	*/
	$('#featured').orbit({
		animation: 'fade',
		animationSpeed: 800,
		timer: true,
		advanceSpeed: 4000,
		pauseOnHover: false,
		startClockOnMouseOut: false,
		startClockOnMouseOutAfter: 1000,
		directionalNav: false,
		captions: false,
		captionAnimation: 'fade',
		captionAnimationSpeed: 800,
		bullets: false,
		bulletThumbs: false,
		bulletThumbLocation: '',
		afterSlideChange: function(){}
	});	
	
	function mycarousel_initCallback(carousel) {
		jQuery('#news_slide_controls a').bind('click', function() {
			carousel.scroll(jQuery.jcarousel.intval(jQuery(this).find('img').attr("alt")));
			return false;
		});
	};

	// Carousel Homepage
	jQuery(document).ready(function() {
		jQuery('#news_slide').jcarousel({
			scroll: 1,
			auto:4,
			wrap:'circular',
			initCallback: mycarousel_initCallback,			
			buttonNextHTML: null,
			buttonPrevHTML: null
		});
	});
	
	// Carousel clubs photos
	jQuery(document).ready(function() {
		jQuery('#photos_slider_club').jcarousel({
			scroll: 3,
			wrap:'last'
		});
	});
	
	$('.close').click(function () {
    $('#text_content').slideToggle("slow");
  });
	
	//Lightbox photos clubs
	//$(function() {
    $('.jcarousel-item a.lghtbox, .lghtbox').lightBox();
  //});

	//$('a.embed').gdocsViewer({width: 600, height: 750});
	//$('#embedURL').gdocsViewer();
	
});


function afficheDoc(){
  $('#com_presentation').hide();
  $('#com_dl').show();
  $('#link_presentation').removeClass('selected_com_in');
  $('#link_dl').addClass('selected_com_in');
}

function affichePresentation(){
  $('#com_dl').hide();
  $('#com_presentation').show();
  $('#link_dl').removeClass('selected_com_in');
}
