///////////////////////////////////////// // GLOBAL VARIABLES ///////////////////////////////////////// //Set the name of the website. Include http or https var webRoot = 'https://ppatio.vertex21.com/'; var initialLoad = true; //var scrl = 0; //window.scrl = scrl;//store scroll length on mouse wheel //capture and set section location variable var loc = 'sec1'; loc = loc.slice(-1); //grab only the number at the end window.loc = loc; //store as a global variable var activeurl = window.location.pathname;//save the current loaded page to variable //Specify how many sections the homepage has var sec = 7; var isMobile = true;//assume mobile first window.isMobile = isMobile; //store as a global variable $(document).ready(function(){ //save a js session variable for this server root path var thishost; $.get('/__config/thisHost.php', function(result){ thishost = result; }) .done(function(){ function checkHTTP(data) { var checkThisHost = data.slice(0, 4); if(checkThisHost == 'http'){ return true; }else{ return false; } } if(!checkHTTP(thishost)){ //append the http manually if querying for thisHost.php fails to echo correct response thishost = webRoot; } window.thishost = thishost; console.log('window.thishost = ' + thishost); }); });