/** * Contact Number Updater * Replaces elemnets within the page with the correct international phone number */ var ContactNumberUpdater = { local_assets : { 'number' : '011 44 20 7437 4370', 'country' : 'USA' }, nn : '011 44 20 7437 4370', contact_string : 'Phone free from America on 1-800-986-9403', // Contact message string contact_id : 'contact_id', // Contact ID for HTML element toll_free : '1-800-986-9403', initialise : function() // Initialise the contact element { try { var sitcount= 0; var sit = setInterval(function() { try { if ( sitcount > 5 ) clearInterval(sit); sitcount++; if ( $ ) { setTimeout( function() { $(".mobile").hide(); } , 300 ); clearInterval(sit); } } catch ( asdasdas ){} },500); } catch ( mobException1 ) { ////console.log("Hello: " + mobException1.message ) ; } if ( ContactNumberUpdater.contact_string ) { try { $("#"+ContactNumberUpdater.contact_id).html(ContactNumberUpdater.contact_string); } catch ( contactStringException ){ //console.log("Contact String: " + contactStringException.message ); } } if ( ContactNumberUpdater.local_assets.number ) { try { $("#cc_call_from_your_country").html(ContactNumberUpdater.local_assets.number); $("#cc_country_name").html(ContactNumberUpdater.local_assets.country); $(".myNumber").html(ContactNumberUpdater.local_assets.number); } catch( localAssetException ) { //console.log("Local Asset Exception: " + localAssetException.message ); } } if ( ContactNumberUpdater.toll_free > '' && ContactNumberUpdater.nn != ContactNumberUpdater.toll_free ) { try { $("#free_phone_area").show(); $("#cc_toll_free_el_one").html(ContactNumberUpdater.toll_free); $(".myNumber").html(ContactNumberUpdater.toll_free); } catch( tollFreeException ) { //console.log("Toll Free Exception: " + tollFreeException.message ) ; } } } }; try { var wait = setInterval(function(){ var continue_on = false ; try { continue_on = ($) ? true : false; } catch ( e ) {} if ( continue_on ) { clearInterval(wait); $(document).ready(function(){ ContactNumberUpdater.initialise() ; setTimeout(function(){ ContactNumberUpdater.initialise() ; }, 2000); }); } },50); } catch ( genericContactException ) { //console.log("Error: Unable to process contact number: " + genericContactException.message ) ; }