Monhyip.Hyip.list = {
	favoriteLinkSelector : 'a.favorithyip',
	favoriteLinkContentSelector : 'div.favorits',

	plusClass : 'plus',
	minusClass : 'minus',
	
	initFavoritLink : function() {	
		context = Monhyip.Hyip.list;

		var links = $$(context.favoriteLinkSelector);

		links.each(function(el) {
			el.observe('click', function favoritAjaxReq(ev) {				
				ev.stop();
				href = el.href;
				
				new Ajax.Request(href, {
					onSuccess : function() {
						tDiv = el.down(context.favoriteLinkContentSelector);						
						if (tDiv) {
							tDiv.toggleClassName(context.plusClass);
							tDiv.toggleClassName(context.minusClass);
						}
					}
				});
			});

		});
	},	
	init: function(){
		Monhyip.Hyip.list.initFavoritLink();
	}
}

document.observe("dom:loaded", Monhyip.Hyip.list.init);
