(function(){
  // if firefox 3.5+, hide content till load (or 3 seconds) to prevent FOUT
  var d = document, e = d.documentElement, s = d.createElement('style');
  if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
    s.textContent = 'body{visibility:hidden}';
    e.firstChild.appendChild(s);
    function f(){ s.parentNode && s.parentNode.removeChild(s); }
    addEventListener('load',f,false);
    setTimeout(f,3000); 
  }
})();


window.addEvent("domready", function () {
	
	var el = $$('body'),
		color = new Color(el[0].getStyle('background-color')).hsb,
		counter = 0,
		hue;
	
	var changeColor = function() {
		color[0] = color[0] + 0.1;
		if (color[0] > 360) color[0] = 0;
		
		el[0].setStyle('background-color', color.hsbToRgb());
	};

	changeColor.periodical(10);
	
});
