$(function () {
    var n = [
        { key: "www", title: "همه استان‌ها", order: 0 },
        { key: "west-azerbaijan", title: "آذربایجان غربی", order: 9 },
        { key: "east-azerbaijan", title: "آذربایجان شرقی", order: 3 },
        { key: "zanjan", title: "زنجان", order: 18 },
        { key: "isfahan", title: "اصفهان", order: 5 },
        { key: "ardebil", title: "اردبیل", order: 10 },
        { key: "ilam", title: "ایلام", order: 11 },
        { key: "alborz", title: "البرز", order: 8 },
        { key: "bushehr", title: "بوشهر", order: 12 },
        { key: "tehran", title: "تهران", order: 1 },
        { key: "chaharmahal-bakhtiari", title: "چهارمحال و بختیاری", order: 13 },
        { key: "north-khorasan", title: "خراسان شمالی", order: 14 },
        { key: "razavi-khorasan", title: "خراسان رضوی", order: 4 },
        { key: "south-khorasan", title: "خراسان جنوبی", order: 15 },
        { key: "khuzestan", title: "خوزستان", order: 2 },
        { key: "semnan", title: "سمنان", order: 16 },
        { key: "sistan-baluchestan", title: "سیستان و بلوچستان", order: 17 },
        { key: "fars", title: "فارس", order: 7 },
        { key: "qazvin", title: "قزوین", order: 19 },
        { key: "qom", title: "قم", order: 20 },
        { key: "kordestan", title: "کردستان", order: 21 },
        { key: "kerman", title: "کرمان", order: 22 },
        { key: "kermanshah", title: "کرمانشاه", order: 23 },
        { key: "kohgeluyeh-boyer-ahmad", title: "کهگیلویه و بویراحمد", order: 24 },
        { key: "golestan", title: "گلستان", order: 25 },
        { key: "gilan", title: "گیلان", order: 26 },
        { key: "lorestan", title: "لرستان", order: 27 },
        { key: "mazandaran", title: "مازندران", order: 6 },
        { key: "markazi", title: "مرکزی", order: 28 },
        { key: "hormozgan", title: "هرمزگان", order: 29 },
        { key: "hamedan", title: "همدان", order: 30 },
        { key: "yazd", title: "یزد", order: 31 }],
        i = {
            init: function () {
                this.cityList();
                this.map();
                this.testimonial();
                this.categories();
                this.oldMap()
            },
            cityList: function () {
                for (var i = [], r = [], t = 0, u = n.length; t < u; ++t) n[t].order < 10 ? i.push('<li class="col-md-6"><a href="' + UrlScheme + "://" + GetRootHostNameWithListing + n[t].key + '" data-ostan="' + n[t].key + '">' + n[t].title + "<\/a><\/li>") : r.push('<li class="col-md-6"><a href="' + UrlScheme + "://" + GetRootHostNameWithListing + n[t].key + '" data-ostan="' + n[t].key + '">' + n[t].title + "<\/a><\/li>"); $("#primaryRegions").append(i.join("")); $(".othercity").append(r.join("")); $(".city li").find("a").on("mouseover", function () { var n = $(this), t = n.data("ostan"); $(".city li").find("a").removeClass("activearea"); n.addClass("activearea"); $(".area").attr("class", "area"); $(".area[data-area='" + t + "']").attr("class", "area maphover") })
            },
            map: function () {
                $(".area").mousemove(function (t) { var r; t.stopPropagation(); var e = $("body"), i = $(this).data("area"), u = t.pageX - 75, f = t.pageY - 50; $("#maptip").show().css("left", u).css("top", f); r = n.first(function (n) { return n.key == i }); $("#maptip .popover-content").html(r.title); $(".city li").find("a").removeClass("activearea"); $(".city li").find("a[data-ostan='" + i + "']").addClass("activearea") }); $(".area").mouseout(function () { $("#maptip").hide() }); $(".area").on("click", function () { var n = $(this).data("area"), t = UrlScheme + "://" + GetRootHostNameWithListing + n ; window.location = t })
            },
            testimonial: function () {
                var n = Math.floor(Math.random() * testimonials.length + 1) - 1; $(".testimonial img").attr("src", testimonials[n].imageUrl); $(".testimonial .text").text(testimonials[n].text); $(".testimonial .name").text(testimonials[n].name)
            },
            categories: function () {
                for (var i = [], n = 0, r = t.length; n < r; ++n) i.push('<li><a href="/my-ads/post?category=' + t[n].categoryId + '" data-toggle="tooltip" data-placement="bottom" data-original-title=" فروش ' + t[n].display + ' "><div class="ch-item ch-img-' + (n + 1) + '"><div class="ch-info"><span class="sale-info">فروش ' + t[n].display + "<\/span><\/div><\/div><h5>" + t[n].display + "<\/h5><\/a><\/li>"); $(".ch-grid").append(i.join(""))
            },
            oldMap: function () {
                $("#iran").maphilight()
            }
        };
    i.init();
    $(".categoryimg figure").hover(function () {
        $(this).toggleClass("active")
    }); $("body").on("click", ".social-toggle", function (n) { $(this).next().toggleClass("open-menu"); n.preventDefault() }); window.canShowTopMenu(!1)
});
/*
//# sourceMappingURL=index.min.js.map
*/