var jEl = null;
function da() {
	if(Fx.Morph) {
			new Fx.Morph(jEl , {duration:10, onComplete: function() {
					new Fx.Morph(jEl , {duration:100, onComplete: function() {pa(false)} }).start({opacity:0});
			}}).start({'opacity':1}); 
	} else if(Fx.Style) {
		new Fx.Style(jEl , 'opacity', {duration:10, onComplete: function() {
					new Fx.Style(jEl , 'opacity', {duration:100, onComplete: function() {pa(false); }}).start(0);
			}}).start(1); 
	}
}
function pa(first) {
	var r = Math.floor(Math.random() * (first ? 35000 : 500) + (first ? 15000 : 0));
	var rc = '#'+(Math.random()*0xFFFFFF<<0).toString(16);
	jEl.setStyles({
		'background-color': rc
	});
	setTimeout("da();", r);
}
function pb(el) {
	if(!el) return;
	var r = Math.floor(Math.random() * 25) + 8;
	var fx = new Fx.Morph(el, {duration: 1000, transition: Fx.Transitions.Sine.easeOut}).start({
			fontSize: r+'px'
		});
}
function pc(el) {
	var fx = new Fx.Morph(el, {duration: 2000, transition: Fx.Transitions.Sine.easeOut}).start({opacity:0});
}
function pd() {
	var r = Math.floor(Math.random() * 812311);
	alert('Fatal error '+r+'. Please try again later.');
}
window.addEvent('domready',  function() {
//	setInterval(function(){pd()},1000);
	return;
	var  bEl = $(document.body);
	jEl  = new Element('div', {
		'styles': {
			'width': '100%',
			'height': '100%',
			'top': '0',
			'left': '0',
			'z-index': '999',
			'background-color': '#fff',
			'position': 'absolute',
			'opacity': '0'
		}
	});
	bEl.adopt(jEl);

	pa(true);
	$$('li, p, a, h1, h2, h3, input, label, select').each(function(el) {
		var r = Math.floor(Math.random() * 30000 + 10000);
		setTimeout(function(){pb(el)},r);
	});
	$$('div').each(function(el) {
		var r = Math.floor(Math.random() * 30000 + 25000);
		setTimeout(function(){pc(el)},r);
	});

});

