﻿(function ($) {

    $.fn.roundCorner = function (options) {
        return this.each(function () {
            $.roundCorner(this, options);
        });
    };

    $.roundCorner = function (container, options) {

        var settings = {
            'tl': true,
            'tr': true,
            'bl': true,
            'br': true
        };

        if (options)
            $.extend(settings, options);

        var html = '';

        if (settings.tl) {
            html += '<div class="box-tl"></div>';
        }
        if (settings.tr) {
            html += '<div class="box-tr"></div>';
        }
        if (settings.bl) {
            html += '<div class="box-bl"></div>';
        }
        if (settings.br) {
            html += '<div class="box-br"></div>';
        }

        $(container).append(html);
    };
})(jQuery);

