function lit_cook(nom) {
      var deb,fin
      deb = document.cookie.indexOf(nom + "=")
      if (deb >= 0) {
         deb += nom.length + 1
         fin = document.cookie.indexOf(";",deb)
         if (fin < 0) fin = document.cookie.length
         return unescape(document.cookie.substring(deb,fin))
         }
      return ""
}


$( document ).ready( function() {
	$("a").each( function() {
			var h = window.location.host;
			var l = $(this).attr("href");
			if((l.lastIndexOf(h)==-1)&&(l.substring(0,1) != "/")){
				$(this).mousedown( function() {
					var id_from = lit_cook ("id_from");
					$.ajax({url:"includes/ajx_updt.php",type:"GET",data:"id_from="+id_from+"&id_site="+$(this).attr("rel")});
				});
		}
	} );
} );

