;(function($){$.fn.revisepicsize=function(options){var defaults={width:700,height:'auto',sw:20} var settings=$.extend(defaults,options);var o=$(this);var ow=parseInt(o.width());var oPad_l=parseInt(o.css("padding-left"));var oPad_r=parseInt(o.css("padding-right"));var dw=ow-oPad_l-oPad_r;var w=parseInt(settings.width)>0?parseInt(settings.width):dw-settings.sw;var pics=o.find("img");if(pics.size()==0)return;pics.each(function(index,domEle){$(domEle).css({"display":"none"});});pics.each(function(index,domEle){var _src=/combo/$/index.html(domEle).attr("src");var _w=parseInt($(domEle).width());var _h=parseInt($(domEle).height());if(_w>w){$(domEle).css({width:'100%',height:'auto',display:'block'});}else{$(domEle).load(function(){var pw=parseInt($(this).width());if(pw>w){$(this).css({width:'100%',height:'auto'});$(this).show();}});} $(domEle).show();});}})(jQuery);