I re-wrote part of it and now have it working;
var favUrl = "favicon.ico";
var link = document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = 'http://www.mysite.com/' + favUrl;
link.id = "favico";
document.getElementsByTagName('head')[0].appendChild(link);
var flashFavIco = function() {
if(favUrl == "favicon.ico") {
favUrl = "favicon-white.ico";
} else {
favUrl = "favicon.ico";
}
$('#favico').prop('href', 'http://www.mysite.com/' + favUrl);
};
setInterval(flashFavIco, 1000);