var danweizhineng, lingdaojieshao, jigoujieshao, danwei, lingdao, jigou;

$(document).ready(function() {
	
	danweizhineng = document.getElementById("danweizhineng");
	lingdaojieshao = document.getElementById("lingdaojieshao");
	jigoujieshao = document.getElementById("jigoujieshao");
	danwei = document.getElementById("danwei");
	lingdao = document.getElementById("lingdao");
	jigou = document.getElementById("jigou");
	
	$(".changeFont a").click(function() {
		var text = $(this).html();
		if (text == "大") {
			$(".mainText").css( {
				'font-size' : 'large'
			});
		} else if (text == "小") {
			$(".mainText").css( {
				'font-size' : 'small'
			});
		} else {
			$(".mainText").css( {
				'font-size' : 'medium'
			});
		}
		return false;
	});

  var $tables = $('.mainText table');
  $tables.each(function(idnex, table) {
    var $table = $(table);
    if($table.attr('border') === '0'){
      $table.attr('border', 1);
    }
  });
});

function change(i) {
	if (i == 0) {
		danweizhineng.className = "style103gai";
		lingdaojieshao.className = "style103";
		jigoujieshao.className = "style103";

		danwei.className = "showStyle";
		lingdao.className = "hideStyle";
		jigou.className = "hideStyle";
	} else if (i == 1) {
		danweizhineng.className = "style103";
		lingdaojieshao.className = "style103gai";
		jigoujieshao.className = "style103";

		danwei.className = "hideStyle";
		lingdao.className = "showStyle";
		jigou.className = "hideStyle";
	} else if (i == 2) {
		danweizhineng.className = "style103";
		lingdaojieshao.className = "style103";
		jigoujieshao.className = "style103gai";

		danwei.className = "hideStyle";
		lingdao.className = "hideStyle";
		jigou.className = "showStyle";
	}
}

