changed js to detect for live site