	$(document).ready(function()
		{
			// Accordion
			$(function()
				{
					$("#accordion").accordion(
						{
							autoHeight: false,
							navigation: true,
							collapsible: true,
							active: false
						});
				});

			$("#accordion h3").css({'background': '#C0C0C0'});

			$("#accordion h3 a").hover(
				function()
					{
						(this).css({'background': '#DBD0B2'});
					},
				function()
					{
						(this).css({'background': '#C0C0C0'});
					}
			)

			$('#accordion').bind('accordionchange', function(event, ui)
				{
             		if(typeof ui.newHeader != "undefined") {ui.newHeader.css({'background': '#DBD0B2'});}
					if(typeof ui.oldHeader != "undefined") {ui.oldHeader.css({'background': '#C0C0C0'});}

//					if(typeof ui.oldContent != "undefined") {ui.oldContent.css({'background': 'White'}); }
//					if(typeof ui.newContent != "undefined") {ui.newContent.css({'background': 'LightGreen'}); }
				});
			// end


			// JPlayer
			$("#jquery_jplayer_1").jPlayer(
				{
					ready: function()
						{
							$(this).jPlayer("setMedia",
								{
									mp3: "http://www.wittek.co.at/mp3/GWS_2011.mp3",
									oga: "http://www.wittek.co.at/mp3/GWS_2011.ogg"
								}).jPlayer("play");		// Autoplay
						},
					ended: function(event)
						{
							$(this).jPlayer("stop");
						},
					swfPath: "../flash",
/*					supplied: "m4a, oga"*/
					supplied: "mp3, oga"
				});
			// end



			$("#jquery_jplayer_1").bind($.jPlayer.event.play, function()
				{
/*
$.getJSON("http://jsonip.appspot.com?callback=?",
    function(data){
       alert( "Your ip: " + data.ip);
  });
*/

//  					alert(ip);
  					$.post("player_stats.php",
						{
							user_ip: ip
						});
				});


		});
