(function($){
	$.fn.indexDownMenu=function(options){
		
		$("ul.topnav>li").mouseover(function() { 
		var index=$("ul.topnav>li ").index(this);
		if($(this).children("div.subnav").is("div")){
			$(this).find("div.subnav").show(); 
			if($.browser.version==7.0||$.browser.version==6.0){
				$(".subnav").css("z-index","1000")
				$(".banner").css("z-index","-1")
				$(".nav").css("z-index","-100")
				$(".sub_content").css("z-index","-100")
				}
			
			if(index==3){$(this).find("div.subnav").css({left:"-30px"})}
			if(index==4){$(this).find("div.subnav").css({left:"-110px"})}
			if(index==5){$(this).find("div.subnav").css({left:"-190px"})}
			if(index==6){$(this).find("div.subnav").css({left:"-273px"})}
			if(index==7){$(this).find("div.subnav").css({left:"-360px"})}
			if(index==8){$(this).find("div.subnav").css({left:"-430px"})}
			
		}
			$(this).hover(function() {}, function(){$(this).find("div.subnav").hide(); if($.browser.version==7.0||$.browser.version==6.0){$(".banner").css("z-index","");$(".nav").css("z-index","");$(".sub_content").css("z-index","");}});
		});
		$("ul.topnav li").hover(function() { 
			if($(this).children("div.subnav").is("div")){$(this).addClass("submenuhover"); }					 
		}, function(){	
		$(this).removeClass("submenuhover"); 
		});
			
		}//自定义方法indexDownMenu()结束
 })(jQuery);
(function($){
	$.fn.webGroup=function(options){
		
		$(".webgroup").mouseover(function() { 
		
			$(this).find("div.webgroup_div").show(); 
			//$(this).find("div.webgroup_div").css("z-index","10000")
			$(".banner").css("z-index","-1")
			//$(".nav").css("z-index","0")
			//$(".out_top").css("z-index","-1")
			
			
			
			$(this).hover(function() {}, function(){$(this).find("div.webgroup_div").hide();$(".banner").css("z-index","");$(".nav").css("z-index","") });
		});
		$("ul.topnav li").hover(function() { 
			if($(this).children("div.subnav").is("div")){$(this).addClass("submenuhover"); }					 
		}, function(){	
		$(this).removeClass("submenuhover"); 
		});
			
		}//自定义方法indexDownMenu()结束
		 })(jQuery);
(function($){
	$.fn.touziGroup=function(options){
		
		$(".touzigroup").mouseover(function() { 
		
			$(this).find("div.touzi_div").show(); 
			$(".banner").css("z-index","-1")
			//$(".nav").css("z-index","-100")
			$(this).hover(function() {}, function(){$(this).find("div.touzi_div").hide();$(".banner").css("z-index","");$(".nav").css("z-index","") });
		});
		$("ul.topnav li").hover(function() { 
			if($(this).children("div.subnav").is("div")){$(this).addClass("submenuhover"); }					 
		}, function(){	
		$(this).removeClass("submenuhover"); 
		});
			
		}//自定义方法indexDownMenu()结束
 })(jQuery);

(function($){
	$.fn.zitiGroup=function(options){
		
		$(".zitigroup").mouseover(function() { 
		
			$(this).find("div.ziti_div").show(); 
			$(".banner").css("z-index","-1")
			//$(".nav").css("z-index","-100")
			$(this).hover(function() {}, function(){$(this).find("div.ziti_div").hide();$(".banner").css("z-index","");$(".nav").css("z-index","") });
		});
		$("ul.topnav li").hover(function() { 
			if($(this).children("div.subnav").is("div")){$(this).addClass("submenuhover"); }					 
		}, function(){	
		$(this).removeClass("submenuhover"); 
		});
			
		}//自定义方法indexDownMenu()结束
 })(jQuery);

(function($) {    //2010-11-26    
		  $.fn.extend({        //Tab插件名称       
					  Tab: function(options) {            //默认值           
						  var defaults = {                
							  tabSelected: "tab_selected",                
							  tabWidth: "100%",                
							  autoHeight: "ture",
							  autochange:false
					  };            
					  var options = $.extend(defaults, options); 
					  return $(this).each(function(){
							$(this).css("width", options.tabWidth);            //选项卡 this指通过当前选择器获取的JQuery对象       
							var tab = $(".tab_menu ul li", this);            //选项内容           
							var tabContent = $(".tab_box > div", this);           
							if (options.autoHeight != "true") {                
							tabContent.css("height", options.autoHeight);
							}            //单击选项卡          
							tab.click(function() {                
							$(this).addClass(options.tabSelected).siblings().removeClass(options.tabSelected);               
							var curIndex = tab.index(this);                
							tabContent.eq(curIndex).show().siblings().hide();
							if($(".tab").parent().hasClass("ry_container")){
									$('.ry_yearsTitle span:eq(0)').html($('.ry_years ul li.tab_selected').text());
								}
							});         //return this使JQuery方法可链
							var linum=$(".tab_menu ul li").length-1;
							//alert($(".tab_menu ul li.tab_selected").html());
							//alert(.tab_menu ul li)
							$('.tab_menu ul li').eq(0).trigger('click');//默认进去显示第一个tab
							//alert(n);
							function autoshow(){
							var n=$(".tab_menu ul li").index($(".tab_selected"));
							if( n == linum ){
							$('.tab_menu ul li').eq(0).trigger('click');
							} else {
							$('.tab_menu ul li.tab_selected').next().trigger('click');
							}
							}
							if(options.autochange){
								var tt=setInterval(autoshow, 2000);
								$('.tab').hover(function(){ clearInterval(tt)}, function(){tt=setInterval(autoshow, 2000);})
							}
							
							return this;  					   
						})
     
					  }    
					  });
 })(jQuery);

//新闻中心图片切换
(function($){
	$.fn.picflash_Auto=function(options){
		var defaults={
				imgArray:[
						  	{src:"images/01.jpg",url:"http://www.baidu.com",alt:"澳大利亚：体验蓝山风光，感受澳洲风情"}
							],
				playHeight:260,
				playWidth:500,
				news_textx_height:30,
				news_textx_width:1
					};//默认参数结束
		var options=$.extend(defaults,options);
		$(this).append("<div id='news_showx'></div><!--news_showx -->");
		$(this).append("<div id='news_textx'></div><!--news_showx -->");
		$(this).append("<div id='news_numx'></div><!--news_showx -->");
		$(this).append("<div id='news_bgx'></div><!--news_showx -->");
		
		if (options.playWidth!= 500||options.playHeight!= 260) {                
					  	$(this).css({"width": options.playWidth,"height": options.playHeight});
						$("#news_showx").css({"width" :options.playWidth , "height" : options.playHeight-options.news_textx_height });
						$("#news_showx>img").css({"width" :options.playWidth , "height" : options.playHeight-"30" });
						$("#news_textx").css({"width" :options.playWidth-options.news_textx_width})
						$("#news_bgx").css({"width" :options.playWidth , "height" : 13 })
						$(this).hide();
						}       
		
		var mypicArray=options.imgArray;
		var imgnum=mypicArray.length;
		//alert(mypicArray[0].src);
		for(i=1;i<=imgnum;i++)//for循环用来所有图片和导航数字
			{
				$("#news_showx").append("<a href='"+mypicArray[i-1].url+"' target='_blank'><img src='"+mypicArray[i-1].src+"' alt='"+mypicArray[i-1].alt+"'></a>");
				$('#news_numx').append("<a>"+i+"</a>");
			}
		var showx_in_imgnum=$("#news_showx a").length;//取得导航数字的个数
		//alert(showx_in_imgnum);
		$("#news_showx a:not(:first-child)").hide();//隐藏出去第一张的所有图片
		$("#news_textx").html($("#news_showx a:first-child").find("img").attr('alt'))//打印描述文字
		$("#news_numx a:first").addClass("news_on").siblings().addClass("news_nor");//给当前导航数字加样式
		$("#news_textx").click(function(){window.open($("#news_showx a:first-child").attr('href'), "_blank")});//单击描述文字可以打开链接
		$("#news_numx a").click(function () {//给导航数字加上单击事件，点击对应数字打开对应的图片
		   var i = parseInt($(this).text(),10) - 1;
		   n = i;
		   //if (i >= showx_in_imgnum) return;
		   $("#news_textx").html($("#news_showx a").eq(i).find("img").attr('alt'));
		   $("#news_textx").unbind().click(function(){window.open($("#news_showx a").eq(i).attr('href'), "_blank")})
		   $("#news_showx a").filter(":visible").hide(50).parent().children().eq(i).fadeIn(200);
		   //$("#showx a").filter(":visible").hide(50).parent().children().eq(i).fadeIn(500);
		   $(this).attr("class","news_on").siblings().attr("class","news_nor");
		   
		});
		
		function autoshow(){//自动切换函数
			if(parseInt($("#news_numx a.news_on").text(),10) == showx_in_imgnum ){
				$("#news_numx a").eq(0).trigger('click');
			} else {
				$("#news_numx a.news_on").next().trigger('click');
			}
		}
		
			$('#newspic_play img').first().one("load",function(){
				$("#newspic_play").slideDown(100);
			qq=setInterval(autoshow, 4000);
			$("#news_numx").hover(function(){ clearInterval(qq)}, function(){qq=setInterval(autoshow, 4000);})//鼠标悬停在图片上时停止切换
			$('#news_showx').hover(function(){ clearInterval(qq)}, function(){qq=setInterval(autoshow, 4000);})//鼠标悬停在图片上时停止切换
			});
			
	}//自定义方法pic_Auto()结束
 })(jQuery);

//新闻中心栏目首页图片切换
(function($){
	$.fn.newsLanmuPicAuto=function(options){
		var defaults={
				imgArray:[
						  	{src:"images/01.jpg",url:"http://www.baidu.com",alt:"澳大利亚：体验蓝山风光，感受澳洲风情"}
							],
				playHeight:260,
				playWidth:500,
				news_textx_height:30,
				news_textx_width:1
					};//默认参数结束
		var options=$.extend(defaults,options);
		$(this).append("<div id='news_showx'></div><!--news_showx -->");
		$(this).append("<div id='news_textx'></div><!--news_showx -->");
		$(this).append("<div id='news_numx'></div><!--news_showx -->");
		$(this).append("<div id='news_bgx'></div><!--news_showx -->");
		
		if (options.playWidth!= 500||options.playHeight!= 260) {                
					  	$(this).css({"width": options.playWidth,"height": options.playHeight});
						$("#news_showx").css({"width" :options.playWidth , "height" : options.playHeight-options.news_textx_height });
						$("#news_showx>img").css({"width" :options.playWidth , "height" : options.playHeight-"60" });
						$("#news_textx").css({"width" :options.playWidth-options.news_textx_width})
						$("#news_bgx").css({"width" :options.playWidth , "height" : 13 })
						$(this).hide();
						}       
		
		var mypicArray=options.imgArray;
		var imgnum=mypicArray.length;
		//alert(mypicArray[0].src);
		for(i=1;i<=imgnum;i++)//for循环用来所有图片和导航数字
			{
				$("#news_showx").append("<a href='"+mypicArray[i-1].url+"' target='_blank'><img src='"+mypicArray[i-1].src+"' alt='"+mypicArray[i-1].alt+"'></a>");
				$('#news_numx').append("<a>"+i+"</a>");
			}
		var showx_in_imgnum=$("#news_showx a").length;//取得导航数字的个数
		//alert(showx_in_imgnum);
		$("#news_showx a:not(:first-child)").hide();//隐藏出去第一张的所有图片
		$("#news_textx").html($("#news_showx a:first-child").find("img").attr('alt'))//打印描述文字
		$("#news_numx a:first").addClass("news_on").siblings().addClass("news_nor");//给当前导航数字加样式
		$("#news_textx").click(function(){window.open($("#news_showx a:first-child").attr('href'), "_blank")});//单击描述文字可以打开链接
		$("#news_numx a").click(function () {//给导航数字加上单击事件，点击对应数字打开对应的图片
		   var i = parseInt($(this).text(),10) - 1;
		   n = i;
		   //if (i >= showx_in_imgnum) return;
		   $("#news_textx").html($("#news_showx a").eq(i).find("img").attr('alt'));
		   $("#news_textx").unbind().click(function(){window.open($("#news_showx a").eq(i).attr('href'), "_blank")})
		   $("#news_showx a").filter(":visible").hide(50).parent().children().eq(i).fadeIn(200);
		   //$("#showx a").filter(":visible").hide(50).parent().children().eq(i).fadeIn(500);
		   $(this).attr("class","news_on").siblings().attr("class","news_nor");
		   
		});
		
		function autoshow(){//自动切换函数
			if(parseInt($("#news_numx a.news_on").text(),10) == showx_in_imgnum ){
				$("#news_numx a").eq(0).trigger('click');
			} else {
				$("#news_numx a.news_on").next().trigger('click');
			}
		}
		
			$('#newsLanmuPlay img').first().one("load",function(){
				$("#newsLanmuPlay").slideDown(100);
			qq=setInterval(autoshow, 4000);
			$("#news_numx").hover(function(){ clearInterval(qq)}, function(){qq=setInterval(autoshow, 4000);})//鼠标悬停在图片上时停止切换
			$('#news_showx').hover(function(){ clearInterval(qq)}, function(){qq=setInterval(autoshow, 4000);})//鼠标悬停在图片上时停止切换
			});
		$("#newsLanmuPlay").css("display", "block");	
	}//自定义方法pic_Auto()结束
 })(jQuery);

//banner广告切换
;(function($){
    $.fn.extend({
        iFadeSlide: function(options){
            //插件参数初始化
            var iset={
                field:$('div#slide img'),  //切换元素集合
                icocon:$('div.ico'),  //索引容器
                hoverCls:'high',  //切换至当前索引高亮显示样式
                curIndex:0,  //默认高亮显示的索引值,索引值为0起始
                outTime:200,  //元素淡出时间(ms)
                inTime:300,  //元素淡入时间(ms)
                interval:3000  //元素切换间隔时间(ms)        
            };
            options=options || {};
            $.extend(iset,options);   //合并参数对象.若options传入有新值则覆盖iset中对应值,否则使用默认值.
            //根据切换元素量生成对应的索引值列表并插入到切换区域中
            var ulcon = "<ul>";
            iset.field.each(function(i){
                //ulcon = ulcon + '<li>' + (i + 1) + '</li>';
				//ulcon = ulcon + '<li style="background:url(../images/01b.gif)"></li>';
				ulcon = ulcon + '<li style="background:url(../images/a'+(i+1)+'_s.jpg)"></li>';
            });
            ulcon += '</ul>';
            iset.icocon.append(ulcon);
			$(".banner img").css("height","487" )
			$(".banner").css("width",$(window).width());
			$(".banner").css("margin-left",-($(window).width()-960)/2 )
			$(".banner img").css("margin-left",-430+($(window).width()-960)/2-39.5 )
			$(".banner .ico_b").css("right",($(window).width()-960)/2+20)
			$(".banner .banner_gupiao_c").css("margin-left",($(window).width()-960)/2 )
				
			$(window).resize(function(){
			  	if(($(window).width()-960)>0){
					$(".banner").css("width",$(window).width());
					$(".banner").css("margin-left",-($(window).width()-960)/2 )
					$(".banner img").css("margin-left",-430+($(window).width()-960)/2-39.5 )
					$(".banner .ico_b").css("right",($(window).width()-960)/2+20)
					$(".banner .banner_gupiao_c").css("margin-left",($(window).width()-960)/2 )
					}
			});
			
			
			
			
            var ico = iset.icocon.find('li');  //索引列表集合
            var size = iset.field.size();  //切换元素量
            var index = 0;  //初始索引值
            var clearFun=null;
            //淡出淡入函数
            var fadeFun = function(obj){
                index = ico.index(obj);  //取当前索引值
				
				if(index==1||index==8){$(".banner_gupiao_c").css("color", "#000")}else{$(".banner_gupiao_c").css("color", "#fff")}
				
                //淡出当前可见元素,并通过索引值找到要淡入的元素
                iset.field.filter(':visible').fadeOut(iset.outTime, function(){
                    iset.field.eq(index).fadeIn(iset.inTime);
                });
                //为当前索引添加高亮样式并移除同级元素中的高亮样式
                $(obj).addClass(iset.hoverCls).siblings().removeClass(iset.hoverCls);
            };
            //切换函数
            var changeFun = function(){
                index++;  //累积索引值
				
                if (index == size){index = 0};  //当索引值等于切换元素量时,初始化为0
                ico.eq(index).trigger('mouseleave');  //为当前的索引模拟鼠标划出元素区事件
            };
            //自动切换函数
            var scrollFun = function(){
                clearFun = setInterval(function(){
                    changeFun()
                }, iset.interval);
            };
            //停止自动切换函数
            var stopFun = function(){
                clearInterval(clearFun);
            };
            
            scrollFun();  //初始自动切换
            
            //索引区域鼠标划入停止自动切换并切换元素至当前索引,鼠标划出初始化索引至当前值(否则鼠标划出切换会乱)
            ico.hover(function(){
                stopFun();
                fadeFun(this);
            }, function(){
                fadeFun(this);
            }).eq(iset.curIndex).mouseleave();  //初始高亮显示的索引值
            
            //切换区域鼠标划入停止自动切换,划出继续自动
            iset.field.hover(function(){
                stopFun();
            }, function(){
                scrollFun();
            });
			
        }
    });
})(jQuery);

//栏目页banner宽度调整
;(function($){
   $.fn.bannerSubControlWidth=function(){
           
			//alert($(this).html())
			
           		$(this).css("width",$(window).width());
           		
           		$(this).css("margin-left",-($(window).width()-960)/2 )
           		
			
			//$(".banner img").css("margin-left",-430+($(window).width()-960)/2-39.5 )
			//$(".banner .ico_b").css("right",($(window).width()-960)/2+20)
			//$(".banner .banner_gupiao_c").css("margin-left",($(window).width()-960)/2 )
				
			$(window).resize(function(){
					
			  	if(($(window).width()-960)>0){
						$(".banner_sub,.sub_footer,.out_top").css("width",$(window).width());
						$(".banner_sub,.sub_footer,.out_top").css("margin-left",-($(window).width()-960)/2 )
					
					}
			});
			
			
			
			
   }//自定义方法pic_Auto()结束
 })(jQuery);


//调整字体大小
;(function($){
   $.fn.changeFontSize=function(){
           
			return $(".changgefont").each(function(){
				$(this).click(function(){
					var this_id=$(this).attr("id");
					if(this_id==16){ $('.right_content_zhengwen').css("font-size","16px");$(this).addClass("fontOn").siblings().removeClass("fontOn")}
					else if(this_id==14){ $('.right_content_zhengwen').css("font-size","14px");$(this).addClass("fontOn").siblings().removeClass("fontOn")}
					else if(this_id==12){ $('.right_content_zhengwen').css("font-size","12px");$(this).addClass("fontOn").siblings().removeClass("fontOn")}
				})
							
			});	
			
   }//自定义方法changeFontSize()结束
 })(jQuery);

//定宽输出插件
(function($){
    $.extend($,{
        fixedWidth : function(str, length, char){
			str = str.toString();
			if(!char) char = "...";
			var num = length - lengthB(str);
			if(num < 0 ){
				str = substringB(str, length - lengthB(char) ) + char ;
			}
			return str;			
			function substringB(str, length){
				var num = 0, len = str.length, tenp = ""; 
			    if( len ){
       				for( var i = 0; i < len; i ++ ){
						if(num > length) break;
            			if(str.charCodeAt( i ) > 255 ){
                			num += 2;
							tenp += str.charAt( i );
            			}else{
                			num ++ ;
							tenp += str.charAt( i );
            			}
        			}
        			return tenp;
    			}else{
        			return null;
    			}
			}
			function lengthB(str){
				var num = 0, len = str.length; 
			    if( len ){
       				for( var i = 0; i < len; i ++ ){
            			if(str.charCodeAt( i ) > 255 ){
                			num += 2;
            			}else{
                			num ++ ;
            			}
        			}
        			return num;
    			}else{
        			return 0;
    			}
			}
        }	
    })
})(jQuery);



//首页月刊图片切换展示
var Speed_1 = 10; //速度(毫秒)
var Space_1 = 10; //每次移动(px)
var PageWidth_1 = 105 * 1; //翻页宽度
var interval_1 = 5000; //翻页间隔时间
var fill_1 = 0; //整体移位
var MoveLock_1 = false;
var MoveTimeObj_1;
var MoveWay_1="right";
var Comp_1 = 0;
var AutoPlayObj_1=null;
function GetObj(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}}
function AutoPlay_1(){clearInterval(AutoPlayObj_1);AutoPlayObj_1=setInterval('ISL_GoDown_1();ISL_StopDown_1();',interval_1)}
function ISL_GoUp_1(){if(MoveLock_1)return;clearInterval(AutoPlayObj_1);MoveLock_1=true;MoveWay_1="left";MoveTimeObj_1=setInterval('ISL_ScrUp_1();',Speed_1);}
function ISL_StopUp_1(){if(MoveWay_1 == "right"){return};clearInterval(MoveTimeObj_1);if((GetObj('ISL_Cont_1').scrollLeft-fill_1)%PageWidth_1!=0){Comp_1=fill_1-(GetObj('ISL_Cont_1').scrollLeft%PageWidth_1);CompScr_1()}else{MoveLock_1=false}
AutoPlay_1()}
function ISL_ScrUp_1(){if(GetObj('ISL_Cont_1').scrollLeft<=0){GetObj('ISL_Cont_1').scrollLeft=GetObj('ISL_Cont_1').scrollLeft+GetObj('List1_1').offsetWidth}
GetObj('ISL_Cont_1').scrollLeft-=Space_1}
function ISL_GoDown_1(){clearInterval(MoveTimeObj_1);if(MoveLock_1)return;clearInterval(AutoPlayObj_1);MoveLock_1=true;MoveWay_1="right";ISL_ScrDown_1();MoveTimeObj_1=setInterval('ISL_ScrDown_1()',Speed_1)}
function ISL_StopDown_1(){if(MoveWay_1 == "left"){return};clearInterval(MoveTimeObj_1);if(GetObj('ISL_Cont_1').scrollLeft%PageWidth_1-(fill_1>=0?fill_1:fill_1+1)!=0){Comp_1=PageWidth_1-GetObj('ISL_Cont_1').scrollLeft%PageWidth_1+fill_1;CompScr_1()}else{MoveLock_1=false}
AutoPlay_1()}
function ISL_ScrDown_1(){if(GetObj('ISL_Cont_1').scrollLeft>=GetObj('List1_1').scrollWidth){GetObj('ISL_Cont_1').scrollLeft=GetObj('ISL_Cont_1').scrollLeft-GetObj('List1_1').scrollWidth}
GetObj('ISL_Cont_1').scrollLeft+=Space_1}
function CompScr_1(){if(Comp_1==0){MoveLock_1=false;return}
var num,TempSpeed=Speed_1,TempSpace=Space_1;if(Math.abs(Comp_1)<PageWidth_1/2){TempSpace=Math.round(Math.abs(Comp_1/Space_1));if(TempSpace<1){TempSpace=1}}
if(Comp_1<0){if(Comp_1<-TempSpace){Comp_1+=TempSpace;num=TempSpace}else{num=-Comp_1;Comp_1=0}
GetObj('ISL_Cont_1').scrollLeft-=num;setTimeout('CompScr_1()',TempSpeed)}else{if(Comp_1>TempSpace){Comp_1-=TempSpace;num=TempSpace}else{num=Comp_1;Comp_1=0}
GetObj('ISL_Cont_1').scrollLeft+=num;setTimeout('CompScr_1()',TempSpeed)}}
function picrun_ini(){
GetObj("List2_1").innerHTML=GetObj("List1_1").innerHTML;
GetObj('ISL_Cont_1').scrollLeft=fill_1>=0?fill_1:GetObj('List1_1').scrollWidth-Math.abs(fill_1);
GetObj("ISL_Cont_1").onmouseover=function(){clearInterval(AutoPlayObj_1)}
GetObj("ISL_Cont_1").onmouseout=function(){AutoPlay_1()}
AutoPlay_1();
}
//首页月刊图片切换展示
function add_kongge(){var str=$('.footprint_content').text();
str=str.replace(/\>/g,'\ > ');
$('.footprint_content').html(str);}

