Updating AJAX to use http protocol throughout file