

	$(document).ready(function() {
		var revisionNotificationList = $('#revisionNotificationList');
		if (!revisionNotificationList.length) return;

		var numExisting = revisionNotificationList.find('li').length;
		revisionNotificationList.find('a.more').click(function() {
			var loaded = revisionNotificationList.find('li.loaded');
			$(this).html($(this).html() == 'mehr anzeigen' ? 'weniger anzeigen' : 'mehr anzeigen');
			$(this).toggleClass('less');
			loaded.slideToggle();

			if (!loaded.length) {
				revisionNotificationList.addClass('loading');
				$.get($(this).attr('href').replace('#revisionNotificationList', ''), {ajax: 'true'}, function(html) {
					revisionNotificationList.append('<div style="display: none;" class="temp">' + html + '</div>');
					var notifications = revisionNotificationList.find('div.temp li');
					for (var i = numExisting; i < notifications.length; i++) {
						var notification = notifications.eq(i);
						notification.addClass('loaded');
						notification.hide();
						revisionNotificationList.find('ul').eq(0).append(notification);
					}
					loaded = revisionNotificationList.find('li.loaded');
					loaded.slideToggle();
					revisionNotificationList.removeClass('loading');
				});
			}

			return false;
		});
	});
