updated js for ad placement