$(document).ready(function(){ 
	


	// When the user clicks the button, open the modal 
	$( '.button-tos, #button-right').click(function() {

		var text_tos = $(this).text().toLowerCase() + '.html';
		console.log(text_tos);

  		$('#myModal').css('display', 'block');
  		$('html, body').css('position', 'fixed');
  		$('.tof').addClass('tofhide');

  		});

	$('.close').click(function() {

		$('#myModal').css('display', 'none');
		$('html, body').css("position", "relative");
		$('.tof').removeClass('tofhide')
		window.location.replace("index.html#contents");
		return false;


		});

	


	// When the user clicks right menu, open the modal 
	$('.button-ht, #t_button-right').click(function() {
		var text_treaty = $(this).text().toLowerCase().replace(/\s/g, "-") + '.html';
		console.log(text_treaty);

  		$('#t_myModal').css('display', 'block');
  		$('html, body').css('position', 'fixed');

		});

	$('.t_close').click(function() {
		$('#t_myModal').css('display', 'none');
		$('html, body').css("position", "relative");
		window.location.replace("index.html#contents");
		return false;

		treaty_iframe.src = treaty_iframe.src;

	});







})





