/** system info */
(function ($, LOGA) {

/* check new version */
$(document).on('click', '.check_new_version', function() {
	$('#check_result').html(LOGA.L('CHECKING'));
	$.getJSON(GV.URL.CHECK_NEW_VERSION, function(result) {
		if(0 == result.data) {
			$('#check_result').html(LOGA.L('CHECK_FAILED'));
		}
		else if(2 == result.data) {
			$('#check_result').html(LOGA.L('THIS_VERSION_IS_LATEST'));
		}
		else {
			var newVersion = result.info;
			$('#check_result').html('');
			$.FEA.dialog({
				title: LOGA.L('NEW_VERSION'),
				content: '<a href="' + GV.URL.SOFT_AUTHOR_URL + '" target="_blank">' + LOGA.L('NEW_VERSION') + ': ' + newVersion + '</a>',
				padding: '10px 5px',
				id: 'OM'
			}).showModal();
		}
	});
});

})(jQuery, LOGA);
