



function resizeImages2($, inSelect, inMaxW, inMaxH) {
	$(inSelect).each(function() {
		//$(this).attr({height: "", width: ""});
		$(this).removeAttr("height");
		$(this).removeAttr("width");
		if ($(this).height() > $(this).width()) {
			if ($(this).height() > inMaxH) {
				$(this).height(inMaxH);
			} else if ($(this).width() > inMaxW) {
				$(this).width(inMaxW);
			}
		} else {
			if ($(this).width() > inMaxW) {
				$(this).width(inMaxW);
			} else if ($(this).height() > inMaxH) {
				$(this).height(inMaxH);
			};
		}
		$(this).wrap("<div style='float: left;'>").append("<div style='clear:both;'></div>");
	
	});
}