﻿$.fn.imgLimit = function (larguraMaxima, alturaMaxima) {
    return this.each(function () {

        var imgObj = this;

        if (imgObj.width > larguraMaxima) {
            imgObj.width = larguraMaxima;
        } else {

            if (imgObj.height > alturaMaxima) {
                imgObj.height = alturaMaxima;
            }

        }


    });
}
