

$(document).ready(function(){
$(".cat").click(function(){
var stato = $(this).next().css('display');
if (stato != 'block'){
$(this).attr('class', 'cat_h');
$(this).next().slideDown();
}
else
{
$(this).attr('class', 'cat');
$(this).next().slideUp();
}
});
$(".cat_h").click(function(){
var stato = $(this).next().css('display');
if (stato != 'block'){
$(this).attr('class', 'cat_h');
$(this).next().slideDown();
}
else
{
$(this).attr('class', 'cat');
$(this).next().slideUp();
}
});
$(".link_com").click(function(){
$(this).each(function(){
var id =$(this).prev().val();
var id_com="#com"+id;
$(id_com).fadeIn();
});
});
$(".close_com").click(function(){
var id =$(this).prev().val();
var id_com="#com"+id;
$(id_com).fadeOut();


});
});
