// ----------------------------------------------------------------------------
// MJL
// ----------------------------------------------------------------------------
MJL.event.add(window, "load", function() {
    MJL.enable.heightEqualizer("list-products-01", {
        groupBy: 4,
        collect: function (parent) {
            return parent.getElementsByTagName("div");
        }
    });
    MJL.enable.window("popup-01", {
        width: 640,
        height: 600,
        toolbar: "no"
    });
    MJL.enable.rollover("roll");
});


// ----------------------------------------------------------------------------
// Extend Scripts with jQuery
// ----------------------------------------------------------------------------
"jQuery" in window && (function($) {
    // DOM構築完了時の処理
    $(function() {
        $("a").blankwindow();
        $("#detail .image").imageselector({
            spacerImage:  "/user_data/packages/default/img/common/spacer.gif",
            loadingImage: "/user_data/packages/default/img/common/vis_loading.gif",
            errorImage:   "/user_data/packages/default/img/common/vis_error_01.jpg"
        });

        // スタイリング補助
        if (MJL.ua.trident && MJL.ua.version <= 8) {
            $(".tbl-data-01 thead th:last-child").addClass("last-child");
            $(".tbl-cart-01 th:last-child, .tbl-cart-01 td:last-child").addClass("last-child");
        }

        if (MJL.ua.trident && MJL.ua.version === 6) {
            $(".list-products-01 li:nth-child(4n)").addClass("nth-child-4n");
        }
    });
}(jQuery));

