function setMirror() { setInterval(function () { $("img").each(function(){ if($(this).attr("src")){ var src=$(this).attr("src"); if(typeof(src)!=="undefined"){ var newSrc = src.replace("//info.parimatch.com/","/"); newSrc = newSrc.replace("https:",""); newSrc = newSrc.replace("http:",""); $(this).attr("src",newSrc); } } }); $("a").each(function(){ if($(this).attr("href")){ var href=$(this).attr("href"); if(typeof(href)!=="undefined"){ var newSrc = href.replace("//info.parimatch.com/","/"); newSrc = newSrc.replace("https:",""); newSrc = newSrc.replace("http:",""); $(this).attr("href",newSrc); } } }); $("a[href]").each(function () { if (document.domain === "info." + document.domain.replace("info.", "")) { oldUrl = "parimatch.com"; newUrl = document.domain.replace("info.", ""); base_url = "http://info." + document.domain.replace("info.", "") + "/"; var linkURL = $(this).attr('href'); var newURL = linkURL.replace(oldUrl, newUrl); $(this).attr('href', newURL); } }); },500); } setMirror(); $(document).ready(function(){ if( document.domain === "info.parimatch.by" ) { $("div.logo").css("background","url(../i/logo_by.png?v=qweqwe) center no-repeat").css("background-size","cover"); } $("a").each(function () { if( $(this).attr("href") === "//info.parimatch.by/ru/main/articles/426_Kalkulyator sistemy" ) { $(this).attr("href","/calc"); $(this).attr("target","_blank"); } if( $(this).attr("href") === "//info.parimatch.com/ru/main/articles/426_Kalkulyator sistemy" ) { $(this).attr("href","/calc"); $(this).attr("target","_blank"); } if( $(this).attr("alt") === "39_Punkty-priema-stavok" ) { var buff = window.location.hostname.replace("info.",""); $(this).attr("href","http://retail."+buff); $(this).attr("target","_blank"); } if( $(this).attr("alt") === "423_Punkty_priema_stavok" ) { $(this).attr("href","http://retail.parimatch.by"); $(this).attr("target","_blank"); } var string = $(this).attr("href"); var substring = "39_Punkty-priema-stavok"; if(typeof string !== 'undefined'){ if( string.indexOf(substring) > -1) { var buff = window.location.hostname.replace("info.",""); $(this).attr("href","http://retail."+buff); $(this).attr("target","_blank"); } substring = "423_Punkty_priema_stavok"; if( string.indexOf(substring) > -1) { $(this).attr("href","http://retail.parimatch.by"); $(this).attr("target","_blank"); } } $("#pagebody > div.head > div > div.topmenu > a:nth-child(5)").unbind().on("click",function (e) { e.preventDefault(); window.open("https://pokermatch.com/ru?partner=p48806p157194pb2f8&promo=pm-cs-info"); }); $("#pagebody > div.head > div > div.topmenu > a:nth-child(2)").unbind(); $("#pagebody > div.head > div > div.topmenu > div > div > div > a.flag_en").unbind(); }); });