$(document).ready(function() {
	
	$('#coverbig').show().delay(1500).fadeOut(1000);

	$('#player').bind('click', function() {
		window.open('player/index.php','player','width=375,height=367,resizable=no,menubar=no,scrollbars=no,toolbar=no,location=no,status=no');
	});
	
	$('a.fademore').bind('click', fademore);

});

function fademore() {
	var page = $(this).attr('id').slice(0, -4);
	var olddiv = $('div', $('#' + page + 'txt'));
	var p = parseInt(olddiv.attr('id').slice(page.length)) + 1;
	$.get(page + '-content.php?p=' + p, function(data) {
		var newdiv = $(data).appendTo($('#' + page + 'txt')).hide();
		olddiv.fadeOut(400, function() {
			$(this).remove();
			$('a.fademore').bind('click', {page: $(this).attr('id')}, fademore);
		});
		newdiv.fadeIn(400);
	});
	return false;
}
