$( document ).ready(
function () {


/* SEND IT - GÈRE TOUS LES ENVOIS HTML VERS D'AUTRES BALISES AU CHARGEMENT DE LA PAGE */
$("span.sendthis").each(function (i) {
$( '#'+$(this).attr("sendto") ).html( $(this).html() ); 
});


/* TRANSFERT DE DONNÉE HTML VERS UN AUTRE DIV. SUR MOUSE-OVER RETOUR DU HTML ORIGINAL */
$( '.innermove' ).hover( 
function(){ 
originalhtml = $( $( this ).attr("destinationmove") ).html();
$( $( this ).attr("destinationmove") ).html( $( this ).children("span.htmlinner").html() );
},
function(){ 
$( $( this ).attr("destinationmove") ).html(originalhtml);
});


/* CHANGEMENT DE CLASS ON MOUSEOVER */
$( '.overclass' ).hover( 
function () {  
$( this ).addClass( $( this ).attr("overclass") );
},
function () {  
$( this ).removeClass( $( this ).attr("overclass") ); 
}
);


/* AJAX */
/* CALL AJAX POUR TOUT LE SITE */
$( '.ajax' ).click( 
function () { 
$( '.ajax' ).css("color","");
$( this ).css("color","#000");
$( '#'+$( this ).attr("destination") ).load( $( this ).attr("ajax"), { post: $( this ).attr("post") });
} );


/* CHARGEMENT DE FACEBOX */	
$('a[rel=facebox]').colorbox({ opacity: 0.8, maxWidth: "900px", current: false, loop: false });


});
