function Theme() {
}
Theme.prototype.init = function() {
	this.themes = jQuery('body').attr('data-themes').split(',');
	this.current = null;
	/*
	for (var i in this.themes) {
		var top = new Image(); 
		top.src = '../_theme/_top/' + this.themes[i] + '.jpg';
		var bottom = new Image(); 
		top.src = '../_theme/_bot/' + this.themes[i] + '.jpg';
	}
	*/
}
Theme.prototype.selectNext = function() {
	var next = Math.floor(Math.random() * this.themes.length);
	if (next == this.current) {
		next = (next + 1) % this.themes.length;
	}
	this.current = next;
	var themes = this.themes;
	var current = this.current;
	jQuery('div.theme-top').css({
		'background': 'url(../_theme/_top/' + themes[current] + '.jpg) no-repeat center top'
	});
	jQuery('div.theme-bot').css({
		'background': 'url(../_theme/_bot/' + themes[current] + '.jpg) no-repeat center top'
	});
}

