Replace missing thumbnail photos and Javascript for photo page