$(function() {
	$('.progressMiddle').each(function() {
		width = parseInt($(this).css('width'));
		$(this).css('width', 0 + '%');
		$(this).animate({width: width + '%'}, 1000);
	});

	$('#removeFriend').click(function() {
		if (confirm('Are you sure you want to remove this friend from your friends list?')) {
			loc = document.location.href;
			if (document.location.hash)
				loc = loc.replace(document.location.hash, "");
			$.post(
				loc, 
				{deleteFriend: $(this).attr('rel')}, 
				function (result) {
					Imagini.checkResult(result);
				}, 
				'json'
			);
		}
	});

	$('#addFriend').click(function() {
		loc = document.location.href;
		if (document.location.hash)
			loc = loc.replace(document.location.hash, "");
		$.post(
			loc, 
			{addFriend: true}, 
			function (result) {
				Imagini.checkResult(result);
			}, 
			'json'
		);
	});

	$('#blockOwner').click(function() {
		loc = document.location.href;
		if (document.location.hash)
			loc = loc.replace(document.location.hash, "");
		$.post(
			loc, 
			{blockOwner: true}, 
			function (result) {
				Imagini.checkResult(result);
			}, 
			'json'
		);
	});

	$('#unblockOwner').click(function() {
		loc = document.location.href;
		if (document.location.hash)
			loc = loc.replace(document.location.hash, "");
		$.post(
			loc, 
			{unblockOwner: true}, 
			function (result) {
				Imagini.checkResult(result);
			}, 
			'json'
		);
	});

/*
	var time = 50;
	$('#quizTabsContent li a').each(function() {
		setTimeout("$('#quizTabsContent li > a." + $(this).attr('class') + "').parent().effect('pulsate', {times: 1}, 600);", time);
		time += 50;
	});
*/

});