changing javascript to manage to video on same page