[New site integration - Refactor Javascript][Daniel]