$(document).ready(function() {
	$('.sub').click(function() {
		$('.subac').each(function() {
			$(this).attr('class','sub');
		});
		var url = $(this).attr('href');
		$('#vaip').attr('src','assets/slideshow.php?xml='+url.split('#')[1]+'.xml');
		$(this).attr('class','sub subac');
		$('.body-m-center').css('display','none');
		$('#'+url.split('#')[1]+'-center').css('display','block');
		$('.body-m-right').css('display','none');
		$('#'+url.split('#')[1]+'-right').css('display','block');
		return false;
	});
	var hash = window.location.hash.substr(1);
	var url = (window.location.hash == '' ? 'default.xml' : hash+'.xml');
	$('#vaip').attr('src','assets/slideshow.php?xml='+url);
	$('.sub').each(function() {
		if ($(this).attr('href').split('#')[1] == hash) {
			$(this).attr('class','sub subac');
			$('.body-m-center').css('display','none');
			$('#'+hash+'-center').css('display','block');
			$('.body-m-right').css('display','none');
			$('#'+hash+'-right').css('display','block');
		}
	});
});

function fxUpRh(complete,failed) {
	$('#fxUpFiles').val(complete);
	$('#fxFailFiles').val(failed);
	$('#fxUpForm').submit();
}

