/* begin phone test */
(function(){
    // search for test cookie
    var cta_phonetest_path = document.cookie.match(/(?:;\s*)?cta_phone_num=(0|1)/);
    // if exists, grab matched value
    if(cta_phonetest_path) {
        cta_phonetest_path = cta_phonetest_path[1];
    }
    // else generate test value and write cookie
    else {
        cta_phonetest_path = Math.floor(Math.random()*2.5); // 40%
        document.cookie = 'cta_phone_num=' + cta_phonetest_path;
    }

    // Trigger test
    if(cta_phonetest_path == 0) {
        try {
            var phone_num = document.getElementById('tagline').getElementsByTagName('h3')[0];
            phone_num.innerHTML = phone_num.innerHTML.replace('1-866-505-1765', '1-866-505-1765');
			// first number is the one that must appear on the page wrapped in a h3 tag to be replaced by the 2nd number a percentage of the time
        } catch (ignore) {}
    }
})()
/* end phone test */
