var stackPulseDuration = 5000;

function stack_pulse(target)
{
	var focus = typeof(target) == 'object' ? target.find('div.focus') : $(this).find('div.focus');

	if ( focus.css('opacity') < 0.1 )
	{
		focus.animate({opacity: 1}, {queue: false, duration: stackPulseDuration * 0.9});
	} else {
		focus.animate({opacity: 0}, {queue: false, duration: stackPulseDuration * 0.9});
	}
};

$(function() {
	var stack = $('div.stack.pulse');

	if ( stack.length )
	{
		stack_pulse(stack);

		$('div.stack.pulse').everyTime(stackPulseDuration, 'pulse', stack_pulse);
	}
});