/*$(document).ready(function(){
	$(".small-column a#about4").addClass("on");
});*/

//图片按比例缩放
//参数(图片,允许的宽度,允许的高度)
function drawimage(img,iwidth,iheight){
    var flag=false;
	var image=new Image();
	image.src=img.src;
	if(image.width>0 && image.height>0){
		flag=true;
		if(image.width/image.height>= iwidth/iheight){
			if(image.width>iwidth){  
				img.width=iwidth;
				img.height=(image.height*iwidth)/image.width;
			}else{
				img.width=image.width;  
				img.height=image.height;
			}
		}
		else{
			if(image.height>iheight){  
				img.height=iheight;
				img.width=(image.width*iheight)/image.height;        
			}else{
				img.width=image.width;  
				img.height=image.height;
			}
		}
		//IMG ALT 标签
		//img.alt=image.width+"×"+image.height;
	}
}
//form input
//function inputfocus(){
	$(document).ready(function(){
		$(".inputd").focus(function(){
			$(this).addClass("inputfocus");
		}).blur(function(){
			$(this).removeClass("inputfocus");
		});
	});
//}

//操作提示 - 成功
function hideActived(strClass){
	$(".oper-" + strClass).fadeOut(1000);   
}

//头部搜索
function Msearch(){
	var keyword = $("#keyword").attr("value");
	var action = $("#search").attr("action");
	/*alert(action+escape(keyword));
	return false;*/
	if(keyword!=""){
		//$(window).attr("location",action + keyword + "-page-1");
		window.location = action + keyword + "-page-1";
		return false;
	}else{
		alert("请输入您要查询的关键词！");
		return false;
	}
}

//文章搜索
function Artsearch(){
	var keyword = $("#akey").attr("value");
	var action = $("#aForm").attr("action");
	/*alert(action+escape(keyword));
	return false;*/
	if(keyword!=""){
		//$(window).attr("location",action + keyword + "-page-1");
		window.location = action + keyword + "-page-1";
		return false;
	}else{
		alert("请输入您要查询的关键词！");
		return false;
	}
}

//main
$(document).ready(function(){
	$("#nav-one li").hover(
		function(){$("ul", this).fadeIn();}, 
		function(){} 
	);
	if (document.all){
		$("#nav-one li").hoverClass("sfHover");
	}
});
$.fn.hoverClass = function(c){
	return this.each(function(){
		$(this).hover( 
			function(){$(this).addClass(c);},
			function(){$(this).removeClass(c);}
		);
	});
};
swfobject.embedSWF('/swf/lanrenxixi.swf', 'taobataoba-net-banner', '960', '242', '9', null, null, {wmode: 'transparent'});
