var myrules = {
	'#homepage-downloads a#tab-latest-reviews' : function(el){
		el.onclick = function(){
			new Ajax.Updater('latest-reviews', '/includes/latest-reviews/', {
				asynchronous:true, 
				evalScripts:true, 
				onComplete:function(request, json){
					Element.hide('loading-latest-reviews')
				}, 
				onLoading:function(request, json){
					Element.show('loading-latest-reviews')
				}
			}); 
		return false;
		}
	},
	'#homepage-downloads a#tab-most-viewed' : function(el){
		el.onclick = function(){
			new Ajax.Updater('most-viewed', '/includes/most-viewed/', {
				asynchronous:true, 
				evalScripts:false,
				onComplete:function(request, json){
					Element.hide('loading-highest-rating'),
					Behaviour.apply();
				}, 
				onLoading:function(request, json){
					Element.show('loading-highest-rating')
				}
			}); 
		return false;
		}

	},
	'#homepage-downloads a#tab-highest-rated' : function(el){
		el.onclick = function(){
			new Ajax.Updater('highest-rated', '/includes/highest-rating/', {
				asynchronous:true, 
				evalScripts:false,
				onComplete:function(request, json){
					Element.hide('loading-most-viewed'),
					Behaviour.apply();
				}, 
				onLoading:function(request, json){
					Element.show('loading-most-viewed')
				}
			}); 
		return false;
		}

	}	
};

Behaviour.register(myrules);













