picture javascript works on show