﻿
        $(document).ready(function () {
            //导航获得焦点
            $("#nav_index").attr("class", "cur");
            //首页左侧菜单加动作mod by isaac
            $("dd.moreProducts").each(function () {
                $(this).mouseover(function () {
                    $(this).children("div.pcdh").show();
                    $(this).find("a.Title").attr("class", "Title cur");
                }).mouseout(function () {
                    $(this).children("div.pcdh").hide();
                    $(this).find("a.Title.cur").attr("class", "Title");
                });
            });
            // 主图片轮换展示
            var first_con_id = $("#slide_lunbo_first").children(".bor_slide").children(".custom_slide").attr("id");
            $("#slide_lunbo_first div:first").imgscroller({
                controllId: first_con_id
            });

            //热门促销图片切换
            $('.Advertising').cycle({
                fx: 'fade',
                timeout: 3000,
                pager: '.slide_trigger',
                pagerEvent: 'mouseover',
                fastOnEvent: true
            });

        });
        //Ajax方法调用后台记录广告点击量方法
        function doRecord(areaid, adid, isrecord) {
            if (isrecord == "True") {
                $.ajax({
                    url: '/Common/doAddClickAdCount',
                    type: 'POST',
                    data: { areaid: areaid, adid: adid },
                    dataType: 'text',
                    success: function (data) {
                        //if (data != undefined)
                        // alert(data);
                    }

                });
            }
            return true;
        }
        //新闻选项卡
        function g(o) { return document.getElementById(o); }
        function tabShow(m, c, n, t) {
            for (i = 1; i <= t; i++) {
                g(m + i).className = "curno";
                g(c + i).style.display = "none";
            }
            g(m + n).className = "cur";
            g(c + n).style.display = "";
        }
        function blgShow(c, n, t) {
            for (i = 1; i <= t; i++) {
                g(c + i).style.display = "none";
            }
            g(c + n).style.display = "";
        }
        function close_ad(id) {
            $("#" + id).hide();
            $.ajax({
                url: '/Home/CloseAd',
                type: 'POST',
                data: { id: id },
                dataType: 'text',
                success: function (data) {
                },
                error: function () {
                }
            });
        }


