﻿// JScript 文件

$(document).ready(function(){
//菜单
            //var li = $("#me-1 > li");       
                $("#me-1").find("li").each(function(i){
                $(this).hover(
                    function(){
                        if($(this).attr("id")=="liHome")
                        {
                            $(this).addClass("selHome");
                            //$("#subMenu").hide();
                        }
                        else
                        {                        
                            $(this).addClass("selMenu");
                            //$("#subMenu").show();
//                            $(".sMenu").hide();
//                            var i = $(this).attr("sID");
//                            if(i==2)
//                            {
//                                $("#subMenu").hide();    
//                            }
//                            $("#menu" + i).show();
//                            
                        }

                    },
                    function(){
                        if($(this).attr("id")=="liHome")
                        {
                            $(this).removeClass("selHome");
                            $("#subMenu").hide();
                        }
                        else
                        {                        
                            $(this).removeClass("selMenu");
                            $("#subMenu").hide();
                        }

                    }
                    );
            });    
            $("#subMenu").hover(
                    function(){
                        $("#subMenu").show();
//                        $(".sMenu").hide();
//                        var i = $(this).attr("sID");
//                        $("#menu" + i).show();
                    },
                    function(){
                            $(this).removeClass("selMenu");
                            $("#subMenu").hide();
                    }
                    );
//            $("#menu").find("li").each(function(i){
//                $(this).hover(
//                    function(){
//                        //$(this).addClass("selLi");
//                        //$(this).find("ul").show().each(function(i){li.eq(i).hover(function(){$(this).find("ul").show();},function(){$(this).find("ul").hide(); })});
//                        //$(this).find("ul .c2").show().each(function(i){li.eq(i).hover(function(){},function(){})});
//                        $(this).find("ul").show();
//                    },
//                    function(){
//                        //$(this).removeClass("selLi");
//                        //$(this).find("ul .c2").hide();
//                        $(this).find("ul").hide();
//                    }
//                    );
//            });
            
//            $("#me-1 li ul").find("li").each(function(i){
//                $(this).hover(
//                    function(){
//                        $(this).removeClass("selLi");
//                        $(this).addClass("subLi");
//                    },
//                    function(){
//                        $(this).removeClass("subLi");
//                    }
//                    );
//            });

            $("#left .menu").find("li").each(function(i){
                $(this).hover(
                    function(){
                        if($(this).attr("class")=="sel")
                        {
                            
                        }
                        else
                        {                        
                            $(this).addClass("sel");
                        }

                    },
                    function(){
//                        if($(this).attr("class")=="sel")
//                        {
//                            
//                        }
//                        else
//                        {                        
                            $(this).removeClass("sel");
//                        }

                    }
                    );
            });
            
            
            $("#txtKeyword").click(function(){
                if($(this).val()=="关键字")
                {
                    $(this).val("");
                    
                }
            });

            $("#txtKeyword").blur(function(){
                if($(this).val()=="")
                {
                    $(this).val("关键字");            
                }
            });

            $(".tabHonor").find("td").each(function(i){
                $(this).hover(
                    function(){
                        $(this).addClass("bg");
                        $(this).attr("title","点击放大");
                    },
                    function(){
                        $(this).removeClass("bg");
//                        //$(this).find("ul .c2").hide();
//                        $(this).find("ul").hide();
                    });
             });

			//新闻图片集
  $(".picView a").each(function(){
     $(this).click(function(){
		  $(this).parents(".picView").find("div.picBox div").children("img:first-child").remove();
		  var s_pic = $(this).children("img:first-child");		  
		  var s_src = s_pic.attr("src");
		  $("<img/>").attr({
		   src:s_src,
		   width:600,
		   height:449,
		   border:0
		  }).appendTo($(this).parents(".picView").find("div.picBox").children("div:first-child"));
	 });
  });
			  
        });
        
            function ShowPic(pID)
            {
                $("#img"+pID).show();
                return false;
            }
            function ClosePic(pID)
            {
                $("#img"+pID).hide();
            }
			

