$(document).ready(function() {
    // do stuff when DOM is ready
    $(".buttonBlueSmall").mousedown(function(){
        // The id is something like this : form1:commandLink_bookOnline_1
        var priceId = this.id.substr(29);
        
        var hiddenPriceId = $("#form1\\:inputHidden_priceId");
        hiddenPriceId.val(priceId);
    });

   
});

