function AutoScroll(obj){
        $(obj).find("ul:first").animate({
                marginTop:"-20px"
        },1000,function(){
                $(this).css({marginTop:"0px"}).find("li:first").appendTo(this);
        });
}//新闻自动滚动
$(document).ready(function(){
	setInterval('AutoScroll("#scrolling")',5000);
	$(".t-data tr:even").addClass("even");

	$("th.checkbox :checkbox").click(function(){
		$(this).closest("table").find("td.checkbox :checkbox").each(function(){
			$(this).click();
		});
	});//全选

	$(".tab a").click(function(){
		if (!($(this).closest(".tab-hd").hasClass("tab-static"))){
			$(".current",$(this).closest(".tab-hd")).removeClass("current");
			$(this).parent().addClass("current");//切换tab
			var index=$(this).parent().index();
//			$(this).closest(".tab-container").children(".tab-content").removeClass("tab-content-current").eq(index).addClass("tab-content-current");
			$(this).closest(".tab-container").find(".tab-content").first().parent().children(".tab-content").removeClass("tab-content-current").eq(index).addClass("tab-content-current");
		}
	});//效果音tab切换

	$(".defined").focus(function(){
		if ($(this).attr("default")==$(this).attr("value"))	{
			$(this).attr("value","");
			$(this).css("color","#444");
		}
	});//input提示文字
	$(".defined").blur(function(){
		 if ($(this).attr("value")==""){
			$(this).attr("value",$(this).attr("default"));
			$(this).css("color","");
		}
	});
});
