/* Minification failed. Returning unminified contents.
(2,20): run-time error CSS1031: Expected selector, found '='
(2,20): run-time error CSS1025: Expected comma or open brace, found '='
(45,1): run-time error CSS1019: Unexpected token, found '$'
(45,2): run-time error CSS1019: Unexpected token, found '('
(45,12): run-time error CSS1031: Expected selector, found '('
(45,12): run-time error CSS1025: Expected comma or open brace, found '('
(47,2): run-time error CSS1019: Unexpected token, found ')'
 */

var bannerPromoWeb = {
    init: function () {
        var box = '.banner-promo-container';

        $(box).on('click', '.btnBannerPromoViewDetail', function () {
            var self = this;
            var brandId = $(self).attr('data-brand-id');
            var modelId = $(self).attr('data-model-id');
            bannerPromoWeb.getDetailBannerPromo(brandId, modelId);
        });

    },
    getDetailBannerPromo: function (brandId, modelId) {
        var data = {
            brandId: brandId,
            modelId: modelId,
            isGetDetail: true,
        };

        if (typeof PostForm != 'undefined' && typeof PostForm.LoadPopupFromUrl != 'undefined') {
            PostForm.LoadPopupFromUrl('/Banner/BannerPromo', data, function () {
                $('#popup').show();
                WebEvent.initFixScrollPopup();
                CommonsEvent.AddNoScroll();
            });
        } else if (typeof loadPopupFromUrl != 'undefined') {
            loadPopupFromUrl('/Banner/BannerPromo', data, function () {

                $(".modal.in").click(function () {
                    ClosePopup();
                });
                $('.close').click(function () {
                    ClosePopup();
                });
                $('.promo-popup').click(function (e) {
                    e.stopPropagation();
                });
                NoScroll();
            });
        }
    }
};

$(function () {
    bannerPromoWeb.init();
});
