$(function()
{
$('#jplayer').on($.jPlayer.event.ended,function(event)
	{
	$('.sound').fadeIn();
	$('#jplayer_sound').jPlayer(
		{
		ready: function()
			{
			$(this).jPlayer('setMedia', {mp3: './media/my_face_piano_solo.mp3'});
			},
		swfPath: '../../styles/flash',
		supplied: 'mp3',
		cssSelectorAncestor: '#jp_container_sound'
		}).jPlayer('play');
	});

	$('#jplayer_sound').bind($.jPlayer.event.timeupdate, function(event) {
	var currentTime = event.jPlayer.status.currentTime;
	if (currentTime >= 5.5 && currentTime < 11.59721){
		$('.textBox').html('<p>One nose on my face.</p><p>Two eyes on my face.</p>');
	}
	if (currentTime >= 11.59721 && currentTime < 16.433673){
		$('.textBox').html('<p>One mouth on my face.</p><p>And two ears are here.</p>');
	}
	if (currentTime >= 16.433673 && currentTime < 22){
		$('.textBox').html('<p>One nose, two eyes, one mouth, two ears</p>');
	}
	if (currentTime >= 22 && currentTime < 27.699566){
		$('.textBox').html('<p>And a lot of hair on my head, on my head.</p>');
	}
	if (currentTime >= 27.699566 && currentTime < 32){
		$('.textBox').html('<p>...</p><p>...</p>');
	}
	if (currentTime >= 33 && currentTime < 38){
		$('.textBox').html('<p>One nose on my face.</p><p>Two eyes on my face.</p>');
	}
	if (currentTime >= 38 && currentTime < 44){
		$('.textBox').html('<p>One mouth on my face.</p><p>And two ears are here.</p>');
	}
	if (currentTime >= 44 && currentTime < 50){
		$('.textBox').html('<p>One nose, two eyes, one mouth, two ears</p>');
	}
	if (currentTime >= 50 && currentTime < 52.5){
		$('.textBox').html('<p>And a lot of hair on my head, on my head.</p>');
	}
	});

});
