if($.cookie('sessionIP') === null) { //no cookie, go get one //let's set some fraud detection cookies var ip = "3.129.42.233"; $.cookie('sessionIP', ip, {path:'/', domain: '.uscargocontrol.com'}); } if($.cookie('sessionID') === null) { //no cookie, go get one //let's set some fraud detection cookies var id = "dfcf7bae70f8db16958a3fb338de38d4"; $.cookie('sessionID', id, {path:'/', domain: '.uscargocontrol.com'}); } if($.cookie('sessionStart') === null) { //no cookie, go get one //let's set some fraud detection cookies var time = "2024-09-14 5:46:50"; console.log(time); $.cookie('sessionStart', time, {path:'/', domain: '.uscargocontrol.com'}); } if($.cookie('cntryCodeall') === null) { //no cookie, go get one var onSuccess = function (geoipResponse) { code = geoipResponse.country.iso_code.toLowerCase(); $.cookie('cntryCode', code, {expires:366, path:'/', domain: '.uscargocontrol.com'}); $.cookie('cntryCodeall', code, {expires:366, path:'/', domain: '.uscargocontrol.com'}); }; var onError = function (error) { code = 'none'; }; geoip2.country( onSuccess, onError, { w3cGeolocationDisabled: true } ); } $(document).ready(function() { if ( $.cookie('cntryCode') == 'ca' ) { $('#canadianBanner').removeClass('display-none'); } if ( $.cookie('cntryCode') != 'us' ) { $('.USCCItemTemplate .price-now .curType').html(' USD'); $('#layout-list li.cellHead.msrp').append(' USD'); var cartTable = $('#carttableheader'); if(cartTable.length){ $('#carttableheader td div.listheadernosort:contains("Price")').append(' USD'); $('#carttableheader td div.listheadernosort:contains("Amount")').append(' USD'); } } });