// * fix ie bug - custom script (Author: Ryan)
function tSwapImage(obj, img) {
	var doSwap = function () {
		document.getElementById(obj).setAttribute('src', img);
    }
	setTimeout(doSwap, 100);
}
//
var theImages = new Array();
//
theImages[0] = 'images/bluetooth-fact-1.jpg';
theImages[1] = 'images/bluetooth-fact-2.jpg';
theImages[2] = 'images/bluetooth-fact-3.jpg';
theImages[3] = 'images/bluetooth-fact-4.jpg';
theImages[4] = 'images/bluetooth-fact-5.jpg';
theImages[5] = 'images/bluetooth-fact-6.jpg';
theImages[6] = 'images/bluetooth-fact-7.jpg';

var j = 0;
var p = theImages.length;
var preBuffer = new Array();
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

function rotateFact() {
	var random = Math.round(Math.random()*(p-1));
	var doSwap = function () {
		document.getElementById('fact').setAttribute('src', theImages[random]);
    }
	setTimeout(doSwap, 1);
}

//rotateFact();
