/* auto zoom pictrue */
$(window).load(function(){
	$("img[name='picautozoom']").each(function(){
		if(this.complete){
			var smallWidth = $(this).width();
			var smallHeight = $(this).height();
			
			$(this).width(smallWidth).css("height","auto");
			if($(this).height() > smallHeight){
				$(this).height(smallHeight).css("width","auto");
				$(this).css("padding","0px "+Math.floor(Math.abs((smallWidth-$(this).width())/2))+"px");
			}else{
				$(this).css("padding",Math.floor(Math.abs((smallHeight-$(this).height())/2))+"px 0px");
			}
		}
	});
});

