$(document).ready(function(){       
        
        
        // Pushes
        var interval = 30;
        $('#nb_demandes').load('scripts/pushes/nb_demandes.php');
        $('#nb_collaborations').load('scripts/pushes/nb_demandescollaboration.php');
        $('#nb_messages').load('scripts/pushes/nb_messages.php');        
        $('#nb_notifications').load('scripts/pushes/nb_notifications.php');
        $('#nb_enligne').load('scripts/pushes/nb_enligne.php');
        $('#amis_enligne').load('scripts/pushes/amis_enligne.php');
        var refresher = function() { $('#nb_demandes').load('scripts/pushes/nb_demandes.php'); }                
        var refreshing = setInterval(refresher, interval * 1000);
        var nbcollaborations = function() { $('#nb_collaboration').load('scripts/pushes/nb_demandescollaboration.php'); }                
        var refreshingcollaborations = setInterval(nbcollaborations, interval * 1000);
        var nbmessages = function() { $('#nb_messages').load('scripts/pushes/nb_messages.php'); }                
        var refreshingmessages  = setInterval(nbmessages, interval * 1000);
        var nbnotifications = function() { $('#nb_notifications').load('scripts/pushes/nb_notifications.php'); }                
        var refreshingnotifications  = setInterval(nbnotifications, interval * 1000);
        var nbenligne = function() { $('#nb_enligne').load('scripts/pushes/nb_enligne.php'); }                
        var refreshingnbenligne  = setInterval(nbenligne, interval * 1000);
        var amisenligne = function() { $('#amis_enligne').load('scripts/pushes/amis_enligne.php'); }                
        var refreshingamisenligne  = setInterval(amisenligne, interval * 1000);
        
        var interval_enligne = 10;
        $('#enligne').load('scripts/pushes/enligne.php');
        var enligne = function() { $('#enligne').load('scripts/pushes/enligne.php'); }                
        var refreshingenligne  = setInterval(enligne, interval * 1000);           
        
        var interval_dl = 30;
        var href = window.location.href;
        var refresher_dl = function() { $('#decouvrez-les').load(href + ' #decouvrez-les'); }                
        //var refreshing_dl = setInterval(refresher_dl, interval_dl * 1000);
        
        var interval_nm = 45;
        var href = window.location.href;
        var refresher_nm = function() { 
          $('#mes-visites').load(href + ' #mes-visites');
          //$('#mon-reseau').load(href + ' #mon-reseau');
          //$('#a-pourvoir').load(href + ' #a-pourvoir');
          $('#nouveaux-membres').load(href + ' #nouveaux-membres');
          //$('#activites-recentes').load(href + ' #activites-recentes'); 
        }                
        //var refreshing_nm = setInterval(refresher_nm, interval_dl * 1000);
        
        // Barre perso
        
          $('#barre_perso').fadeIn('slow');
        
        // Menu        
        
        $("#menu_offres").hover(function(){
          $("#menu_medias_div").css('display', 'none');
          $("#menu_discussions_div").css('display', 'none');
          $("#menu_agenda_div").css('display', 'none');
          $("#menu_offres_div").show("fast");
        },function(){$("#menu_offres_div").delay(500).hide("fast");});
        $("#menu_agenda").hover(function(){
          $("#menu_offres_div").css('display', 'none');
          $("#menu_medias_div").css('display', 'none');
          $("#menu_discussions_div").css('display', 'none');
          $("#menu_agenda_div").show("fast");
        },function(){$("#menu_agenda_div").delay(500).hide("fast");});
        $("#menu_discussions").hover(function(){
          $("#menu_offres_div").css('display', 'none');
          $("#menu_medias_div").css('display', 'none');          
          $("#menu_agenda_div").css('display', 'none');
          $("#menu_discussions_div").show("fast");
        },function(){$("#menu_discussions_div").delay(500).hide("fast");});
        $("#menu_medias").hover(function(){
          $("#menu_offres_div").css('display', 'none');
          $("#menu_discussions_div").css('display', 'none');
          $("#menu_agenda_div").css('display', 'none');
          $("#menu_medias_div").show("fast");
        },function(){$("#menu_medias_div").delay(500).hide("fast");});
        
        $('#search').focus(function() {           
            if($(this).val() === "Rechercher") 
            $(this).val('');
        }).focusout(function() {
          if(jQuery.trim($(this).val()) === '')
          $(this).val('Rechercher');
        });       
        
        //
        
        // Barre personnelle
        
		$('#ibp_notifications').hover(function(){$('#ibp_notifications_infobox').css('display','block');},function(){$('#ibp_notifications_infobox').css('display','none');});
		$('#ibp_messages').hover(function(){$('#ibp_messages_infobox').css('display','block');},function(){$('#ibp_messages_infobox').css('display','none');});
		$('#ibp_contacts').hover(function(){$('#ibp_contacts_infobox').css('display','block');},function(){$('#ibp_contacts_infobox').css('display','none');});
		$('#ibp_collaborations').hover(function(){$('#ibp_collaborations_infobox').css('display','block');},function(){$('#ibp_collaborations_infobox').css('display','none');});
		$('#ibp_visites').hover(function(){$('#ibp_visites_infobox').css('display','block');},function(){$('#ibp_visites_infobox').css('display','none');});
		$('#ibp_favoris').hover(function(){$('#ibp_favoris_infobox').css('display','block');},function(){$('#ibp_favoris_infobox').css('display','none');});
		
        var frequence = 30;
        
        $('#ibp_notifications').load('scripts/pushes/bp_notifications.php');
        var bpnotifications = function() { $('#ibp_notifications').load('scripts/pushes/bp_notifications.php'); }                
        var rbpnotifications  = setInterval(bpnotifications, frequence * 1000);
                       
        $('#ibp_messages').load('scripts/pushes/bp_messages.php');
        var bpmessages = function() { $('#ibp_messages').load('scripts/pushes/bp_messages.php'); }                
        var rbpmessages  = setInterval(bpmessages, frequence * 1000);
        
        $('#ibp_contacts').load('scripts/pushes/bp_contacts.php');
        var bpcontacts = function() { $('#ibp_contacts').load('scripts/pushes/bp_contacts.php'); }                
        var rbpcontacts = setInterval(bpcontacts, frequence * 1000);
        
        $('#ibp_collaborations').load('scripts/pushes/bp_collaborations.php');
        var bpcollaborations = function() { $('#ibp_collaborations').load('scripts/pushes/bp_collaborations.php'); }                
        var rbpcollaborations = setInterval(bpcollaborations, frequence * 1000);
        
        $('#ibp_visites').load('scripts/pushes/bp_visites.php');
        var bpvisites = function() { $('#ibp_visites').load('scripts/pushes/bp_visites.php'); }                
        var rbpvisites = setInterval(bpvisites, frequence * 1000);
        
        $("#bbp_parametres").click(function () {$("#bp_parametres").toggle("fast");});
        $("#bbp_messagerie").click(function () {$("#bp_messagerie").toggle("fast");});
        $("#bbp_contenus").click(function () {$("#bp_contenus").toggle("fast");});
        $("#bbp_reseau").click(function () {$("#bp_reseau").toggle("fast");});
        $("#bbp_publicite").click(function () {$("#bp_publicite").toggle("fast");});
        
        $('#barre_photo').hover(function(){ $('#barre_pseudo').show("fast"); });
        $('#barre_photo').mouseleave(function(){ $('#barre_pseudo').hide("slow"); });
        
        //
        
        $('#mondiv').click(function(){ $(this).animate({'background-position':'0px'}); });
        $('#mondiv').mouseleave(function(){ $(this).animate({'background-position':'-225px'}); }); 
        
        // Datepicker				
        $("#debut").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: +1, maxDate: '+2y'});
				$("#fin").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: +1, maxDate: '+2y'});
				$("#limite").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: +1, maxDate: '+2y'});
				$("#naissance").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: '-90y', maxDate: '-18y'});
				
				//$("#input_debut").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: '-6m', maxDate: '+2y'});
				//$("#input_fin").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: '-6m', maxDate: '+2y'});
				//$("#input_limite").datepicker({constrainInput: true, dateFormat: 'dd/mm/yy', minDate: '-6m', maxDate: '+2y'});
        
        // Facebox        
        $('a[rel*=facebox]').facebox();
        
        // Colorpicker        
        $('#backgroundpicker').ColorPicker({onSubmit:function(hsb, hex, rgb, el){$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);},onBeforeShow:function(){$(this).ColorPickerSetColor(this.value);}});
        $('#mefblocinfos_un_picker').ColorPicker({ onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);},	onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});        
        $('#mefbloccontenus_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefcellules_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefidentite_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefidentite_trois_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefactivite_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#meftitres_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#meftitres_trois_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefsoustitres_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefsoustitres_trois_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefliens_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#mefmenu_trois_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#meftexte_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        $('#meftextesecondaire_un_picker').ColorPicker({onSubmit: function(hsb, hex, rgb, el) {$(el).val(hex);$(el).ColorPickerHide();$(el).css("background-color","#"+hex);}, onBeforeShow: function () {$(this).ColorPickerSetColor(this.value);}});
        
        // Range Slider
        $( "#PP_mefblocinfos_deux_slider" ).slider({value:$("#PP_mefblocinfos_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_mefblocinfos_deux").val(ui.value);}});
    		$("#PP_mefblocinfos_deux").val($("#PP_mefblocinfos_deux_slider").slider("value"));
    		$( "#PP_mefbloccontenus_deux_slider" ).slider({value:$("#PP_mefbloccontenus_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_mefbloccontenus_deux").val(ui.value);}});
    		$("#PP_mefbloccontenus_deux").val($("#PP_mefbloccontenus_deux_slider").slider("value"));
    		$( "#PP_cellules_deux_slider" ).slider({value:$("#PP_cellules_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_cellules_deux").val(ui.value);}});
    		$("#PP_cellules_deux").val($("#PP_cellules_deux_slider").slider("value"));
    		$( "#PP_mefidentite_deux_slider" ).slider({value:$("#PP_mefidentite_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_mefidentite_deux").val(ui.value);}});
    		$("#PP_mefidentite_deux").val($("#PP_mefidentite_deux_slider").slider("value"));
    		$( "#PP_mefidentite_cinq_slider" ).slider({value:$("#PP_mefidentite_cinq").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_mefidentite_cinq").val(ui.value);}});
    		$("#PP_mefidentite_cinq").val($("#PP_mefidentite_cinq_slider").slider("value"));
    		$( "#PP_mefactivite_trois_slider" ).slider({value:$("#PP_mefactivite_trois").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_mefactivite_trois").val(ui.value);}});
    		$("#PP_mefactivite_trois").val($("#PP_mefactivite_trois_slider").slider("value"));
    		$( "#PP_meftitres_deux_slider" ).slider({value:$("#PP_meftitres_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_meftitres_deux").val(ui.value);}});
    		$("#PP_meftitres_deux").val($("#PP_meftitres_deux_slider").slider("value"));
    		$( "#PP_meftitres_cinq_slider" ).slider({value:$("#PP_meftitres_cinq").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_meftitres_cinq").val(ui.value);}});
    		$("#PP_meftitres_cinq").val($("#PP_meftitres_cinq_slider").slider("value"));
    		$( "#PP_mefsoustitres_deux_slider" ).slider({value:$("#PP_mefsoustitres_deux").val(),min: 0,max: 10,step: 1,slide: function(event,ui){$("#PP_mefsoustitres_deux").val(ui.value);}});
    		$("#PP_mefsoustitres_deux").val($("#PP_mefsoustitres_deux_slider").slider("value"));
    		$( "#PP_mefsoustitres_cinq_slider" ).slider({value:$("#PP_mefsoustitres_cinq").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_mefsoustitres_cinq").val(ui.value);}});
    		$("#PP_mefsoustitres_cinq").val($("#PP_mefsoustitres_cinq_slider").slider("value"));
    		$( "#PP_mefliens_trois_slider" ).slider({value:$("#PP_mefliens_trois").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_mefliens_trois").val(ui.value);}});
    		$("#PP_mefliens_trois").val($("#PP_mefliens_trois_slider").slider("value"));
    		$( "#PP_mefmenu_cinq_slider" ).slider({value:$("#PP_mefmenu_cinq").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_mefmenu_cinq").val(ui.value);}});
    		$("#PP_mefmenu_cinq").val($("#PP_mefmenu_cinq_slider").slider("value"));
    		$( "#PP_meftexte_trois_slider" ).slider({value:$("#PP_meftexte_trois").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_meftexte_trois").val(ui.value);}});
    		$("#PP_meftexte_trois").val($("#PP_meftexte_trois_slider").slider("value"));
    		$( "#PP_meftextesecondaire_trois_slider" ).slider({value:$("#PP_meftextesecondaire_trois").val(),min: 8,max: 42,step: 1,slide: function(event,ui){$("#PP_meftextesecondaire_trois").val(ui.value);}});
    		$("#PP_meftextesecondaire_trois").val($("#PP_meftextesecondaire_trois_slider").slider("value"));
        
        
        
        //$( "#onglet_personnaliser" ).draggable();
        
        // Jcrop
        function updateCoords(c) {  
          $('#x').val(c.x); 
          $('#y').val(c.y); 
          $('#w').val(c.w); 
          $('#h').val(c.h);
        }; 
        
        $('#cropbox').Jcrop({
          onChange: updateCoords, 
          onSelect: updateCoords,
          setSelect:[0,0,150,150,150,150],
          aspectRatio:1,
          minSize:[100,100],
          maxSize:[500,500],
          bgOpacity:.4
        });

        // HOME
        
        var profils_positioncourante = 0;
        var profils_largeurslide = 480;
        var profils_slides = $('.slide');
        var profils_nombredeslides = profils_slides.length;
        
        $("#leftControl").click(function() {
          if (profils_positioncourante>0){          
            profils_positioncourante = profils_positioncourante - 1;
            $("#slideInner").animate({"margin-left": profils_largeurslide*(-profils_positioncourante)},"slow");
          }
        });
        
        $("#rightControl").click(function() {          
          if (profils_positioncourante<2){
            profils_positioncourante = profils_positioncourante + 1;          
            $("#slideInner").animate({"margin-left": profils_largeurslide*(-profils_positioncourante)},"slow");
          }
        });
        
        $("#show_homeimage").click(function () {
          $("#home_musique").hide("fast");
          $("#home_video").hide("fast");
          $("#home_image").show("slow");
        });
        $("#show_homemusique").click(function () {
          $("#home_image").hide("fast");
          $("#home_video").hide("fast");
          $("#home_musique").show("slow");
        });
        $("#show_homevideo").click(function () {
          $("#home_image").hide("fast");
          $("#home_musique").hide("fast");
          $("#home_video").show("slow");
        });
        
        $('#homenews').hover(function(){ $('#divnews').animate({'height':'30px'}); });
        $('#homenews').mouseleave(function(){ $('#divnews').animate({'height':'0px'}); });
        
        $('#homeprofil').hover(function(){ $('#divprofil').animate({'height':'30px'}); });
        $('#homeprofil').mouseleave(function(){ $('#divprofil').animate({'height':'0px'}); });
        
        $('#homevideo').hover(function(){ $('#divvideo').animate({'height':'30px','display':'block'}); });
        $('#homevideo').mouseleave(function(){ $('#divvideo').animate({'height':'0px','display':'none'}); });
        
        // TOUR
        
        var tour_positioncourante = 0;
        var tour_largeurslide = 950;
        var tour_slides = $('.tourslide');
        var tour_nombredeslides = tour_slides.length;
        
        $("#tourleftControl").click(function() {
          if (tour_positioncourante>0){          
            tour_positioncourante = tour_positioncourante - 1;
            $("#tourslideInner").animate({"margin-left": tour_largeurslide*(-tour_positioncourante)},"slow");
          }
        });
        
        $("#tourrightControl").click(function() {          
          if (tour_positioncourante<2){
            tour_positioncourante = tour_positioncourante + 1;          
            $("#tourslideInner").animate({"margin-left": tour_largeurslide*(-tour_positioncourante)},"slow");
          }
        });
        
        // Accueil
        
        $('#accueilnews').hover(function(){ $('#divaccueilnews').animate({'height':'30px'}); });
        $('#accueilnews').mouseleave(function(){ $('#divaccueilnews').animate({'height':'0px'}); });
        
        // Médias
        
        $("#view_selvideo").click(function () {$("#selvideo").toggle();});
        $("#close_selvideo").click(function(){$("#selvideo").hide("fast");});
        
        // DBT Inscription
        
        $("#activite").focus(function () {$("#ex_activite").show("slow");});
        $("#activite").focusout(function () {$("#ex_activite").hide("fast");});        
        $("#prenom").focus(function () {$("#ex_prenom").show("slow");});        
        $("#prenom").focusout(function () {$("#ex_prenom").hide("fast");});
        $("#nom").focus(function () {$("#ex_nom").show("slow");});
        $("#nom").focusout(function () {$("#ex_nom").hide("fast");});
        $("#pseudo").focus(function () {$("#ex_pseudo").show("slow");});
        $("#pseudo").focusout(function () {$("#ex_pseudo").hide("fast");});
        $("#passe").focus(function () {$("#ex_passe").show("slow");});
        $("#passe").focusout(function () {$("#ex_passe").hide("fast");});
        $("#email").focus(function () {$("#ex_email").show("slow");});
        $("#email").focusout(function () {$("#ex_email").hide("fast");});
        $("#conditions").focus(function () {$("#ex_conditions").show("slow");});
        $("#conditions").focusout(function () {$("#ex_conditions").hide("fast");});
        
        // FIN Inscription
        
        $("#ajouter_ressource").click(function () {$("#ajout_ressource").show("slow");});
        $("#ressource_annuler").click(function () {$("#ajout_ressource").hide("fast");});
        
        $("#ajouter_reponse").click(function () {$("#reponse").show("slow");});
        $("#reponse_annuler").click(function () {$("#reponse").hide("fast");});
        
        $("#ajouter_nouveaumessage").click(function () {$("#nouveaumessage").show("slow");});
        $("#nouveaumessage_annuler").click(function () {$("#nouveaumessage").hide("fast");});
        
        $("#voir_apropos").click(function () {$("#apropos").toggle("slow");});                
        $("#apropos").focusout(function () {$("#apropos").hide("fast");});
        
        $("#suggerer_activite").click(function () {$("#suggestion_activite").show("slow");});
        $("#suggerer_annuler").click(function () {$("#suggestion_activite").hide("fast");}); 
        
        $("#afficher_contenus").click(function () {
          $("#contenus").show("slow");
          $("#avertissement").hide("fast");
        });
        
        $("#montrer_exp").click(function () {$("#show_exp").show("slow");});
        $("#montrer_apropos").click(function () {
          $("#hide_apropos").hide("slow");
          $("#show_apropos").show("slow");
        });
        
        $("#affiche_messages_discussion").click(function () {
          $("#anciens_messages_discussion").show("slow");
          $("#affiche_messages_discussion").hide("fast");
          $("#tablemessages").hide("fast");
        });
        
        $("#affiner_annuaire").click(function () {
          $("#form_affiner_annuaire").toggle("slow");
        });
        
        $("#affiner_projets").click(function () {
          $("#form_affiner_projets").toggle("slow");
        });                    
        
		// FRISE
		
		$(".frise").hover(
		function(){
          courant = this.id;
          $("#"+courant+"_pseudooff").hide();
		  $("#"+courant+"_texteoff").hide();
          $("#"+courant+"_on").show();          
        },
		function(){
          courant = this.id;
          $("#"+courant+"_pseudooff").show();
		  $("#"+courant+"_texteoff").show();
          $("#"+courant+"_on").hide();          
        }
		);
		
        // DBT Modifications
        
        $( "#sort_pages" ).sortable({
          //axis:'y'
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',
          scroll:'false',
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_pagesperso.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_pages" ).disableSelection();
    		
    		$( "#sort_sites" ).sortable({
          axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',
          scroll:'false',
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_sitesperso.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_sites" ).disableSelection();
    		
    		$( "#sort_menu" ).sortable({
          //axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',
          scroll:'false',
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_menuperso.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_menu" ).disableSelection();
        
        $( "#sort_menu, #sort_menu2" ).sortable({
    			connectWith: ".connectedSortable"
    		}).disableSelection();
    		
    		$( "#sort_experiences" ).sortable({
          axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',
          scroll:'false',
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_experiences.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_experiences" ).disableSelection();
    		
    		$( "#sort_images" ).sortable({
          //axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',       
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_images.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_images" ).disableSelection();
    		
    		$( "#sort_imagestemp" ).sortable({
          axis:'x',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',       
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_images.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_imagestemp" ).disableSelection();
        
        $( "#sort_musiques" ).sortable({
          axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',       
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_musiques.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_musiques" ).disableSelection();
    		
    		$( "#sort_videos" ).sortable({
          axis:'y',
          containment:'document',
          cursor:'move',
          delay:'200',
          items:'li',
          opacity:'0.5',
          placeholder:'placeholder',
          revert:'true',       
          zIndex:'100',
          update: function() {
            var order = $(this).sortable("serialize");
            $.post("scripts/ordre_videos.php", order, function(theResponse){$("#contentRight").html(theResponse);});
          }
        });
    		$( "#sort_videos" ).disableSelection();
        
        //
        
        $("#show_perso_url").click(function () {$("#perso_url").toggle();});
        $("#show_perso_arriereplan").click(function () {$("#perso_arriereplan").toggle();});
        $("#show_perso_disposition").click(function () {$("#perso_disposition").toggle();});
        $("#show_perso_miseenforme").click(function () {$("#perso_miseenforme").toggle();});
        $("#show_perso_pagesinternet").click(function () {$("#perso_pagesinternet").toggle();});
        $("#show_perso_navigation").click(function () {$("#perso_navigation").toggle();});
        $("#show_perso_tags").click(function () {$("#perso_tags").toggle();});
        $("#show_perso_promotion").click(function () {$("#perso_promotion").toggle();});
        
        $("#perso_mef").click(function () {
          $("#block_mef").toggle();
          $("#dialog_perso").hide();
        });
        $("#show_dialog_perso").click(function () {$("#dialog_perso").toggle();});
        
        // PLAYER IMAGE
        
        var images_positioncourante = 0;
        var images_largeurslide = 620;
        var images_imagesparslide = 10;
        var images_slides = $('.images_slide');
        var images_nombredeslides = images_slides.length;
        var images_max = Math.floor(images_nombredeslides / images_imagesparslide);
        if (images_nombredeslides == images_imagesparslide){images_max=0;}
        
        $("#images_leftControl").click(function() {
          if (images_positioncourante>0){          
            images_positioncourante = images_positioncourante - 1;
            $("#images_slideInner").animate({"margin-left": images_largeurslide*(-images_positioncourante)},"slow");
          }
        });
        
        $("#images_rightControl").click(function() {          
          if (images_positioncourante<images_max){
            images_positioncourante = images_positioncourante + 1;          
            $("#images_slideInner").animate({"margin-left": images_largeurslide*(-images_positioncourante)},"slow");
          }
        });
        
        $(".vignette").click(function(){
          images_declic = 1;
          courant = this.rel;
          $(".images_grande").hide();
          $("#images_big_"+courant).show();          
        });
        
        //
        
        // PLAYER MUSIQUE
        
        $(".musiques_playlist").click(function(){
          musiques_courant = this.rel;
          $(".musiques_player").hide();
          $("#musiques_player_"+musiques_courant).show();          
        });
        
        //
        
        // PLAYER VIDEOS
        
        var videos_positioncourante = 0;
        var videos_largeurslide = 620;
        var videos_imagesparslide = 10;
        var videos_slides = $('.videos_slide');
        var videos_nombredeslides = videos_slides.length;
        var videos_max = Math.floor(videos_nombredeslides / videos_imagesparslide);
        
        $("#videos_leftControl").click(function() {
          if (videos_positioncourante>0){          
            videos_positioncourante = videos_positioncourante - 1;
            $("#videos_slideInner").animate({"margin-left": videos_largeurslide*(-videos_positioncourante)},"slow");
          }
        });
        
        $("#videos_rightControl").click(function() {          
          if (videos_positioncourante<videos_max){
            videos_positioncourante = videos_positioncourante + 1;          
            $("#videos_slideInner").animate({"margin-left": videos_largeurslide*(-videos_positioncourante)},"slow");
          }
        });
        
        $(".videos_vignette").click(function(){
          videos_courant = this.rel;
          $(".videos_grande").hide();
          $("#videos_big_"+videos_courant).show();          
        });
        
        //
        
        $("#show_plusdedates").click(function () {
          $("#plusdedates").toggle("slow");
        });
        
        $("#mod_apropos").click(function () {
          $("#mod_apropos").hide("fast");
          $("#ed_apropos").css("display", "inline");
          $("#ed_apropos").show("slow");
          $('#input_apropos').focus();
        });
        
        $("#mod_site").click(function () {
          $("#mod_site").hide("fast");
          $("#ed_site").css("display", "inline");
          $("#ed_site").show("slow");
          $('#input_site').focus();
        });
        
        $("#mod_intitule").click(function () {
          $("#mod_intitule").hide("fast");
          $("#ed_intitule").css("display", "inline");
          $("#ed_intitule").show("slow");
          $('#input_intitule').focus();
        });
        
        $("#mod_secteur").click(function () {
          $("#mod_secteur").hide("fast");
          $("#ed_secteur").css("display", "inline");
          $("#ed_secteur").show("slow");
          $('#input_secteur').focus();
        });
        
        $("#mod_debut").click(function () {
          $("#mod_debut").hide("fast");
          $("#ed_debut").css("display", "inline");
          $("#ed_debut").show("slow");
          $('#input_debut').focus();
        });
        
        $("#mod_fin").click(function () {
          $("#mod_fin").hide("fast");
          $("#ed_fin").css("display", "inline");
          $("#ed_fin").show("slow");
          $('#input_fin').focus();
        });
        
        $("#mod_limite").click(function () {
          $("#mod_limite").hide("fast");
          $("#ed_limite").css("display", "inline");
          $("#ed_limite").show("slow");
          $('#input_limite').focus();
        });
        
        $("#mod_description").click(function () {
          $("#mod_description").hide("fast");
          $("#ed_description").css("display", "inline");
          $("#ed_description").show("slow");
          $('#input_description').focus();
        });
        
        $("#mod_lieu").click(function () {
          $("#mod_lieu").hide("fast");
          $("#ed_lieu").css("display", "inline");
          $("#ed_lieu").show("slow");
          $('#input_lieu').focus();
        });
        
        $("#mod_cp").click(function () {
          $("#mod_cp").hide("fast");
          $("#ed_cp").css("display", "inline");
          $("#ed_cp").show("slow");          
          $('#input_cp').focus();
        }); 
        
        $("#mod_ville").click(function () {
          $("#mod_ville").hide("fast");
          $("#ed_ville").css("display", "inline");
          $("#ed_ville").show("slow");          
          $('#input_ville').focus();
        });
        
        $("#mod_departement").click(function () {
          $("#mod_departement").hide("fast");
          $("#ed_departement").css("display", "inline");
          $("#ed_departement").show("slow");          
          $('#input_departement').focus();
        });
        
        $("#mod_region").click(function () {
          $("#mod_region").hide("fast");
          $("#ed_region").css("display", "inline");
          $("#ed_region").show("slow");          
          $('#input_region').focus();
        });
        
        $("#mod_pays").click(function () {
          $("#mod_pays").hide("fast");
          $("#ed_pays").css("display", "inline");
          $("#ed_pays").show("slow");          
          $('#input_pays').focus();
        });  
        
        // FIN Modifications    
        
        // TABS profil
        
        $("#toggle_block_apropos").click(function () {          
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')  
          $("#block_apropos").show("slow");          
        });
        
        $("#toggle_block_medias").click(function () {
          $("#block_apropos").hide("slow");
          $("#block_apropos").css('display','none')          
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')  
          $("#block_medias").show("slow");          
        });
        
        $("#toggle_block_collaborations").click(function () {
          $("#block_apropos").hide("slow");
          $("#block_apropos").css('display','none')
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')                
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')  
          $("#block_collaborations").show("slow");          
        });
        
        $("#toggle_block_actus").click(function () {
          $("#block_apropos").hide("slow");
          $("#block_apropos").css('display','none')                
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')          
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')  
          $("#block_actus").show("slow");
        });
        
        $("#toggle_block_reseau").click(function () {
          $("#block_apropos").hide("slow");
          $("#block_apropos").css('display','none')                
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')            
          $("#block_reseau").show("slow");         
          
        });
        
        $("#toggle_block_commentaires").click(function () {
          $("#block_apropos").hide("slow");
          $("#block_apropos").css('display','none')                
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_personnaliser").hide("slow");
          $("#block_personnaliser").css('display','none')  
          $("#block_commentaires").show("slow");          
          
        });
        
        $("#toggle_block_personnaliser").click(function () {
          $("#block_apropos").hide("slow");                
          $("#block_apropos").css('display','none')
          $("#block_medias").hide("slow");
          $("#block_medias").css('display','none')
          $("#block_collaborations").hide("slow");
          $("#block_collaborations").css('display','none')
          $("#block_actus").hide("slow");
          $("#block_actus").css('display','none')
          $("#block_reseau").hide("slow");
          $("#block_reseau").css('display','none')
          $("#block_commentaires").hide("slow");
          $("#block_commentaires").css('display','none')
          $("#block_personnaliser").show("slow");          
        });
        
        $("#languette_personnaliser").click(function () {
          var left_personnaliser = "0px";
          if ($("#onglet_personnaliser").css('left')=="0px"){left_personnaliser = "-720px";}
          $('#onglet_personnaliser').animate({'left': left_personnaliser});
        });
        
        // DBT Modifications profil
        
        $("#modp_activite").click(function () {
          $("#modp_activite").hide("fast");
          $("#edp_activite").css("display", "inline");
          $("#edp_activite").show("slow");
          $('#inputp_activite').focus();
        });
        
        $("#modp_pro").click(function () {
          $("#modp_pro").hide("fast");
          $("#edp_pro").css("display", "inline");
          $("#edp_pro").show("slow");
          $('#inputp_pro').focus();
        });
        
        $("#modp_spe").click(function () {
          $("#modp_spe").hide("fast");
          $("#edp_spe").css("display", "inline");
          $("#edp_spe").show("slow");
          $('#inputp_spe').focus();
        });
        
        $("#modp_sexe").click(function () {
          $("#modp_sexe").hide("fast");
          $("#edp_sexe").css("display", "inline");
          $("#edp_sexe").show("slow");
          $('#inputp_sexe').focus();
        });
        
        $("#modp_ville").click(function () {
          $("#modp_ville").hide("fast");
          $("#edp_ville").css("display", "inline");
          $("#edp_ville").show("slow");
          $('#inputp_ville').focus();
        });
        
        $("#modp_cp").click(function () {
          $("#modp_cp").hide("fast");
          $("#edp_cp").css("display", "inline");
          $("#edp_cp").show("slow");
          $('#inputp_cp').focus();
        });
        
        $("#modp_departement").click(function () {
          $("#modp_departement").hide("fast");
          $("#edp_departement").css("display", "inline");
          $("#edp_departement").show("slow");
          $('#inputp_departement').focus();
        });
        
        $("#modp_region").click(function () {
          $("#modp_region").hide("fast");
          $("#edp_region").css("display", "inline");
          $("#edp_region").show("slow");
          $('#inputp_region').focus();
        });
        
        $("#modp_pays").click(function () {
          $("#modp_pays").hide("fast");
          $("#edp_pays").css("display", "inline");
          $("#edp_pays").show("slow");
          $('#inputp_pays').focus();
        });
        
        $("#modp_site").click(function () {
          $("#modp_site").hide("fast");
          $("#edp_site").css("display", "inline");
          $("#edp_site").show("slow");
          $('#inputp_site').focus();
        });
        
        $("#modp_apropos").click(function () {
          $("#modp_apropos").hide("fast");
          $("#edp_apropos").css("display", "inline");
          $("#edp_apropos").show("slow");
          $('#inputp_apropos').focus();
        });
        
        $("#modp_influences").click(function () {
          $("#modp_influences").hide("fast");
          $("#edp_influences").css("display", "inline");
          $("#edp_influences").show("slow");
          $('#inputp_influences').focus();
        });
        
        $("#modp_image").click(function () {
          $("#modp_image").hide("fast");
          $("#edp_image").css("display", "inline");
          $("#edp_image").show("slow");
          $('#inputp_image').focus();
        });
        
        $("#ajouter_experience").click(function () {$("#ajout_experience").show("slow");});
        $("#experience_annuler").click(function () {$("#ajout_experience").hide("fast");});
        
        $("#ajouter_image").click(function () {$("#ajout_image").show("slow");});
        $("#image_annuler").click(function () {$("#ajout_image").hide("fast");});
        
        $("#organiser_images").click(function () {
          $("#images_container").toggle();
          $("#organisation_images").toggle();
          if ($("#organisation_images").css("display")=="block"){
            $("#organiser_images").text("Revenir au diaporama");
          }
          else{$("#organiser_images").text("Organiser les images");}                                               
        });
        
        $("#ajouter_video").click(function () {$("#ajout_video").show("slow");});
        $("#video_annuler").click(function () {$("#ajout_video").hide("fast");});
        
        $("#organiser_videos").click(function () {
          $("#videos_container").toggle();
          $("#organisation_videos").toggle();
          if ($("#organisation_videos").css("display")=="block"){
            $("#organiser_videos").text("Revenir au diaporama");
          }
          else{$("#organiser_videos").text("Organiser les vidéos");}                                               
        });
        
        $("#ajouter_musique").click(function () {$("#ajout_musique").show("slow");});
        $("#musique_annuler").click(function () {$("#ajout_musique").hide("fast");});
        
        // FIN Modifications profil 
        
        // DBT Modifications collaboration
        
        $("#mod_avisporteur").click(function () {
          $("#mod_avisporteur").hide("fast");
          $("#ed_avisporteur").css("display", "inline");
          $("#ed_avisporteur").show("slow");
          $('#input_avisporteur').focus();
        });
        
        $("#mod_avis").click(function () {
          $("#mod_avis").hide("fast");
          $("#ed_avis").css("display", "inline");
          $("#ed_avis").show("slow");
          $('#input_avis').focus();
        });
        
        $("#ajouter_commentaire").click(function () {$("#ajout_commentaire").show("slow");});
        $("#annuler_commentaire").click(function () {$("#ajout_commentaire").hide("fast");});
        
        // FIN Modifications collaboration 
            
        // DBT boutons
        
        $('#regler-ma-commande').hover(function(){$('#regler-ma-commande').attr('src', 'graph/boutons/regler-ma-commande_on.png');});
        $('#regler-ma-commande').mouseleave(function(){$('#regler-ma-commande').attr('src', 'graph/boutons/regler-ma-commande_off.png');});
        
        $('#btn_inscription').hover(function(){$('#btn_inscription').attr('src', 'graph/boutons/inscription_on.png');});
        $('#btn_inscription').mouseleave(function(){$('#btn_inscription').attr('src', 'graph/boutons/inscription_off.png');});
        
        $('#btn_inscription-inscription').hover(function(){$('#btn_inscription-inscription').attr('src', 'graph/boutons/inscription-inscription_on.png');});
        $('#btn_inscription-inscription').mouseleave(function(){$('#btn_inscription-inscription').attr('src', 'graph/boutons/inscription-inscription_off.png');});
        
        $('#btn_inscription-gratuite').hover(function(){$('#btn_inscription-gratuite').attr('src', 'graph/boutons/inscription-gratuite_on.png');});
        $('#btn_inscription-gratuite').mouseleave(function(){$('#btn_inscription-gratuite').attr('src', 'graph/boutons/inscription-gratuite_off.png');});
        
        $('#btn_continuer').hover(function(){$('#btn_continuer').attr('src', 'graph/boutons/continuer_on.png');});
        $('#btn_continuer').mouseleave(function(){$('#btn_continuer').attr('src', 'graph/boutons/continuer_off.png');});
        
        $('#btn_connexion').hover(function(){$('#btn_connexion').attr('src', 'graph/boutons/connexion_on.png');});
        $('#btn_connexion').mouseleave(function(){$('#btn_connexion').attr('src', 'graph/boutons/connexion_off.png');});
        
        $('#btn_signaler').hover(function(){$('#btn_signaler').attr('src', 'graph/boutons/signaler_on.png');});
        $('#btn_signaler').mouseleave(function(){$('#btn_signaler').attr('src', 'graph/boutons/signaler_off.png');});
        
        $('#btn_envoyer').hover(function(){$('#btn_envoyer').attr('src', 'graph/boutons/envoyer_on.png');});
        $('#btn_envoyer').mouseleave(function(){$('#btn_envoyer').attr('src', 'graph/boutons/envoyer_off.png');});
        
        $('#btn_annuler').hover(function(){$('#btn_annuler').attr('src', 'graph/boutons/annuler_on.png');});
        $('#btn_annuler').mouseleave(function(){$('#btn_annuler').attr('src', 'graph/boutons/annuler_off.png');});
        
        $('#btn_postuler').hover(function(){$('#btn_postuler').attr('src', 'graph/boutons/postuler_on.png');});
        $('#btn_postuler').mouseleave(function(){$('#btn_postuler').attr('src', 'graph/boutons/postuler_off.png');});
        
        $('#btn_accepter').hover(function(){$('#btn_accepter').attr('src', 'graph/boutons/btn_accepter_on.png');});
        $('#btn_accepter').mouseleave(function(){$('#btn_accepter').attr('src', 'graph/boutons/btn_accepter_off.png');});
        
        $('#publier-ce-projet').hover(function(){$('#publier-ce-projet').attr('src', 'graph/boutons/publier-ce-projet_on.png');});
        $('#publier-ce-projet').mouseleave(function(){$('#publier-ce-projet').attr('src', 'graph/boutons/publier-ce-projet_off.png');});
        
        $('#publier-un-projet-bleu').hover(function(){$('#publier-un-projet-bleu').attr('src', 'graph/boutons/publier-un-projet-bleu_on.png');});
        $('#publier-un-projet-bleu').mouseleave(function(){$('#publier-un-projet-bleu').attr('src', 'graph/boutons/publier-un-projet-bleu_off.png');});
        
        $('#publier-un-projet').hover(function(){$('#publier-un-projet').attr('src', 'graph/boutons/publier-un-projet_on.png');});
        $('#publier-un-projet').mouseleave(function(){$('#publier-un-projet').attr('src', 'graph/boutons/publier-un-projet_off.png');});
        
        $('#publier-une-offre').hover(function(){$('#publier-une-offre').attr('src', 'graph/boutons/publier-une-offre_on.png');});
        $('#publier-une-offre').mouseleave(function(){$('#publier-une-offre').attr('src', 'graph/boutons/publier-une-offre_off.png');});
        
        $('#publier-cette-offre').hover(function(){$('#publier-cette-offre').attr('src', 'graph/boutons/publier-cette-offre_on.png');});
        $('#publier-cette-offre').mouseleave(function(){$('#publier-cette-offre').attr('src', 'graph/boutons/publier-cette-offre_off.png');});
        
        $('#postuler').hover(function(){$('#postuler').attr('src', 'graph/boutons/postuler_on.png');});
        $('#postuler').mouseleave(function(){$('#postuler').attr('src', 'graph/boutons/postuler_off.png');});
        
        $('#ajouter-cette-recherche').hover(function(){$('#ajouter-cette-recherche').attr('src', 'graph/boutons/ajouter-cette-recherche_on.png');});
        $('#ajouter-cette-recherche').mouseleave(function(){$('#ajouter-cette-recherche').attr('src', 'graph/boutons/ajouter-cette-recherche_off.png');});
        
        $('#ajouter-cette-experience').hover(function(){$('#ajouter-cette-experience').attr('src', 'graph/boutons/ajouter-cette-experience_on.png');});
        $('#ajouter-cette-experience').mouseleave(function(){$('#ajouter-cette-experience').attr('src', 'graph/boutons/ajouter-cette-experience_off.png');});
        
        $('#ressource_annuler').hover(function(){$('#ressource_annuler').attr('src', 'graph/boutons/annuler_on.png');});
        $('#ressource_annuler').mouseleave(function(){$('#ressource_annuler').attr('src', 'graph/boutons/annuler_off.png');});
        
        $('#recommander').hover(function(){$('#recommander').attr('src', 'graph/boutons/recommander_on.png');});
        $('#recommander').mouseleave(function(){$('#recommander').attr('src', 'graph/boutons/recommander_off.png');});
        
        $('#partager').hover(function(){$('#partager').attr('src', 'graph/boutons/partager_on.png');});
        $('#partager').mouseleave(function(){$('#partager').attr('src', 'graph/boutons/partager_off.png');});
        
        $('#exporter').hover(function(){$('#exporter').attr('src', 'graph/boutons/exporter_on.png');});
        $('#exporter').mouseleave(function(){$('#exporter').attr('src', 'graph/boutons/exporter_off.png');});
        
        $('#supprimer').hover(function(){$('#supprimer').attr('src', 'graph/boutons/supprimer_on.png');});
        $('#supprimer').mouseleave(function(){$('#supprimer').attr('src', 'graph/boutons/supprimer_off.png');});
        
        $('#add_commentaire').hover(function(){$('#add_commentaire').attr('src', 'graph/boutons/publier-ce-commentaire_on.png');});
        $('#add_commentaire').mouseleave(function(){$('#add_commentaire').attr('src', 'graph/boutons/publier-ce-commentaire_off.png');});
        
        $('#charger_photo').hover(function(){$('#charger_photo').attr('src', 'graph/boutons/charger-cette-photo_on.png');});
        $('#charger_photo').mouseleave(function(){$('#charger_photo').attr('src', 'graph/boutons/charger-cette-photo_off.png');});
        
        $('#charger_image').hover(function(){$('#charger_image').attr('src', 'graph/boutons/charger-cette-image_on.png');});
        $('#charger_image').mouseleave(function(){$('#charger_image').attr('src', 'graph/boutons/charger-cette-image_off.png');});     
        
        $('#image_annuler').hover(function(){$('#image_annuler').attr('src', 'graph/boutons/annuler_on.png');});
        $('#image_annuler').mouseleave(function(){$('#image_annuler').attr('src', 'graph/boutons/annuler_off.png');});
        
        $('#charger_video').hover(function(){$('#charger_video').attr('src', 'graph/boutons/integrer-video_on.png');});
        $('#charger_video').mouseleave(function(){$('#charger_video').attr('src', 'graph/boutons/integrer-video_off.png');});
        
        $('#video_annuler').hover(function(){$('#video_annuler').attr('src', 'graph/boutons/annuler_on.png');});
        $('#video_annuler').mouseleave(function(){$('#video_annuler').attr('src', 'graph/boutons/annuler_off.png');});
        
        $('#copyright').click(function() {
          $("#incopyright").toggle("slow");
        });
        
        $('#maj-infos-persos').hover(function(){$('#maj-infos-persos').attr('src', 'graph/boutons/maj-infos-persos_on.png');});
        $('#maj-infos-persos').mouseleave(function(){$('#maj-infos-persos').attr('src', 'graph/boutons/maj-infos-persos_off.png');});
        
        $('#rechercher').hover(function(){$('#rechercher').attr('src', 'graph/boutons/rechercher_on.png');});
        $('#rechercher').mouseleave(function(){$('#rechercher').attr('src', 'graph/boutons/rechercher_off.png');});
        
        $('#envoyer-un-message').hover(function(){$('#envoyer-un-message').attr('src', 'graph/boutons/envoyer-un-message_on.png');});
        $('#envoyer-un-message').mouseleave(function(){$('#envoyer-un-message').attr('src', 'graph/boutons/envoyer-un-message_off.png');});
        
        $('#demande-de-collaboration').hover(function(){$('#demande-de-collaboration').attr('src', 'graph/boutons/demande-de-collaboration_on.png');});
        $('#demande-de-collaboration').mouseleave(function(){$('#demande-de-collaboration').attr('src', 'graph/boutons/demande-de-collaboration_off.png');});
        
        $('#jaime-ce-profil').hover(function(){$('#jaime-ce-profil').attr('src', 'graph/boutons/jaime_on.png');});
        $('#jaime-ce-profil').mouseleave(function(){$('#jaime-ce-profil').attr('src', 'graph/boutons/jaime_off.png');});
        
        $('#ajouter-favori').hover(function(){$('#ajouter-favori').attr('src', 'graph/boutons/favori_on.png');});
        $('#ajouter-favori').mouseleave(function(){$('#ajouter-favori').attr('src', 'graph/boutons/favori_off.png');});
        
        $('#envoyer-la-demande').hover(function(){$('#envoyer-la-demande').attr('src', 'graph/boutons/envoyer-la-demande_on.png');});
        $('#envoyer-la-demande').mouseleave(function(){$('#envoyer-la-demande').attr('src', 'graph/boutons/envoyer-la-demande_off.png');});
        
        $('#demande-de-prise-de-contact').hover(function(){$('#demande-de-prise-de-contact').attr('src', 'graph/boutons/demande-de-prise-de-contact_on.png');});
        $('#demande-de-prise-de-contact').mouseleave(function(){$('#demande-de-prise-de-contact').attr('src', 'graph/boutons/demande-de-prise-de-contact_off.png');});
        
        $('#nouveau-message').hover(function(){$('#nouveau-message').attr('src', 'graph/boutons/nouveau-message_on.png');});
        $('#nouveau-message').mouseleave(function(){$('#nouveau-message').attr('src', 'graph/boutons/nouveau-message_off.png');});
        
        $('#repondre').hover(function(){$('#repondre').attr('src', 'graph/boutons/repondre_on.png');});
        $('#repondre').mouseleave(function(){$('#repondre').attr('src', 'graph/boutons/repondre_off.png');});
        
        $('#charger_musique').hover(function(){$('#charger-musique').attr('src', 'graph/boutons/charger-cette-chanson_on.png');});
        $('#charger-musique').mouseleave(function(){$('#charger-musique').attr('src', 'graph/boutons/charger-cette-chanson_off.png');});                
        
        $('#publier').hover(function(){$('#publier').attr('src', 'graph/boutons/publier_on.png');});
        $('#publier').mouseleave(function(){$('#publier').attr('src', 'graph/boutons/publier_off.png');});
        
        $('#btn_creerpub').hover(function(){$('#btn_creerpub').attr('src', 'graph/boutons/creer-cette-publicite_on.png');});
        $('#btn_creerpub').mouseleave(function(){$('#btn_creerpub').attr('src', 'graph/boutons/creer-cette-publicite_off.png');});
        
        $('#diffuser-gratuitement').hover(function(){$('#diffuser-gratuitement').attr('src', 'graph/boutons/diffuser-gratuitement_on.png');});
        $('#diffuser-gratuitement').mouseleave(function(){$('#diffuser-gratuitement').attr('src', 'graph/boutons/diffuser-gratuitement_off.png');});
        
        $('#suivre-cette-discussion').hover(function(){$('#suivre-cette-discussion').attr('src', 'graph/boutons/suivre-cette-discussion_on.png');});
        $('#suivre-cette-discussion').mouseleave(function(){$('#suivre-cette-discussion').attr('src', 'graph/boutons/suivre-cette-discussion_off.png');});
        
        $('#ne-plus-suivre-cette-discussion').hover(function(){$('#ne-plus-suivre-cette-discussion').attr('src', 'graph/boutons/ne-plus-suivre-cette-discussion_on.png');});
        $('#ne-plus-suivre-cette-discussion').mouseleave(function(){$('#ne-plus-suivre-cette-discussion').attr('src', 'graph/boutons/ne-plus-suivre-cette-discussion_off.png');});
        
        $('#ajouter-un-evenement').hover(function(){$('#ajouter-un-evenement').attr('src', 'graph/boutons/ajouter-evenement_on.png');});
        $('#ajouter-un-evenement').mouseleave(function(){$('#ajouter-un-evenement').attr('src', 'graph/boutons/ajouter-evenement_off.png');});
        
        $('#publier-cet-evenement').hover(function(){$('#publier-cet-evenement').attr('src', 'graph/boutons/publier-cet-evenement_on.png');});
        $('#publier-cet-evenement').mouseleave(function(){$('#publier-cet-evenement').attr('src', 'graph/boutons/publier-cet-evenement_off.png');});
        
        $('#annuler').hover(function(){$('#annuler').attr('src', 'graph/boutons/annuler_on.png');});
        $('#annuler').mouseleave(function(){$('#annuler').attr('src', 'graph/boutons/annuler_off.png');});
        
        $('#recommander').hover(function(){$('#recommander').attr('src', 'graph/boutons/btn_explorer_on.png');});
        $('#recommander').mouseleave(function(){$('#recommander').attr('src', 'graph/boutons/btn_explorer_off.png');});
        
        // FIN boutons
        
        //        
        
        $('#lien_modifier_photo').click(function(){$('#modifier_photo').show("fast");}); 
        
        // PUBLICITE
        
        $('#quoi_profil').click(function(){ 
          $('#div_pub').hide("fast");
          $('#div_projet').hide("fast");
          $('#div_profil').show("slow"); 
        });
        
        $('#quoi_projet').click(function(){ 
          $('#div_profil').hide("fast");
          $('#div_pub').hide("fast");
          $('#div_projet').show("slow"); 
        });       
        
        $('#quoi_pub').click(function(){ 
          $('#div_profil').hide("fast");
          $('#div_projet').hide("fast");
          $('#div_pub').show("slow"); 
        });              
                
      });
      
