function ricerca(id , list )
    {
        postate="ricerca=" + id;

        switch(list){
            case 'lastactive' :
               $("#caricamento12").toggle();
               $("#activePetition li").toggle();
               $.ajax({
                    type: "POST",
                    url: "/index/ajaxlastactive",
                    data: postate,
                    success: function(msg){
                        $("#listactivePetition").html(msg);
                        $("#caricamento12").toggle();
                    }
               });
               break;
            case 'topsigned' :
                $("#caricamento11").toggle();
                $("#mostSigned li").toggle();
                $.ajax({
                    type: "POST",
                    url: "/index/ajaxtopsigned",
                    data: postate,
                    success: function(msg){
                        $("#listmostSigned").html(msg);
                        $("#caricamento11").toggle();
                        }
                    });
                break;
            case 'latest' :
                $("#caricamento13").toggle();
                $("#latestPetition li").toggle();
                $.ajax({
                    type: "POST",
                    url: "/index/ajaxlastcreated",
                    data: postate,
                    success: function(msg){
                        $("#listlatestPetition").html(msg);
                        $("#caricamento13").toggle();     
                    }
                });
                break;
        }
}
//ricerca(1 , 'lastactive' );
//ricerca(1 , 'topsigned' );
//ricerca(1 , 'latest' );
