$(function(){
	$(".leftnav> li:not([class='current'])>a").css("background-position","188px bottom")
	$(".leftnav a").focus(function(){this.blur();});
	$(".leftnav> li:not([class='current'])").hover(function(){
		var $this=$(this);
		if($this.find("ol").length){
			if(!$this.data("sliding")){
				$this.data("sliding","true");
				$this.find("ol").slideDown("fast");
				$this.addClass("now");
			}
		}
		//if(!$this.data("moving")){
			//$this.data("moving","true");
			$this.children("a").animate({backgroundPosition:"202px top"},"normal");
		//}
			
	},function(){
		var $this=$(this);
		if( $this.find("ol").length){
			 $this.find("ol").slideUp("fast",function(){
				 $this.removeData("sliding");
			})
		}
		$this.removeClass();
		$this.children("a").animate({backgroundPosition:"188px bottom"},500,function(){
			//$this.removeData("moving");
		});
	});
	
	//for channel
	$(".channel>li:not([class])").live("click",function(){
		var $this=$(this);
		$(".channel ol:visible").siblings(".imgtit").hide().end().slideUp(380);
		$this.find(".imgtit").fadeIn(400);
		$this.find("ol").slideDown(500);
		$this.siblings().removeClass().end().addClass("now");
	});
	$(".channel a").focus(function(){$(this).blur();});
	
	var menutop = $(".flip_r").offset().top;
	$(window).scroll(function(){
		var scrolltop=$(window).scrollTop();
		var offsettop= (scrolltop>menutop)?scrolltop-menutop+40:26;
		$(".flip_r").animate({top : offsettop },{ duration:600 , queue:false });
	}); 
})