var goto = {}; goto["link0"] = "/go?to=http://chel.dipo.ru/company/firm_2215_uralspectehnika"; goto["link1"] = "/go?to=http://chel.dipo.ru/company/firm_2215_uralspectehnika"; goto["link2"] = "/go?to=http://ust.akent.ru/contact"; goto["link3"] = "/go?to=http://chel.dipo.ru/company/firm_2215_uralspectehnika/products"; goto["link4"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39716804_kryshka-dugla-vertvneshosn100-v-dvb90h60h100"; goto["link5"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39715136_knopka-zvonka-1-kl-sp-sevil-s-indsimvbels0126"; goto["link6"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39714599_kabel-kpsenga-frls-2h2h05-m-kabelelektrosvjaz"; goto["link7"] = "/go?to=http://ust.akent.ru/product/p39716525_vstavka-plavkaja-ppn-37-315a-gabarit-2-ekf"; goto["link8"] = "/go?to=http://ust.akent.ru/document/info_deliv"; goto["link9"] = "/go?to=http://chel.dipo.ru/company/firm_2029_Elektrooborudovanie-TD"; goto["link10"] = "/go?to=http://chel.dipo.ru/company/firm_2029_Elektrooborudovanie-TD"; goto["link11"] = "/go?to=http://ugm.akent.ru/contact"; goto["link12"] = "/go?to=http://chel.dipo.ru/company/firm_2029_Elektrooborudovanie-TD/products"; goto["link13"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39716525_vstavka-plavkaja-ppn-37-315a-gabarit-2-ekf"; goto["link14"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39716804_kryshka-dugla-vertvneshosn100-v-dvb90h60h100"; goto["link15"] = "http://chel.dipoprom.ru/go?to=http://chel.dipo.ru/product/p39715136_knopka-zvonka-1-kl-sp-sevil-s-indsimvbels0126"; goto["link16"] = "/go?to=http://ugm.akent.ru/product/p3766414_elektrodvigatel-4mtkm-225-l8-im1003-37-700"; goto["link17"] = "/go?to=http://ugm.akent.ru/document/info_deliv"; /** Преобразовать все span в ссылки*/ $("span.jsGoto").each(function(){ var attr_array = ["id","rel","target","class","itempro","data-href","data-id","stype","alt"]; var attr_str = ''; var idspan = $(this).attr("data-span"); var key = 'link'+idspan; var id = $(this).attr("id"); var rel = $(this).attr("rel"); var target = $(this).attr("target"); var clas = $(this).attr("class"); var itemprop = $(this).attr("itemprop"); var href = goto[key]; var dataid = $(this).attr("data-id"); var style = $(this).attr("style"); var alt = $(this).attr("alt"); if (id!=undefined) { attr_str = attr_str+' id="'+id+'"';} if (rel!=undefined) { attr_str = attr_str+' rel="'+rel+'"';} if (target!=undefined) { attr_str = attr_str+' target="'+target+'"';} if (clas!=undefined) { attr_str = attr_str+' class="'+clas+'"';} if (itemprop!=undefined) { attr_str = attr_str+' itemprop="'+itemprop+'"';} if (dataid!=undefined) { attr_str = attr_str+' data-id="'+dataid+'"';} if (style!=undefined) { attr_str = attr_str+' style="'+style+'"';} if (alt!=undefined) { attr_str = attr_str+' alt="'+alt+'"';} if (href!=undefined) { attr_str = attr_str+' href="'+href+'"';} $(this).replaceWith(""+$(this).html()+""); });