$( function () {

	$('.custompoints').editInPlace({
		url: 'index.php',
		params: 'ajax=on&t=custompoints'
	});

	$('#deleteSchedule').click ( function () {
		var data = $(this).metadata();
		var scheduleID = data.scheduleID; 
		var URL = 'index.php?p=games&f=games&a=deleteschedule&delSched='+scheduleID;
		self.location.href = URL;
		return true;
	});

	$('#deleteSchedule').confirm({
		dialogShow: 'fadeIn',
		dialogSpeed: 'slow',
		wrapper: '<div class="confirm"></div>',
		msg: 'Are you sure you want to <strong>permanently</strong> delete all games, results, and player statistics in this schedule?  You can automatically archive and preserve old data by starting a new season in @settings->\'Seasons\'. This will provide you with a clean slate for the new season, without losing your past season data.<br />',
		buttons: {
			ok: 'Yes - Delete Everything',
			cancel: 'No - Cancel This Action',
			separator: ' ',
			wrapper: '<button></button>'
		}
	});


});
