var _oldColor = "";

function confirmAction(message, url) {
	if(confirm(message)) {
		document.location.href = url;
	}
}

$(document).ready(function() {
	$(".animate").fadeOut('fast');
	$(".animate").fadeIn('fast');
	$(".animate").fadeOut('fast');
	$(".animate").fadeIn('fast');
	$(".animate").fadeOut('fast');
	$(".animate").fadeIn('fast');
	$(".animate").fadeOut('slow');
	$(".animate").fadeIn('slow');
	
	$(".hoverrow").mouseover(function() {
		_oldColor = $(this).css('backgroundColor');		
		$(this).css('backgroundColor','#ffdfac');
	});
	$(".hoverrow").mouseout(function() {
		$(this).css('backgroundColor',_oldColor);
	});
	
	$(".expand").click(function() {
		if($(this).find("div:last").css('display') == 'none') {
			$(this).find("div:first").css('display','none');
			$(this).find("div:last").fadeIn('slow');
		}
		else {
			$(this).find("div:last").css('display','none');
			$(this).find("div:first").fadeIn('slow');
		}
	});
	
	$("a[rel=details]").click(function() {
		if($(this).parents('td').find('.details').is(':visible') == true)
		{
			$(this).text('Details');
			$(this).parents('td').find('.details').hide();
		}
		else
		{
			$(this).text('Verberg');
			$(this).parents('td').find('.details').show();
		}
	});
	
	$(".details").draggable();
});
