$(document).ready(function($) {

	$("body").append("<div id='opaque' style='display: none;'></div>");
	
	$(document).bind('reveal.facebox', function() {
		
		// this is a fix for IE6 which resets the height to 100% of the window height
		$("#opaque").height($(document).height());

		$("#check_readme_close").bind('change', function() {
			var type;
			if ($('#check_readme_close').is(':checked') == true ) {		
				//checkbox checked
				type = 1;	
			} 
			else {
				// unchecked
				type = 0;
			}
			
			$.post("/guide.fb.php", {set: type}, function(xml) { });
		});
	});

	var contenttext = $.ajax({
			url: rdm_locale,
    		async: false
		}).responseText;

//	$.facebox(contenttext);
	$.facebox(contenttext, '', '&nbsp;');
	$("#opaque").show();

	$(document).bind('close.facebox', function() {
		$("#opaque").hide();
	});
});