enforced ssl with Javascript and removed document.write with jquery