$(document).ready(function() {
	$("#userbar .reiter").mousedown(function () {
		$("#userbar .reiter").each(function (i, item) {
			if ($(this).hasClass("activeReiter")) { 
				$(this).removeClass("activeReiter").css('background-position','0 -60px');
			} 
		});
		$(this).css('background-position','0 -30px').addClass('activeReiter');
	});
	$("#userbar .reiter").mouseover(function(){
		if (!$(this).hasClass('activeReiter')) {
			$(this).css('background-position','0 0');
		}
		$(this).css('cursor','pointer');
	});
	$("#userbar .reiter").mouseout(function(){
		if (!$(this).hasClass('activeReiter')) {
			$(this).css('background-position','0 -60px');
		}
	});
	$("#userbar .reiter").click(function () {
		var content = $(this).attr('id');
		var text = $(this).attr('rel');
		var url = 'http://www.bodyvoten.de/html/ajax/'+content+'/getlist_orla_dd_5.html';
		$.ajaxSetup ({ cache: false}); 
		$("#userReiterMiddle").animate({ opacity: 0.0 }, "fast" ).load(url, function() {
			$("#userReiterMiddle").animate({ opacity: 1.0 }, "slow" );
		});
		$("#morelink").html('<a href="'+content+'.html">Alle '+text+' anzeigen</a>');
	});
});