/*
* AJAX function
* Ordina i progetti sulla base della tipologia di ordinamento scelta dall'utente
* e ricrea il podio dei progetti
*/
function ordinaProgettiAndGetPodio(comando) {
   jQuery.post("yourProjectsClassifica.plp", {comando:comando}, function(html){
	   document.getElementById('classificaProgetti').innerHTML = html;
	 }, 'html');    		            
   }

   $(document).ready(function() {
	    // hides the slickbox as soon as the DOM is ready      
    // (a little sooner than page load) 
    $('#slickbox').hide();    
    // toggles the slickbox on clicking the noted link
    $('a#slick-toggle').click(function() {
	        return slick();
	    });
   });

function slick() {
	$('#slickbox').toggle(400);

    // Gestione della freccina, aperta o chiusa a seconda del click
    var freccinaChiusa = document.getElementById('freccina_slick-toggle').value;
    if (freccinaChiusa == 'chiuso') {
        var v = document.getElementById('img_slick-toggle');
        v.setAttribute('src', "/regens/img/frecciaChiude.gif");
        document.getElementById('p_slick-toggle').innerHTML = "See less...";
        document.getElementById('freccina_slick-toggle').value = 'aperto';
    }
    else {
        var v1 = document.getElementById('img_slick-toggle');
        v1.setAttribute('src', "/regens/img/frecciaApre.gif");
        document.getElementById('p_slick-toggle').innerHTML = "See more...";
        document.getElementById('freccina_slick-toggle').value = 'chiuso';
    }        
    return false;   
}
