var MicroNews = {

	init: function (options) {
		// init default options
		this.options = Object.extend({
			animateContent: false	// Enable/Disable content animation
		}, options || {});
		
		this.anchors = [];
		this.fx = [];
		$A($$('a')).each(function(el){
			if(el.rel && el.rel.test('^micronews', 'i')) {
				el.onclick = this.click.pass(el, this);
				this.anchors.push(el);
				this.mid = el.rel.match(/[0-9]+/g);
				this.id = this.mid[0];
				this.fx[this.id] = new Fx.Slide('mnews'+this.id);
				this.fx[this.id].hide();
			}
        		}, this);
	},

	click: function(link) {
     		return this.open (link.rel);

	},
	
	open: function(sLinkRel) {
		this.rel = sLinkRel;
		var id = this.rel.match(/[0-9]+/g);
		this.fx[id].toggle();
		return false;
	}


};


window.addEvent('domready', MicroNews.init.bind(MicroNews));

