$(document).ready(function() {
	
	$('#site-body .body-sidebar ul li:first').addClass('first');
	
	if( window.location.hash )
	{
		var h = window.location.hash.substring(1);
		//alert(h);
		if( $('.song_no_'+h).get(0) )
		{
			$('.song_no_'+h).get(0).scrollIntoView(true);
		}
	}
	/**/
	$('a.fancybox').fancybox({
		callbackOnStart:function(){ $('embed, object, select').css('visibility', 'hidden'); },
		callbackOnClose:function(){ $('embed, object, select').css({ 'visibility' : 'visible' }); }
	});
	
	
	/**
	* slideshow
	*/
	/**/var nc = new Date().getTime();
	var nc = 0;
	swfobject.embedSWF(
		URL_ROOT+"/preview.swf?nc="+nc, 
		'body_main_splash', 
		510, 
		255, 
		"9.0.124", 
		URL_ROOT+"/javascript/expressInstall.swf", 
		{ componentWidth:510, componentHeight:255, pathToFiles:URL_ROOT+"/slideshow/", xmlPath:"slideshow.xml" }, 
		{ bgcolor:'#FFFFFF', wmode:'transparent' }
	);

	/**
	* udio player
	*/
	/**/AudioPlayer.setup( URL_ROOT+"/player.swf", { width: 228, transparentpagebg: "yes", autostart: "no" });  
	AudioPlayer.embed( "body_sidebar_audioplayer", { soundFile: URL_ROOT+"/mp3/02_Velica.mp3", titles: "Velica", animation: "no" });
	
	$('a.audioplayer').each(function(){
		var options = { soundFile: $(this).attr('href'), titles: $(this).html(), animation: "yes" };
		if( $(this).hasClass('size_s') ) options.width = 170;
		AudioPlayer.embed( this.id, options );
	});
	
});
