//audiojs.events.ready(function() {
	//audiojs.createAll();
//});

$(document).ready(function() {
	
	var w = 0;
	
	if($('#slideshow').width() > $(window).width())
	{
		w = $('#slideshow').width() - $(window).width();
		w = Math.floor(w / 2);
	}
	
	$('#slideshow').css({"margin-left" : -w});
	
	/*$('#ris_audioplayer_control').bind('click', function() {
		//$('#ris_audioplayer').pause();
		alert('pause');
	});
	*/

	/*
	$('#slideshow').cycle({
		fx: 'scrollLeft', 
		speed: 500, 
		timeout: 5000,
		//before:  onBefore,
	    delay: -1000,
		//after:  onBefore, 
		next:   '#next', 
	    prev:   '#previous'

	});
	*/
	
	
	initAudio();
	
});

function initAudio()
{
	
}

$(window).resize(function() {
	//alert('resize');
	var w = 0;
	
	if($('#slideshow').width() > $(window).width())
	{
		w = $('#slideshow').width() - $(window).width();
		w = Math.floor(w / 2);
	}
	
	$('#slideshow').css({"margin-left" : -w});
});



function onBefore()
{
	var w = 0;
	
	if($(this).width() > $(window).width())
	{
		w = $(this).width() - $(window).width();
		w = Math.floor(w / 2);
	}
	
	$(this).css({"position": "absolute", "left" : -w});
	
}
