var Quotes = Class.create();
Quotes.prototype = {
	quotes: null,
	images: null,
	
    initialized : false,
    
    initialize : function() {
        if (!this.initialized) {
			if (top.Typeroom) {
				var link = document.createElement('link');
				link.type = 'text/css';
				link.href = top.Typeroom.HOME_PAGE + 'styles/typeroom_only.css';
				link.rel = 'stylesheet';
				document.getElementsByTagName('head')[0].appendChild(link);
				console.log(link);
				return;
			}
	        this.quotes = $$('.quote p');
			this.images = $$('.ad p');
			var rand = Math.floor(Math.random() * this.quotes.length);
			this.quotes[rand].setStyle({display:'block'});
			this.images[rand].setStyle({display:'block'});			
		}
	}
};

Event.observe(window, 'load', function() {
	var quotes = new Quotes();
});
