Phase transitions in smallmetallic junctions with quasiparticle dissipation