(function(a){a.fn.jQuantifier=function(b){b=a.extend({minimumWidth:300,padding:10},b);return this.each(function(){tw=a(this).width();mc=Math.floor(tw/b.minimumWidth);tc=a(this).children("div").size();if(tc<mc){mw=(tw/tc)-b.padding;cols=tc}else{mw=tw/mc-b.padding;cols=mc}for(var c=0;c<tc;c++){if(c<cols){a(this).children("div").eq(c).width(mw);a(this).children("div").eq(c).find(".prodimg").attr("src",a(this).children("div").eq(c).find(".prodimg").attr("longdesc"));a(this).children("div").eq(c).show()}else{a(this).children("div").eq(c).hide()}}})}})(jQuery);