fix javascript for play and pause