Array.prototype.in_array = function(p_val)
{
	for (var i = 0, l = this.length; i < l; i++)
	{
		if (this[i] == p_val)
		{
			return true;
		}
	}

	return false;
}

var player_path = [];

$(document).ready(
	function()
	{
		function playerEmbed(path, start, id)
		{
			AudioPlayer.embed(
				"player" + id,
				{
					soundFile: path,
					autostart: start
				}
			);
		}

		var cnt_elems = player_path.length;

		for (var i = 0; i < cnt_elems; i++)
		{
			playerEmbed(player_path[i], 'no', i);
		}

		var tmp_src;

		$('.top-menu a img').hover(
			function()
			{
				tmp_src = $(this).attr('src');
				$(this).attr('src', $(this).attr('src').replace(/\./, "_a."));
			},
			function()
			{
				$(this).attr('src', tmp_src);
			}
		);

//		$('.info-title').click(
//			function()
//			{
//				$(this).parent().children('.info-text').slideToggle("slow");
//			}
//		);
//
//		$('.info-image').click(
//			function()
//			{
//				$(this).parent().children('.info-content').children('.info-text').slideToggle("slow");
//			}
//		);

		$('.video-block h3').click(
			function()
			{
				$(this).parent().children('.video-container').slideToggle("slow");
			}
		);

		$('.photo-block a').fancybox({
			'titlePosition': 	'over',
			'transitionIn': 	'elastic',
			'transitionOut': 	'elastic',
			'easingIn': 		'easeOutBack',
			'easingOut': 		'easeInBack'
		});
	}
);


