var timer = ''; 
var count = '';
var delay = 10000;
var pos = '';

$(document).ready(function() {
	
	count = $('.profile').length;
	timer = setTimeout("change()", delay);
});

function change() {

	
	$(".profile:eq(0)").fadeOut(1500, function() {
		$(this).css('z-index', 10001);
		$(".profile:not(:eq(0))").each(function() {
			$(this).css('z-index', parseInt($(this).css('z-index')) + 1);
		});
		
		$("#profiles").append($(this).clone());
		$(this).remove();
				
		$(".profile").css('display', 'block');
	});	
	
	timer = setTimeout("change()", delay);
}
