
$(function()
	{
	/**
	 * Click
	 */
	var counter = 0;

	/**
	 * jPlayer
	 */
	for(var i=1;i<=4;++i)
		{
		$('#jplayer_sound'+i).jPlayer(
			{
			ready: function()
				{
				$(this).jPlayer('setMedia', {mp3: './media/file.mp3'});
				},

			play: function()
				{
				$(this).jPlayer('pauseOthers');
				},

			swfPath: '../../styles/flash',
			supplied: 'mp3'
			});
		}

	$('#jplayer_sound1').on($.jPlayer.event.ready,function()
		{
		$('#jplayer_sound1').jPlayer('setMedia', {mp3: './media/wiatr.mp3'});
		});

	$('#jplayer_sound2').on($.jPlayer.event.ready,function()
		{
		$('#jplayer_sound2').jPlayer('setMedia', {mp3: './media/gawron.mp3'});
		});

	$('#jplayer_sound3').on($.jPlayer.event.ready,function()
		{
		$('#jplayer_sound3').jPlayer('setMedia', {mp3: './media/rain.mp3'});
		});

	$('#jplayer_sound4').on($.jPlayer.event.ready,function()
		{
		$('#jplayer_sound4').jPlayer('setMedia', {mp3: './media/leafs.mp3'});
		});


	/**
	 * Click
	 */
	$('.images > *').click(function()
		{
		$('#jplayer_sound'+$(this).data('element')).jPlayer('play');
		});


	});
