function showMoreSites(url){  
	var taburl=url.split("&page=");
  	$("a#link-more"+taburl[1]).empty().append('<img src="/themes/vertciel/img/loader.gif" id="loader'+taburl[1]+'" />'); 
  	$("#loader"+taburl[1]).fadeIn('slow');   
	$("div#more"+taburl[1]).load(url,'',hideLoader());
   	function hideLoader() {   
        $("#loader"+taburl[1]).fadeOut('slow');   
    } 
 } 


function voteSite(idSite){  	  
 //affiche éclair
$("span#votes-count"+idSite).fadeOut("fast");   
 $("div#carre-vote"+idSite).css('backgroundImage',"url('/themes/vertciel/img/vote-eclair.png')"); 
 //the main ajax request   
  $.ajax({   
   type: "POST",   
   data: "site_id="+idSite,   
   url: "/ajaxphp/site-vote-ajouter.php",   
   success: function(msg)   
   {   	 
    $("span#votes-count"+idSite).html(msg);  
    $("div#carre-vote"+idSite).css('backgroundImage',"none"); 
    //affiche le nouveau compte 
     $("span#votes-count"+idSite).animate( { fontSize:"0em" }, 50 )
    .fadeIn("slow")
	.animate( { fontSize:"1.6em" }, 150 );      
   }   
  }); 
}

$(document).ready(function () { 
		
  	$("#load-rss-explications").click(function() {	
  	$('#load-rss-explications').empty().append('&nbsp;&nbsp;<span id="loader-rss">&nbsp;&nbsp;&nbsp;&nbsp;</span>');   
  	$('#loader-rss').fadeIn('normal');
  	$('#rss-explications').load(this.href,'',hideLoader());
	function hideLoader() {   
        $('#loader-rss').fadeOut('normal');  
    } 
    return false;
  });

  
  $("#load-tagcloud").click(function() {	
  	$('#load-tagcloud').empty().append('&nbsp;&nbsp;<span id="loader-tagcloud">&nbsp;&nbsp;&nbsp;&nbsp;</span>');   
  	$('#loader-tagcloud').fadeIn('normal');
  	$('#nuage-more').load(this.href,'',hideLoader());
	function hideLoader() {   
        $('#loader-tagcloud').fadeOut('normal');   
    } 
    return false;
  });
  
  
  $("a.clic-up").click(function(){  	  
 //récupère id  
 the_id = $(this).attr('id');  
 //efface le compte actuel    
 $("span#clics-count"+the_id).hide();   
 //the main ajax request   
  $.ajax({   
   type: "POST",   
   data: "site_id="+the_id,   
   url: "/ajaxphp/site-clic-ajouter.php",   
   success: function(msg)   
   {   
    $("span#clics-count"+the_id).html(msg); 
    $("span#clics-count"+the_id).show();    
   }   
  }); 
 }); 
  

 
 $("span#button-citer").click(function () {
      $("#citer-billet").slideToggle("slow");
    });
	
 
});

