$(document).ready(function() { var $BranchCat = {}; $BranchCat[2034] = {name:'YDM - 84',color:'',iteration:2}; $BranchCat[2003] = {name:'QDM - 5',color:'#fff600',iteration:3}; $BranchCat[2004] = {name:'KAFE - 84',color:'',iteration:4}; $BranchCat[2005] = {name:'SUPERMARKET - 8',color:'#00FFCC',iteration:5}; $BranchCat[2006] = {name:'AVTOYUMA - 57',color:'#0060FF',iteration:6}; $BranchCat[2007] = {name:'MOTEL - 7',color:'#B400FF',iteration:7}; $BranchCat[2008] = {name:'TIR-PARK - 1',color:'#D6E592',iteration:8}; $BranchCat[2009] = {name:'SIĞORTA - 83',color:'#FF33E0',iteration:9}; $BranchCat[2010] = {name:'AZPETROL KARTLARINA XİDMƏT - 84',color:'',iteration:10}; $BranchCat[2011] = {name:'BANK KARTLARINA XİDMƏT - 84',color:'',iteration:11}; $BranchCat[2012] = {name:'BANKOMAT - 58',color:'#FFA200',iteration:12}; $BranchCat[2014] = {name:'MOBİL DANIŞIQ KARTLARI - 84',color:'',iteration:13}; $BranchCat[2015] = {name:'MARKET - 9',color:'#9D473E',iteration:14}; $BranchCat[2016] = {name:'TƏKƏR MARKET - 1',color:'#FFE98F',iteration:15}; $BranchCat[2017] = {name:'AVTOMARKET - 2',color:'#004c3f',iteration:16}; var $Branch = {}; $Branch[1] = {id:1,name:'Spartak',lng:'49.82626',lat:'40.38916',phone:'(012) 436-95-37',image:'branch/1/Spartak_1470928415.jpg',address:'Bakı şəh., Tbilisi pr. 1013-cü məhəllə',cats:[2004,2006,2009,2010,2011,2012,2014,2015,2034]}; $Branch[2] = {id:2,name:'Ələt',lng:'49.42674',lat:'40.01013',phone:'(050) 218-57-79',image:'branch/2/Elet_1470928348.jpg',address:'Bakı şəh., Qaradağ rayonu, Ələt qəsəbəsi, Bakı-Salyan şossesi 66-cı km',cats:[2004,2009,2010,2011,2012,2014,2015,2034]}; $Branch[3] = {id:3,name:'Cəlilabad',lng:'48.5376',lat:'39.3709',phone:'(050) 221-19-47',image:'branch/3/Celilabad_1470928287.jpg',address:'Cəlilabad rayonu, Alar kəndi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[4] = {id:4,name:'Karl Marks pr.',lng:'49.83437',lat:'40.41113',phone:'(012) 561-33-29',image:'branch/4/Karl_Marks_1470928219.jpg',address:'Bakı şəh., Binəqədi rayonu, K.Marks pr. 3023-ci məhəllə ',cats:[2004,2009,2010,2011,2012,2014,2015,2016,2034]}; $Branch[5] = {id:5,name:'Sumqayıt-1',lng:'49.63195',lat:'40.56755',phone:'(012) 447-41-48',image:'branch/5/Sumqayit-1_1470928068.jpg',address:'Sumqayıt şəhəri, Bakı-Quba şossesinin 30-cu km',cats:[2004,2005,2009,2010,2011,2012,2014,2015,2034]}; $Branch[6] = {id:6,name:'Qələbə',lng:'49.80791',lat:'40.38905',phone:'(012) 434-63-11',image:'branch/6/Qelebe_1470927967.jpg',address:'Bakı şəh., Yasamal rayonu, H.Zərdabi pr. 593-cü məhəllə ',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[8] = {id:8,name:'Gənclik',lng:'49.84848',lat:'40.39938',phone:'(012) 441-01-98/90',image:'branch/8/Genclik_1470927884.jpg',address:'Bakı şəh., Nərimanov rayonu, Vaqif küçəsi 881-884-cü məhəllə',cats:[2004,2009,2010,2011,2012,2014,2015,2034]}; $Branch[9] = {id:9,name:'Sumqayıt-2',lng:'49.68399',lat:'40.57924',phone:'(012) 409-20-69',image:'branch/9/Sumqayit-2_1470927810.jpg',address:'Sumqayıt şəh., 5-ci mkr., Nərimanov küç.',cats:[2004,2006,2009,2010,2011,2012,2014,2015,2034]}; $Branch[10] = {id:10,name:'Kürdəmir',lng:'48.15299',lat:'40.33595',phone:'(020) 255-51-32',image:'branch/10/Kurdemir_1470927720.jpg',address:'Kürdəmir rayonu, Kürdəmir şəh., Bakı pr.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[11] = {id:11,name:'Göyçay',lng:'47.75073',lat:'40.63625',phone:'(020) 274-89-77',image:'branch/11/Goychay_1470927467.jpg',address:'Göyçay rayonu, Göyçay şəh., 42-ci məhəllə',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[12] = {id:12,name:'Yevlax',lng:'47.14556',lat:'40.59893',phone:'(022) 336-30-39',image:'branch/12/Yevlax_1470927275.jpg',address:'Yevlax rayonu, Traktor mühərrikləri təmiri zavodunun yanı',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[13] = {id:13,name:'Ucar',lng:'47.66069',lat:'40.49465',phone:'(020) 213-01-23',image:'branch/13/Ucar_1470927184.jpg',address:'Ucar rayonu, Bakı-Gəncə şössesi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[14] = {id:14,name:'Ramal',lng:'49.82809',lat:'40.33748',phone:'(012) 497-46-73',image:'branch/14/Ramal_1470927104.jpg',address:'Bakı şəh., Səbayıl rayonu, Neftçilər pr. 677-ci məhəllə ',cats:[2004,2006,2009,2010,2011,2012,2014,2015,2034]}; $Branch[15] = {id:15,name:'Şamaxı',lng:'48.62951',lat:'40.63234',phone:'(020) 265-15-09',image:'branch/15/Shamaxi_1470927027.jpg',address:'Şamaxı rayonu, Bakı-Şamaxı şossesi, 44-cü məhəllə',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[16] = {id:16,name:'Tovuz',lng:'45.61496',lat:'41.0131',phone:'(022) 317-31-99',image:'branch/16/Tovuz_1470926908.jpg',address:'Tovuz rayonu, Bakı-Qazax şossesi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[17] = {id:17,name:'Qazax',lng:'45.3434',lat:'41.10901',phone:'(022) 295-52-11; (022) 295-52-06 (motel)',image:'branch/17/Qazax_1470926819.jpg',address:'Qazax rayonu, Bakı-Tbilisi şossesi',cats:[2004,2006,2007,2008,2009,2010,2011,2012,2014,2034]}; $Branch[18] = {id:18,name:'Xaçmaz',lng:'48.79286',lat:'41.44953',phone:'(023) 325-56-86',image:'branch/18/Xachmaz_1470926728.jpg',address:'Xaçmaz rayonu, Xaçmaz-Gəndob yolunun 1-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[19] = {id:19,name:'Quba',lng:'48.54838',lat:'41.36367',phone:'(023) 335-00-33',image:'branch/19/Quba_1470926633.jpg',address:'Quba şəh., Azərbaycan pr., 31-ci məhəllə',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[20] = {id:20,name:'Zaqatala',lng:'46.62086',lat:'41.6313',phone:'(024) 224-00-30',image:'branch/20/Zaqatala_1470926526.jpg',address:'Zaqatala rayonu, Zaqatala-Balakən yolunun 2-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[21] = {id:21,name:'Şəki',lng:'47.14229',lat:'41.06429',phone:'(024) 243-82-25',image:'branch/21/Sheki-1_1470926413.jpg',address:'Şəki rayonu, Şəki-Yevlax şosse yolu',cats:[2004,2006,2007,2009,2010,2011,2012,2014,2034]}; $Branch[23] = {id:23,name:'Əhmədli',lng:'49.95432',lat:'40.39463',phone:'(012) 376-41-31',image:'branch/23/Ehmedli_1470926216.jpg',address:'Bakı şəh., Xətai rayonu, M.Hadi küç. ilə Babək pr. kəsişdiyi ərazidəki 2316-cı məhəllə',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[24] = {id:24,name:'Şirvan',lng:'48.93597',lat:'39.95408',phone:'(021) 215-04-24',image:'branch/24/Shirvan_1470926116.jpg',address:'Şirvan şəh., Ağamirzə Əhmədov pr.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[25] = {id:25,name:'İmişli',lng:'48.06724',lat:'39.79006',phone:'(050) 218-57-90',image:'branch/25/Imishli_1470926040.jpg',address:'İmişli rayonu, Bəhramtəpə avtomobil yolu ilə Qaradonlu yolunun kəsişməsi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[26] = {id:26,name:'Mingəçevir',lng:'47.03261',lat:'40.77045',phone:'(024) 274-00-26',image:'branch/26/Mingechevir_1470925947.jpg',address:'Mingəçevir şəh., Gəncə şossesi 7',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[27] = {id:27,name:'Lənkəran',lng:'48.82861',lat:'38.77317',phone:'(025) 254-27-42',image:'branch/27/Lenkeran_1470925823.jpg',address:'Lənkəran şəh., Lənkəran-Astara avtomobil yolu',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[28] = {id:28,name:'Bakıxanov',lng:'49.95193',lat:'40.41376',phone:'(012) 520-69-27',image:'branch/28/Bakixanov_1470925671.jpg',address:'Bakı şəh., Nizami rayonu, Rüstəmov küçəsi 2500/24 məhəllə ',cats:[2004,2006,2009,2010,2011,2012,2014,2015,2034]}; $Branch[31] = {id:31,name:'Balakən',lng:'46.4282',lat:'41.70304',phone:'(024) 295-53-13',image:'branch/31/Balaken_1470925560.jpg',address:'Balakən rayonunun ərazisində',cats:[2004,2006,2007,2009,2010,2011,2012,2014,2034]}; $Branch[32] = {id:32,name:'Qusar-SDK',lng:'48.46449',lat:'41.44162',phone:'(023) 389-03-01',image:'branch/32/Samur_1470925488.jpg',address:'Qusar rayonu, Samur qəsəbəsi',cats:[2004,2006,2007,2009,2010,2011,2012,2014,2034]}; $Branch[33] = {id:33,name:'Astara',lng:'48.86873',lat:'38.47304',phone:'(025) 225-41-99',image:'branch/33/Astara_1470925363.jpg',address:'Astara şəh., N.Nərimanov küç. 24',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[34] = {id:34,name:'Bərdə',lng:'47.13492',lat:'40.37563',phone:'(020) 205-00-34',image:'branch/34/Berde_1470925296.jpg',address:'Bərdə şəh., Bərdə-Yevlax şossesi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[35] = {id:35,name:'Gəncə',lng:'46.40501',lat:'40.68478',phone:'(022) 257-37-00',image:'branch/35/Gence-35_1470925090.jpg',address:'Gəncə şəh., Bakı şossesinin sol kənarı',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[36] = {id:36,name:'Dərnəgül',lng:'49.86362',lat:'40.41788',phone:'(012) 447-56-39',image:'branch/36/Dernegul_1470924950.jpg',address:'Bakı şəh., Nərimanov rayonu, Z.Bünyadov pr.',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[37] = {id:37,name:'Babək',lng:'49.90804',lat:'40.39118',phone:'(012) 447-56-33',image:'branch/37/Babek_1470924871.jpg',address:'Bakı şəh., Nizami rayonu, Babək pr., 2676-cı məhəllə',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[38] = {id:38,name:'Maştağa',lng:'49.97392',lat:'40.50517',phone:'(012) 447-50-08',image:'branch/38/Mashtaga_1470924753.jpg',address:'Bakı şəh., Sabunçu rayonu, Maştağa qəs., Bakı-Maştağa yolunun cənub-şərqi ',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[39] = {id:39,name:'Binəqədi',lng:'49.84401',lat:'40.44808',phone:'(012) 447-56-41',image:'branch/39/Bineqedi_1470924671.jpg',address:'Bakı şəh., Binəqədi rayonu, Binəqədi şossesinin şərq hissəsi ',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[40] = {id:40,name:'Nobel',lng:'49.88272',lat:'40.37887',phone:'(012) 447-56-28',image:'branch/40/Nobel_1470924563.jpg',address:'Bakı şəh., Xətai rayonu, Fəhlə pr. 1240-cı məhəllə',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[41] = {id:41,name:'Salyan',lng:'48.96917',lat:'39.57896',phone:'(021) 255-36-61',image:'branch/41/Salyan_1470924457.jpg',address:'Salyan rayonu, Bakı-Astara yolunun 130-cu km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[42] = {id:42,name:'Horadiz',lng:'47.32512',lat:'39.45618',phone:'(026) 315-53-52',image:'branch/42/Horadiz_1470924350.jpg',address:'Fizuli rayonu, Horadiz qəsəbəsi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[43] = {id:43,name:'Şabran',lng:'48.9955',lat:'41.19054',phone:'(023) 353-28-64',image:'branch/43/Shabran_1470924245.jpg',address:'Şabran rayonu, Bakı-Quba yolunun 118-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[44] = {id:44,name:'Ozon',lng:'49.80119',lat:'40.40041',phone:'(012) 433-68-80',image:'branch/44/Ozon_1470924140.jpg',address:'Bakı şəh., Yasamal rayonu, Şərifzadə küç.',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[45] = {id:45,name:'Günəşli',lng:'49.97596',lat:'40.38678',phone:'(012) 477-14-59',image:'branch/45/Guneshli_1470924047.jpg',address:'Bakı şəh., Suraxanı rayonu, Yeni Günəşli qəs., ',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[47] = {id:47,name:'Goranboy',lng:'46.67552',lat:'40.64433',phone:'(022) 247-65-56',image:'branch/47/Goran_1470923887.jpg',address:'Goranboy rayonu, Bakı-Gəncə yolunun sağ hissəsi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[48] = {id:48,name:'Qax',lng:'46.90355',lat:'41.41649',phone:'(024) 255-59-26',image:'branch/48/Qax_1470922027.jpg',address:'Qax şəh., Gənclik yaşayış məntəqəsi, 20 Yanvar küç. şimalında',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[49] = {id:49,name:'Oğuz',lng:'47.42279',lat:'41.05237',phone:'(024) 215-31-84',image:'branch/49/Oguz_1470921892.jpg',address:'Oğuz rayonu, Oğuz-Calud və Şəmkir-Bayan yollarının kəsişməsi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[50] = {id:50,name:'Qəbələ',lng:'47.83536',lat:'40.96511',phone:'(024) 205-05-12',image:'branch/50/Qebele_1470918642.jpg',address:'Qəbələ şəh., İsmayılbəy Qutqaşınlı küç.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[51] = {id:51,name:'Şəmkir-Dəllər',lng:'46.03472',lat:'40.85217',phone:'(022) 305-31-71',image:'branch/51/Shemkir-Deller_1470918423.jpg',address:'Şəmkir rayonu, Bakı-Qazax magistral yolunun sol tərəfində Şəmkir-Dəllər yolu ilə kəsişdiyi yerdən 200 m aralı',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[52] = {id:52,name:'Şəmkir-Q',lng:'46.22226',lat:'40.73562',phone:'(050) 225-08-56',image:'branch/52/Shemkir-Q_1470918214.jpg',address:'Şəmkir rayonu, Bakı-Qazax magistral yolu ilə Şəmkir-Tovuz yolunun kəsişdiyi yer',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[53] = {id:53,name:'Mayak',lng:'49.73311',lat:'40.2859',phone:'(012) 447-51-29',image:'branch/53/Mayak_1470918023.jpg',address:'Bakı şəh., Qaradağ rayonu, Puta mayakın şimal-qərb hissəsi, Bakı-Salyan şosessinin şimal-qərbi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[54] = {id:54,name:'Sabirabad',lng:'48.45468',lat:'39.97764',phone:'(021) 235-71-96',image:'branch/54/Sabirabad_1470917844.jpg',address:'Sabirabad rayonu, Qalaqayın kəndi, Qazıməmməd-Qaratəpə-Bəhramtəpə avtomobil yolunun sağ tərəfində',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[55] = {id:55,name:'Babək-QDM',lng:'49.90792',lat:'40.39114',phone:'(012) 447-16-12',image:'branch/55/Babek-QDM_1470917737.jpg',address:'Bakı şəh., Nizami rayonu, Babək pr., 2676-77-ci məhəllə',cats:[2003,2010,2011]}; $Branch[57] = {id:57,name:'Nobel-QDM',lng:'49.88226',lat:'40.37881',phone:'(012) 447-15-92',image:'branch/57/Nobel-QDM_1470917608.jpg',address:'Bakı şəh., Xətai rayonu, Fəhlə pr. 1240-cı məhəllə',cats:[2003,2010,2011]}; $Branch[58] = {id:58,name:'Mayak-QDM',lng:'49.73331',lat:'40.28598',phone:'(012) 447-51-29',image:'branch/58/Mayak-QDM_1470917474.jpg',address:'Bakı şəh., Qaradağ rayonu, Puta mayakın şimal-qərb hissəsi, Bakı-Salyan şosessinin şimal-qərbi',cats:[2003,2010,2011]}; $Branch[59] = {id:59,name:'Gəncə-Nizami',lng:'46.48804',lat:'40.68925',phone:'(050) 225-28-03',image:'branch/59/Gence-Nizami_1470917171.jpg',address:'Goranboy rayonu, Nizami kəndi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[60] = {id:60,name:'Gəncə-Büllur',lng:'46.33177',lat:'40.69365',phone:'(022) 264-37-00',image:'branch/60/Gence-Billur_1470916895.jpg',address:'Gəncə şəh., Şəmkir yolunun sağ tərəfi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[61] = {id:61,name:'Masallı',lng:'48.68508',lat:'39.03461',phone:'(025) 215-16-78',image:'branch/61/Masalli_1470916778.jpg',address:'Masallı rayonu, Bakı-Astara şossesinin 237-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[62] = {id:62,name:'Ağdaş',lng:'47.49188',lat:'40.64128',phone:'(020) 235-31-62',image:'branch/62/Agdash_1470916676.jpg',address:'Ağdaş rayonu, Maşad kəndi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[63] = {id:63,name:'Təzə Şilyan',lng:'47.93738',lat:'40.42862',phone:'(050) 225-08-45',image:'branch/63/Teze_Shilyan_1470914992.jpg',address:'Ucar rayonu, Təzə Şilyan kəndi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[64] = {id:64,name:'Muğan',lng:'48.85122',lat:'40.08083',phone:'(050) 235-43-91',image:'branch/64/Mugan_1470914392.jpg',address:'Hacıqabul rayonu, Muğan qəsəbəsi, Ələt-Yevlax yolunun 59,5 km',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[65] = {id:65,name:'Padar',lng:'48.52746',lat:'40.21558',phone:'(050) 225-28-07',image:'branch/65/Padar_1470914022.jpg',address:'Hacıqabul rayonu, Padar qəsəbəsi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[66] = {id:66,name:'Goran',lng:'46.93817',lat:'40.63703',phone:'(050) 225-28-25',image:'branch/66/Goran_1470913943.jpg',address:'Goranboy rayonu, Məşədiqaralar kəndi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[67] = {id:67,name:'Biləsuvar',lng:'48.55416',lat:'39.44136',phone:'(025) 295-15-75',image:'branch/67/Bilesuvar_1470913793.jpg',address:'Biləsuvar rayonu',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[68] = {id:68,name:'Neftçala',lng:'49.24587',lat:'39.39693',phone:'(021) 263-45-50',image:'branch/68/Neftchala_1470913710.jpg',address:'Neftçala rayonu, H.Əliyev pr.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[69] = {id:69,name:'Siyəzən',lng:'49.09527',lat:'41.09428',phone:'(050) 255-44-58',image:'branch/69/Siyezen_1470913572.jpg',address:'Siyəzən rayonu',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[70] = {id:70,name:'Xudat',lng:'48.69547',lat:'41.6066',phone:'(050) 268-17-07',image:'branch/70/Xudat_1470913479.jpg',address:'Xaçmaz rayonu, Xudat qəsəbəsi',cats:[2004,2009,2010,2011,2012,2014,2034]}; $Branch[71] = {id:71,name:'Saatlı',lng:'48.35495',lat:'39.92138',phone:'(021) 285-26-51',image:'branch/71/Saatli_1470913403.jpg',address:'Saatlı rayonu, H.Əliyev pr.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[72] = {id:72,name:'Göyşaban',lng:'48.81617',lat:'38.84853',phone:'(021) 285-26-51',image:'branch/72/Goyshaban_1470913332.jpg',address:'Lənkəran rayonu, Göyşaban kəndi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[73] = {id:73,name:'Xaldan',lng:'47.22494',lat:'40.70528',phone:'(050) 245-25-03',image:'branch/73/Xaldan_1470913218.jpg',address:'Yevlax rayonu, Xaldan kəndi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[74] = {id:74,name:'Qusar',lng:'48.42882',lat:'41.63299',phone:'(023) 385-56-30',image:'branch/74/Qusar_1470913111.jpg',address:'Qusar rayonu, N.Şərifov küç.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[75] = {id:75,name:'Qusar-QDM',lng:'48.46463',lat:'41.44147',phone:'(023) 385-57-86',image:'branch/75/Qusar-QDM_1470913058.jpg',address:'Qusar rayonu, N.Şərifov küç.',cats:[2003,2010,2011]}; $Branch[76] = {id:76,name:'Mərdəkan',lng:'50.09287',lat:'40.46781',phone:'(012) 456-50-43',image:'branch/76/Merdekan_1470912886.jpg',address:'Bakı şəh., Xəzər rayonu, Qala qəsəbəsi',cats:[2004,2005,2009,2010,2011,2012,2014,2034]}; $Branch[77] = {id:77,name:'Mərdəkan-QDM',lng:'50.09381',lat:'40.46821',phone:'(012) 456-50-43',image:'branch/77/Merdekan_QDM_1470912851.jpg',address:'Bakı şəh., Xəzər rayonu, Qala qəsəbəsi',cats:[2003,2010,2011,2015]}; $Branch[78] = {id:78,name:'Şabran-2',lng:'48.99611',lat:'41.19109',phone:'(023) 353-28-64',image:'branch/78/Shabran-2_1470912034.jpg',address:'Şabran rayonu, Bakı-Quba yolunun 118-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[79] = {id:79,name:'Ağsu',lng:'48.38352',lat:'40.58016',phone:'(020) 226-49-99',image:'branch/79/Agsu_1470911740.jpg',address:'Bakı-Şamaxı-Yevlax yolunun cənub tərəfi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[80] = {id:80,name:'Cəngi',lng:'49.26415',lat:'40.50237',phone:'(050) 282-71-07',image:'branch/80/Cengi_1470911651.jpg',address:'Qobustan rayonu, Bakı-Şamaxı yolunun 57-ci km, Cəngi yaşayış sahəsi',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[81] = {id:81,name:'Göygöl',lng:'46.32382',lat:'40.60431',phone:'(050) 280-97-27',image:'branch/81/Goygol_1470911555.jpg',address:'Göygöl şəh., Nizami küç. 21',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[82] = {id:82,name:'İsmayıllı',lng:'48.18527',lat:'40.7871',phone:'(020) 285-71-69',image:'branch/82/Ismayilli_1470911440.jpg',address:'İsmayıllı şəh., Mahmudov küç.',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[83] = {id:83,name:'Şəki-2',lng:'47.18724',lat:'41.15599',phone:'(024) 245-22-02',image:'branch/83/Sheki-2_1470911341.jpg',address:'Şəki şəh., 101-ci kvartal',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[84] = {id:84,name:'H.Əliyev pr. 105',lng:'49.89335',lat:'40.41045',phone:'(012) 567-16-51; (012) 567-20-48',image:'branch/84/H.Aliyev_105_1470908772.jpg',address:'Bakı şəh., H.Əliyev pr. 105',cats:[2004,2006,2009,2010,2011,2012,2014,2017,2034]}; $Branch[85] = {id:85,name:'H.Əliyev pr. 108',lng:'49.91241',lat:'40.41823',phone:'(012) 514-90-34',image:'branch/85/H.Aliyev_108_1470908626.jpg',address:'Bakı şəh., H.Əliyev pr. 108',cats:[2004,2006,2009,2010,2011,2012,2014,2017,2034]}; $Branch[86] = {id:86,name:'Sumqayıt-3',lng:'49.53178',lat:'40.64809',phone:'(050) 291-57-62',image:'branch/86/Sumgayit-3_1470908299.jpg',address:'Sumqayıt şəh., Bakı-Quba avtomobil yolunun 45-ci km, yolun sol tərəfi',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[87] = {id:87,name:'Şəmkir-Mərkəz',lng:'46.02768',lat:'40.84554',phone:'(022) 305-25-01',image:'branch/87/Shemkir-Merkez_1470908175.jpg',address:'Şəmkir şəh., H.Əliyev pr. 9',cats:[2004,2005,2006,2009,2010,2011,2012,2014,2034]}; $Branch[88] = {id:88,name:'Şamaxı-Mərkəz',lng:'48.64897',lat:'40.62097',phone:'(020) 265-73-83',image:'branch/88/Shamaxi-Merkez_1470908055.jpg',address:'Şamaxı şəh., S.Ə.Şirvani küç. 9',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[89] = {id:89,name:'Mingəçevir-2',lng:'47.08775',lat:'40.75609',phone:'(024) 275-00-40',image:'branch/89/Mingechevir-2_1470907964.jpg',address:'Yevlax rayonu, Havarlı kəndi',cats:[2004,2006,2007,2009,2010,2011,2012,2014,2034]}; $Branch[90] = {id:90,name:'Beyləqan',lng:'47.60623',lat:'39.75568',phone:'(012) 585-41-04; (021) 225-27-51 (motel)',image:'branch/90/Beylaqan_1470907848.jpg',address:'Beyləqan şəh., Beyləqan-Daşburun avtomobil yolunun sol tərəfi',cats:[2004,2006,2007,2009,2010,2011,2012,2014,2034]}; $Branch[91] = {id:91,name:'Gəncə-Mərkəz',lng:'46.3844',lat:'40.69005',phone:'(022) 257-00-93; (022) 257-00-92 (motel)',image:'branch/91/Gence-Merkez_1470907726.jpg',address:'Gəncə şəh., Kəpəz rayonu, Xətai pr. Ilə Tağı Aranı küç. kəsişməsi',cats:[2004,2007,2009,2010,2011,2012,2014,2034]}; $Branch[92] = {id:92,name:'Samux',lng:'46.39031',lat:'40.74235',phone:'(022) 275-20-90',image:'branch/92/Samux_1470907099.jpg',address:'Samux şəh.',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[94] = {id:94,name:'Mayak-2',lng:'49.755333',lat:'40.296750',phone:'(012) 565-60-91',image:'branch/94/Mayak_small_1510239999.jpg',address:'Bakı şəhəri, Qaradağ r-nu, Salyan şossesi 15-ci km',cats:[2004,2006,2009,2010,2011,2012,2014,2015,2034]}; $Branch[95] = {id:95,name:'Masazır',lng:'49.753056',lat:'40.511750',phone:'(012) 409-13-93',image:'branch/95/Masazir_small_1510240675.jpg',address:'Abşeron rayonu, Saray qəsəbəsi, Villa Badam yaşayış kompleksinin yanı',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; $Branch[96] = {id:96,name:'Siyəzən-2',lng:'49.070969',lat:'41.143615',phone:'023-306-51-03',image:'branch/96/fon--foto_1530168630.png',address:'Siyəzən rayonu, Yeni Kənd kəndi, Baki-Quba yolunun sol tərəfi',cats:[2004,2006,2009,2010,2011,2012,2014,2034]}; var $byCat = {}; $byCat[2004] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2006] = [0,1,3,6,9,10,11,12,13,14,15,16,17,18,19,20,21,24,25,26,27,28,31,32,33,34,35,38,40,41,43,47,48,49,50,51,54,60,61,67,68,69,71,72,73,74,78,79,80,81,82,83,84,85,86,87,88,89,90,92,94,95,96]; $byCat[2009] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2010] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2011] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2012] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2014] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2015] = [0,1,2,4,5,8,9,14,28,77,94]; $byCat[2034] = [0,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,48,49,50,51,52,53,54,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,94,95,96]; $byCat[2016] = [0,4]; $byCat[2005] = [0,5,76,80,81,82,83,86,87]; $byCat[2007] = [0,17,21,31,32,89,90,91]; $byCat[2008] = [0,17]; $byCat[2003] = [0,55,57,58,75,77]; $byCat[2017] = [0,84,85]; var $byCity = {}; $byCity[2038] = [0,59,91,60,35]; $byCity[0] = [0,59,91,60,35,92,79,3,86,5,9,10,11,73,12,63,13,88,15,16,17,70,18,19,20,21,83,24,25,89,26,72,27,31,74,75,32,33,34,41,42,43,78,47,66,48,49,50,87,51,52,54,61,62,64,65,67,68,96,69,71,80,81,82,90]; $byCity[2039] = [0,92]; $byCity[2051] = [0,79]; $byCity[2052] = [0,3]; $byCity[2053] = [0,86,5,9]; $byCity[2054] = [0,10]; $byCity[2055] = [0,11]; $byCity[2056] = [0,73,12]; $byCity[2057] = [0,63,13]; $byCity[2058] = [0,88,15]; $byCity[2059] = [0,16]; $byCity[2060] = [0,17]; $byCity[2061] = [0,70,18]; $byCity[2062] = [0,19]; $byCity[2063] = [0,20]; $byCity[2064] = [0,21,83]; $byCity[2065] = [0,24]; $byCity[2066] = [0,25]; $byCity[2067] = [0,89,26]; $byCity[2068] = [0,72,27]; $byCity[2069] = [0,31]; $byCity[2070] = [0,74,75,32]; $byCity[2071] = [0,33]; $byCity[2072] = [0,34]; $byCity[2073] = [0,41]; $byCity[2074] = [0,42]; $byCity[2075] = [0,43,78]; $byCity[2076] = [0,47,66]; $byCity[2077] = [0,48]; $byCity[2078] = [0,49]; $byCity[2079] = [0,50]; $byCity[2080] = [0,87,51,52]; $byCity[2081] = [0,54]; $byCity[2082] = [0,61]; $byCity[2083] = [0,62]; $byCity[2084] = [0,64,65]; $byCity[2085] = [0,67]; $byCity[2086] = [0,68]; $byCity[2087] = [0,96,69]; $byCity[2088] = [0,71]; $byCity[2089] = [0,80]; $byCity[2090] = [0,81]; $byCity[2091] = [0,82]; $byCity[2092] = [0,90]; $byCity[2040] = [0,36,8,84,85]; $byCity[2037] = [0,36,8,84,85,45,1,57,40,23,39,4,53,2,58,94,14,38,37,55,28,76,77,6,44,95]; $byCity[2041] = [0,45]; $byCity[2042] = [0,1]; $byCity[2043] = [0,57,40,23]; $byCity[2044] = [0,39,4]; $byCity[2045] = [0,53,2,58,94]; $byCity[2046] = [0,14]; $byCity[2047] = [0,38]; $byCity[2048] = [0,37,55,28]; $byCity[2049] = [0,76,77]; $byCity[2050] = [0,6,44]; $byCity[2095] = [0,95]; var map; init_big_map = function () { map = new GMaps({ el: '#map_container', lat: -12.043333, lng: -77.028333, mapTypeControl: false, zoom: 12, scrollwheel: false, //panControl: false, //scaleControl: false, streetViewControl: false, zoomControl: true/*, markerClusterer: function(map) { return new MarkerClusterer(map, null, {imagePath: 'images/gmap/m'}); }*/ }); show_all_markers(); } show_all_markers = function(){ map.removeMarkers(); $('input.mapCat:not(.all)').attr('checked',false); $('input.mapCat.all').attr('checked',true); $('.map-frame').hide(); $Branch_fk_city = $('#Branch_fk_city').val(); var $foreach; if($Branch_fk_city>0){ if(typeof $byCity[$Branch_fk_city] != 'undefined'){ $foreach = $byCity[$Branch_fk_city]; }else{ return; } $('label.control').hide(); $('label.control.label_all').show(); for (var foreach_index in $foreach){ var $id = $foreach[foreach_index]; if($id==0)continue; if(typeof $Branch[$id] != 'undefined'){ $Branch[$id]['cats'].forEach(function(item, index){ $('label.control.label_'+item).show(); }); } } }else{ $('label.control').show(); } for (var $id in $Branch){ if(typeof $foreach == 'undefined' || $.inArray(parseInt($id), $foreach )>-1){ map.addMarker({ lat: $Branch[$id]['lat'], lng: $Branch[$id]['lng'], title: $Branch[$id]['name'], details:{id:$id}, icon: 'https://www.azpetrol.com/images/mapikon.png?aaa', click: function (e) { map.setCenter(e.position.lat(), e.position.lng()); showInfo(e.details.id); } }); } } if (map.markers.length == 1) { map.setCenter(map.markers[0].position.lat(), map.markers[0].position.lng()); } else { map.fitZoom(); } } showInfo = function($id){ $('#map_frame_address').html($Branch[$id]['address']); $('#map_frame_phone').html($Branch[$id]['phone']); if($Branch[$id]['image']!=''){ $('#map_frame_image img').attr('src',''); $('#map_frame_image a').attr('href','https://www.azpetrol.com/uploads/'+$Branch[$id]['image']); $('#map_frame_image img').attr('src','https://www.azpetrol.com/pics/248/165/'+$Branch[$id]['image']); } $('#map_frame_service').html(''); $Branch[$id]['cats'].forEach(function(item, index){ console.log($id, item, index); $('#map_frame_service').append('
  • '); }); $('#map_frame_container').show(); }; init_cat = function(){ map.removeMarkers(); $('.map-frame').hide(); $cat = parseInt($(this).val()); if($(this).hasClass('all')){ if($(this).is(':checked')){ show_all_markers(); } }else{ $('input.mapCat.all').attr('checked',false); $('input.mapCat:checked').each(function () { var $foreach; $Branch_fk_city = $('#Branch_fk_city').val(); if($Branch_fk_city>0){ if(typeof $byCity[$Branch_fk_city] != 'undefined'){ $foreach = $byCity[$Branch_fk_city]; }else{ return; } }else{ $foreach = $byCat[$cat]; } $foreach.forEach(function($id, index){ if($id==0)return; if($.inArray( $cat, $Branch[$id]['cats'] )>-1){ console.log($cat,$Branch[$id]['cats']); map.addMarker({ lat: $Branch[$id]['lat'], lng: $Branch[$id]['lng'], title: $Branch[$id]['name'], details:{id:$id}, icon: 'https://www.azpetrol.com/images/mapikon.png?aaa', click: function (e) { map.setCenter(e.position.lat(), e.position.lng()); showInfo(e.details.id); } }); } }); }); } } init_big_map(); $('input.mapCat').change(init_cat); $('#Branch_fk_city').change(show_all_markers); });