// JavaScript Document

$(document).ready(function(){  //这个就是传说的ready
													 
													 //页面载入时匹配菜单项
													 var i=0;												 
													 $(".li1 > a").each(function(){
																								//给每个菜单链接增加id属性
																								$(this).attr("id","menu"+i++)
																								//alert($(this).attr("id"));
																							});
													 $(".li1 > a").click(function(){
																								$(".menu2").hide("fast");
																								$(this).next(".menu2").toggle("fast");

																								$.cookie("menu",$(this).attr("id"));
																							 }); //菜单动作  问题 ??
													 	$("#"+$.cookie("menu")).next(".menu2").show();
													 
													 
													 $(".hotT a").hover(function(){//热点切换
																								$(".hotT a").removeClass("nselected");
																								$(this).removeClass("nselect");
																								$(this).addClass("nselected");
																								$(".hotlist").hide();
																								$("#"+$(this).attr("id")+"_div").show();
																							},
																							function(){
																							});
													 
													 $("#closeScroll").click(function(){//点击关闭右栏目滚动
																										$.cookie("closeScroll","stop");
																										$(window).unbind("scroll");
																									});
													 if ($.cookie("closeScroll")=="stop"){
														 $(window).unbind("scroll");
														 }
													 
													 });

$(this).scroll(function() { // 页面发生scroll事件时触发
													var bodyTop = 0;
													if (typeof window.pageYOffset != 'undefined') {
													bodyTop = window.pageYOffset;
													}
													else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat')
													{
													bodyTop = document.documentElement.scrollTop;
													}
													else if (typeof document.body != 'undefined') {
													bodyTop = document.body.scrollTop;
													}
													$("#scrolldiv").css("top",bodyTop);
													});