(function($) {
	//主导航效果
	$.fn.hoverClass = function (className) {
		var time;
		var _self = this;
		_self.each(function (i) {
			var index = $(this);
			_self.eq(i).mouseenter(function () {
				time = setTimeout(function() {
					index.addClass(className);
				},300);
			});
			_self.eq(i).mouseleave(function () {
				clearTimeout(time);
				index.removeClass(className);
			});
		});
	return _self;
	}
	
	//顶部点击效果
	$.fn.topNav = function() {
		var sitesUL = $(this);
		var topNav = $(".topNav")
		topNav.toggle(function() {
			sitesUL.slideDown(100);
		},function() {
			sitesUL.slideUp(100);
		});
	}



	//执行以上效果
	$(".groupSitesgroup-sitesUL").topNav();
	$(".mainNav>ul>li").hoverClass("over");
	
	if($("#change_6").length){
		$("#change_6 h3 a").click(function(){
			$('#change_6 div').soChange({
				thumbObj:'#change_6 h3',//导航对象指向标题h3
				slideTime:0,
				thumbOverEvent:false,
				autoChange:false
			});
		});
	}


	//打印
	$(".print1>a").click(function() {
		window.print();
		return false;
	});


	//加入收藏（可兼容IE\FF）
	$(".add1>a").click(function() {
		if(window.sidebar)
			window.sidebar.addPanel(document.title, window.location, "");
			window.external.AddFavorite(window.location, document.title);
			return false;
	});

})(jQuery);



