$(function(){
	$(".service ul.list_03 li.p_li").hover(function(){
		
		$(this).find("img").fadeOut("slow");
		$(this).addClass("hover");
	},function(){
		$(this).find("img").fadeIn("slow");
		$(this).removeClass("hover");
	});
	
	$(".menu ul li").hover(function(){
		$(this).find("a:eq(0)").addClass("hover");
		if($(this).find("div").length>0)
		{
			$(this).find("div").stop().animate({"height":$(this).find("span.mm").height()+50},500);
		}
	},function(){
		$(this).find("a:eq(0)").removeClass("hover");
		if($(this).find("div").length>0)
		{
			$(this).find("div").stop().animate({"height":"0px"},500);
		}
	});
	$(".homeBottom .pic").scrollable({size:1,items:".homeBottom .pic ul"}).navigator({navi:".navi",naviItem:"li",activeClass:"hover"});	
	$(".homeBottom .hl ul.txt li.li_1").scrollable({size:1,loop:true,vertical:true,items:".homeBottom .hl ul.txt li.li_1 span"}).autoscroll();
	
	$(".hotNews .sr").scrollable({size:1,items:".homeBottom .pic ul",activeClass:"active"});
	
	$(".nkScroll div").scrollable({size:4,items:".nkScroll div ul",loop:true});
	
	$(".qx div").scrollable({size:5,items:".qx div ul",loop:true});
	
	$(".title .navi li").click(function(){
		$(this).parents(".title").find("ul.ico").find("li:eq("+$(this).prevAll().length+")").addClass("hover").siblings().removeClass("hover");
	});
	
	$(".homeBottom .hm .pic li a").mouseover(function(){
		$(".homeBottom .hm .pic a:first").attr("href",$(this).attr("href"));
		$(".homeBottom .hm .pic a:first img").attr("src",$(this).attr("imgurl"));
	});
	
	$(".inside img").one("click",function(){
		$(this).css({"margin-left":"-"+$(this).width()/2+"px"})
	});
	
	$(".home img,.inside img").click();
	
	$("ul.list_01 li,.eh .pr,.eh .enNews,.eh .wc").hover(function(){$(this).addClass("hover");},function(){$(this).removeClass("hover");});
	
	$(".hotNews .navi span i:last").text($(".hotNews .sr ul li").length)
	
	$(".hotNews .navi ul li.prev").click(function(){
		if (parseInt($(".hotNews .navi span i:first").text())-1!=0)
		{
			$(".hotNews .navi span i:first").text($(".hotNews .navi span i:first").text()-1)
		}
	});
	$(".hotNews .navi ul li.next").click(function(){
		if (parseInt($(".hotNews .navi span i:first").text())!=parseInt($(".hotNews .navi span i:last").text()))
		{
			$(".hotNews .navi span i:first").text(parseInt($(".hotNews .navi span i:first").text())+1)
		}
	});
});
