	$(document).ready(
					  
					  
					  function() {
			/*
			*   Examples - images
			*/

			$("a.popup").fancybox({
				'titleShow'		: false,
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});

			$("a#[rel=galerie]").fancybox({
			'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
			$("a#[rel=video]").fancybox({
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'titlePosition' 	: 'over',
				'titleFormat'		: function(title, currentArray, currentIndex, currentOpts) {
					return '<span id="fancybox-title-over">Video ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
				}
			});
			
				// Fancis Box pour le player
			$("#player").fancybox({
				'width'				: '48.2%',
				'height'			: '115%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
						// Fancis Box pour le playerAppli
			$("#playerAppli").fancybox({
				'width'				: '70%',
				'height'			: '115%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
			
			
				$("#player_simple").fancybox({
				'width'				: '50%',
				'height'			: '100%',
				'autoScale'			: false,
				'transitionIn'		: 'none',
				'transitionOut'		: 'none',
				'type'				: 'iframe'
			});
			
			// Texte PLUS
				    $('div.expandable').expander({
    slicePoint:       1000,  // default is 100
    expandText:         'Voir la suite', // default is 'read more...'
    collapseTimer:    0, // re-collapses after 5 seconds; default is 0, so no re-collapsing
    userCollapseText: '[fermer]'  // default is '[collapse expanded text]'
  });
							// Texte PLUS
				    $('div.texte_petit').expander({
    slicePoint:       850,  // default is 100
    expandText:         'Voir la suite', // default is 'read more...'
    collapseTimer:    0, // re-collapses after 5 seconds; default is 0, so no re-collapsing
    userCollapseText: '[fermer]'  // default is '[collapse expanded text]'
  });
			
			
			
					// Texte PLUS
				    $('div.expandable1').expander({
    slicePoint:       2300,  // default is 100
    expandText:         'Voir la suite', // default is 'read more...'
    collapseTimer:    0, // re-collapses after 5 seconds; default is 0, so no re-collapsing
    userCollapseText: '[fermer]'  // default is '[collapse expanded text]'
  });
					
			
		});
	
	  function formatText(index, panel) {
		  return index + "";
	    }
    
        $(function () {
        
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                delay: 4000,                    // How long between slide transitions in AutoPlay mode
                startStopped: false,            // If autoPlay is on, this can force it to start stopped
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
        		startText: "Go",             // Start text
		        stopText: "Stop",               // Stop text
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            $("#slide-jump").click(function(){
                $('.anythingSlider').anythingSlider(6);
            });
            
        });
		
			/* Player */

$(document).ready( function(){
    $('ul#animated-panorama').animatedinnerfade({
				speed: 2000,
				timeout: 15000,
						type: 'sequence',
						containerheight: '350px',
						containerwidth: '881px',
						animationSpeed: 35000,
						animationtype: 'fade',
	                    controlBox: 'none',
						controlBoxClass: 'mycontrolboxclass',
	                    controlButtonsPath: 'img',
                        displayTitle: 'none' 
	});
} ); 

	/* Partenaires */
$(document).ready(function(){
	/* The following code is executed once the DOM is loaded */
	
	$('.sponsorFlip').bind("click",function(){
		
		// $(this) point to the clicked .sponsorFlip element (caching it in elem for speed):
		
		var elem = $(this);
		
		// data('flipped') is a flag we set when we flip the element:
		
		if(elem.data('flipped'))
		{
			// If the element has already been flipped, use the revertFlip method
			// defined by the plug-in to revert to the default state automatically:
			
			elem.revertFlip();
			
			// Unsetting the flag:
			elem.data('flipped',false)
		}
		else
		{
			// Using the flip method defined by the plugin:
			
			elem.flip({
				direction:'lr',
				speed: 350,
				onBefore: function(){
					// Insert the contents of the .sponsorData div (hidden from view with display:none)
					// into the clicked .sponsorFlip div before the flipping animation starts:
					
					elem.html(elem.siblings('.sponsorData').html());
				}
			});
			
			// Setting the flag:
			elem.data('flipped',true);
		}
	});
	
});// JavaScript Document

