Collapse of polyacrylamide gels