/*function area*/
(function ($) {
//使用如： $(".ul_nav li").hoverClass("over");
	$.fn.hoverClass = function (className) {
		var _self = this;
		_self.each(function (i) {
			_self.eq(i).mouseenter(function () {
				$(this).addClass(className);
			});
			_self.eq(i).mouseleave(function () {
				$(this).removeClass(className);
			});
		});
	return _self; 
	};

})(jQuery);



/*use*/
$(function () {
	if($(".nav2").length){
		var dalay;
		$(".nav2 li").each(function () {
			var index = $(this);
			index.hover(function () {
				dalay = setTimeout(function () {
					index.children("ul").show(400);
				},500);
			},function () {
				clearTimeout(dalay);
				index.children("ul").hide(400);
			});
		});
	}


if ($('.tabCont').length) {
	$('.tabCont').soChange({	
		thumbObj:'.tabTitle',
		slideTime:0,
		thumbOverEvent:false,
		autoChange:false//自动切换为 false，默认为true
	});
	var tabC = $(".tabCont").height();
	$(".tabBox_a1").height(tabC+40);
}

})


$(function () {
	if($(".banner").length){
		$('.banner li').soChange({
			botPrev:'.pre', // 按钮，上一个
			botNext:'.next' // 按钮，下一个
		});
	};
})


$(function () {		
	if($(".tr1").length){
		$("tr:has('class')").hide();
		$("input").each(function (i) {

		});
	}
})


$(function getTime() {
	if ($('#time').length) {
		var d=["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
		var today=new Date();
		var myweekday=d[today.getDay()];
		var mymonth=today.getMonth()+1;
		var myday= today.getDate();
		var myyear= today.getFullYear();
		$('#time').html(myyear+"年"+mymonth+"月"+myday+"日 "+myweekday);  
	}
})



$(function tabHeight() {
	$(".tabTitle").click(function () {
		var tabContH = $(this).next(".tabCont").height()+80;
		$(".tabBox_a1").height(tabContH);	
	});	
})
