/* 

	def javascript 2009-3-7 all rights reserved
	
*/
$(document).ready(function(){

$('#lang').click(function (){$('#langbar').removeClass('hide');});
$('a,img').bind("focus",function(){if(this.blur){this.blur();}});
$('input[type=text],input[type=password]').addClass('input');
$('input[type=submit]').addClass('submit');
$('.tbsorter tbody tr,.submit').hover(function(){$(this).addClass('hover');},function(){$(this).removeClass('hover');});
/* search */
$(".keyword").focus(function(){
	if($(this).attr("value")==$(this).attr('title')){$(this).attr("value",'')};	
}).blur(function(){	
	if($(this).val()==''){$(this).attr("value",$(this).attr('title'))};
});
$(".search").submit(function (){
	var kw=$(this).find('.keyword').val();
	if(kw=='搜索...'||kw.replace(/^\s|\s$/g,'') == ""){
		window.alert('请输入搜索内容！');
		return false;
	}	
	$(this).find("input[name=keyword]").val(kw);
	$(this).attr("action",$(this).attr("action")+kw);
});
});