$(function(){
	$('.menus_bg,.menus_bgT,.menus_bgT').css({opacity:0.8});
	$('#menu ul').hover(function(){
		$('#menu').css('z-index',100);
		$('#menus ul,.menus_bg').show();
		
		var bgHeight = $('#menus ul').outerHeight();
		$('.menus_bgB').height(bgHeight);
	},function(){
		$('#menus ul,.menus_bg').hide();
			$('#menu').css('z-index',1);																			 
		
	});	
	$('#menu >ul li a').not($('#curNav')).css({backgroundPosition:'0 0'})
	.hover(function(){
		$(this).stop().animate({backgroundPosition:"(0 -14)"},{duration:100});
	},function(){
		$(this).stop().animate({backgroundPosition:"(0 -28)"},{duration:100,complete:function(){
				$(this).css({backgroundPosition: "0 0"});																					 
		}});
	});
	//为页脚的友情链接选项框添加跳转页面事件
	 $('#friendLinks').change(function(){
				 if($(this).val() == ''){
				   return;
				 }
				 window.open($(this).val(), '_blank');														   
			   });
	 $('img').each(function(){//替换图片
			if(($(this).attr('src')).indexOf('.')<0){
				$(this).attr('src','images/errorImg.png');	
			}				   
	  });
});
/*form style*/
function border1(){
	$(this).css({borderColor:"#0693f5"});
}
function border2(){
	$(this).css({borderColor:"#54606c"});	
}
function formMsg(id){
	$(id).mouseover(border1)
		.focus(border1)
		.mouseout(border2)
		.blur(border2);
}
