/**
 * GAY.NL
 *
 * @access  public
 */

var GAYHOME = new Class({
 	
 	mbStatsOpen : false,
 	
	initialize : function() {
		
 	},
 	
 	DOMReady : function() {
 		var o_this = this;
		// get static url
		if ($('staticURL') && $('serverURL')){
			this.s_static_url = $('staticURL').get('text').trim();
			this.s_server_url = $('serverURL').get('text').trim();
		} else {
			this.s_static_url = '';
			this.s_server_url = '';
		}
 		
 		/*
 		 *	Swiffs
 		 */	
		/*
		var o_nieuws = new Swiff(this.s_static_url + '/assets/swf/overview.swf',{
			id:'newsSWF',
			container:$('newsSWFContainer'),
			width:264,
			height:200,
			vars: {url: this.s_server_url + 'xml/articles/news.xml?'+Math.random()},
			properties: {name:'newsSWF'}
		});
		*/
		
		/*
		var o_stijl = new Swiff(this.s_static_url + '/assets/swf/overview.swf',{
			id:'etainSWF',
			container:$('etainSWFContainer'),
			width:264,
			height:200,
			vars: {url:this.s_server_url + 'xml/articles/entertainment.xml?'+Math.random()},
			properties: {name:'etainSWF'}
		});
		*/
		
		// init news tickers
		(new Ticker('newsTicker', '/json/articles/news.json'));
		(new Ticker('entertainmentTicker', '/json/articles/entertainment.json'));
		
		// showcases
		var a_showcases = $H({});
		$$('div.showCase').each(function(oEl){
			a_showcases.extend(new ShowCase(oEl, oEl.getChildren('div.showCaseBig')[0], 'showCaseSmall', {
				'search': /small\.jpg$/,
				'replace': 'normal.jpg'
			}));
		});
 	}
});


/**
 * Create new class instance
 */
var moGAYHOME = new GAYHOME();

/**
 * DOM Ready callback
 *
 * @access  public
 * @param   event
 * @return  void
 */
window.addEvent('domready', function(oEvent) {
	moGAYHOME.DOMReady();
});
