Browser code (javascript) for video ad