﻿// JavaScript Document
$(document).ready(function(){
	//下拉菜单
	$(".nav li").hover(function(){
		$(this).children(".navSub").show();							
	}, function(){
		$(this).children(".navSub").hide();
	});
	
	//右侧滑动切换
	$(".right h3 a").mouseenter(function(){
		var Tabindex=$(this).index();
		$(this).addClass("on").siblings().removeClass("on");
		$(this).parents(".box").find(".con").eq(Tabindex).show().siblings().hide();
	});
	
	//文章内容部分字体大小设置
	$(".textS").click(function(){
		changeTextSize(12);	
		return false;
	});
	$(".textM").click(function(){
		changeTextSize(14);	
		return false;
	});
	$(".textL").click(function(){
		changeTextSize(16);	
		return false;
	});
	function changeTextSize(textSize){
		$(".mainTextCon").css("fontSize",textSize);
	}
	
	//新闻内容分页
	$(".newsFy a").click(function(){
		var index=$(this).index();
		$(".newsPage").eq(index).show().siblings(".newsPage").hide();
		$(this).addClass("on").siblings().removeClass("on");
	});

});


