$(function () {

    var getsearch_catid_static=false;
    if($('#parentid').length >0){
        if (!getsearch_catid_static){
            //加载栏目下拉
            var getsearch_catid_url='/index.php?case=archive&act=getsearch_catid&ajax=1&shopping='+public_shopping;
            $.ajax({
                type: "get",
                url: getsearch_catid_url,
                async: true,
                success: function (data) {
                    $('#parentid').html(data);
                    var elem=$('#parentid');
                    if(document.createEvent){
                        e.initMouseEvent("mousedown");
                        elem[0].dispatchEvent(e);
                    }else if(element.fireEvent){
                        elem[0].fireEvent("onmousedown");
                    }
                    getsearch_catid_static=true;
                }
            });
        }
    }
    //加载栏目
    var getsearch_catidshopping_static=false;
    if($('#catidshopping').length >0){
        if (!getsearch_catidshopping_static){
            //加载栏目下拉
            var getsearch_catid_url='/index.php?case=archive&act=getsearch_catid&ajax=1&shopping='+public_shopping;
            $.ajax({
                type: "get",
                url: getsearch_catid_url,
                async: true,
                success: function (data) {
                    $('#catidshopping').html(data);
                    getsearch_catidshopping_static=true;
                }
            });
        }
    }


});
