$(document).ready(function(){
// news_list
var $line_top='';
var $line_bottom='';
var $line_left='';
var $line_right='';
$(".news_list li").hover(function(){
$(this).append($line_top,$line_bottom,$line_left,$line_right);
var wd=$(this).outerwidth(true);
var hg=$(this).height();
var time=800;
$(this).find(".line_top").css({left:-wd,top:0,width:wd,height:1,opacity:0}).animate({left:0,opacity:1},time);
$(this).find(".line_bottom").css({left:wd,bottom:0,width:wd,height:1,opacity:0}).animate({left:0,opacity:1},time);
$(this).find(".line_right").css({right:0,top:-hg,width:1,height:hg,opacity:0}).animate({top:0,opacity:1},time);
$(this).find(".line_left").css({left:0,top:-hg,width:1,height:hg,opacity:0}).animate({top:0,opacity:1},time);
},function(){
$(this).find(".line").remove();
});
$(".news_seek img").mouseenter(function(){
$(this).siblings("input").stop().animate({width:200},600).select();
});
$(".inside_banner").click(function(e){
$(this).find(".text").animate({width:0},300);
});
$(".news_seek").click(function(e){
e.stoppropagation();
});
//enter搜索
$('#k').bind('keypress', function(event) {
if (event.keycode == "13")
{
search_news();
}
})
});
//search
function search_news() {
var k = $("#k").val();
var c = $("#c").val();
document.location = webroot + "plug/search.asp?classid=" + c + "&key=" + encodeuri(k);
}