String.prototype.supplant=function(o){return this.replace(/{([^{}]*)}/g,function(a,b){var r=o[b];return typeof r==='string'||typeof r==='number'?r:a;});};function readCookie(name){var cookieValue="";var search=name+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;cookieValue=unescape(document.cookie.substring(offset,end))}} return cookieValue;} var price=895.0;var product_type='KEY';var discounts={};var usd_discounts={};var payment_systems={"1":{"multiplier":1.0,"currency":'RUR',"name":'Webmoney WMR',"code":'wmr',"unit":'руб.',"warning":''},"2":{"multiplier":0.0350877192982,"currency":'USD',"name":'Webmoney WMZ',"code":'wmz',"unit":'$',"warning":''},"3":{"multiplier":1.0,"currency":'RUR',"name":'Яндекс.Деньги (Без комиссии)',"code":'yandex',"unit":'руб.',"warning":'При оплате через эту систему срок доставки может быть увеличен на 1-3 часа.'},"4":{"multiplier":1.09,"currency":'RUR',"name":'Карта Visa/Mastercard',"code":'liqpay',"unit":'руб.',"warning":'На этот способ оплаты действует наценка 9%.
Узнать сейчас, как оплачивать без комиссии.'},"5":{"multiplier":1.0,"currency":'RUR',"name":'Qiwi',"code":'qiwi',"unit":'руб.',"warning":''},"6":{"multiplier":0.039298245614,"currency":'USD',"name":'PayPal',"code":'paypal',"unit":'$',"warning":'При оплате через эту систему может потребоваться подтверждение вашей личности с помощью сканов документов.'},"7":{"multiplier":1.108648,"currency":'RUR',"name":'Яндекс.Деньги (Через Робокассу)',"code":'robox',"unit":'руб.',"warning":''},"8":{"multiplier":1.07,"currency":'RUR',"name":'РБК Деньги',"code":'rbkmoney',"unit":'руб.',"warning":''},"9":{"multiplier":1.0,"currency":'RUR',"name":'Другие способы / Оплата с помощью СМС',"code":'robox_sms',"unit":'руб.',"warning":''},"10":{"multiplier":1.02,"currency":'RUR',"name":'Webmoney R',"code":'robox_webmoney_r',"unit":'руб.',"warning":''},"11":{"multiplier":0.0350877192982,"currency":'USD',"name":'Webmoney Z',"code":'robox_webmoney_z',"unit":'$',"warning":''}};var usd_rate=28.5;var v=0;var u=0;var fixed_discount=0;var cd=0;var show_discounts=true;var discounts_tpl="\n \n \n
\n";var discounts_data=[];var form_tpl="\n

\u0422\u0430\u0439\u043c \u043a\u0430\u0440\u0442\u0430 \u043d\u0430 60 \u0434\u043d\u0435\u0439 EU

\n
\n\n\t

\u041a\u0430\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u043f\u043b\u0430\u0442\u044b World of Warcraft 60 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f 60 \u0434\u043d\u0435\u0439 (2 \u043c\u0435\u0441\u044f\u0446\u0430) \u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0443\u0447\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 World of Warcraft \u0438 \u0434\u0430\u0435\u0442 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043b\u044e\u0431\u043e\u043c\u0443 \u0438\u0437 \u043e\u0444\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432.

\r\n\r\n

\u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043a\u0430\u0440\u0442\u044b \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u0439\u0442\u0438 \u043d\u0430 http://eu.battle.net/wow/ru , \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u0441\u0432\u043e\u0438\u043c battle.net - \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u043c \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 ,\u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u0432 \u043f\u043e\u043b\u0435 \"\u041a\u0430\u0440\u0442\u0430 \u043f\u0440\u0435\u0434\u043e\u043f\u043b\u0430\u0442\u044b\". \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u043d\u0435\u0445\u0438\u0442\u0440\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u0441\u044f \u0432 \u043c\u0438\u0440 \u0412\u0430\u0440\u043a\u0440\u0430\u0444\u0442\u0430 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043d\u0430\u0441\u043b\u0430\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0435\u0433\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u0438\u0435\u043c.

\n\n\n \n

\u0414\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0437\u0430\u0439\u043c\u0435\u0442 \u043e\u0442 1 \u0434\u043e 48 \u0447\u0430\u0441\u043e\u0432.

\n \n\n\n
\n
\n \n
\n\n
\n\n
\n \u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0437\u0430\u043a\u0430\u0437\u0435:\n
\n
*
\n
\n
\n\n
\n
*
\n
\n\n
\n
\n\n
\n
\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0433 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0432\u044f\u0437\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0435\u0439.
\n\n
\n
(\u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c)
\n
\n
\n\n
\n\n\n
";var root_holder='#money-placeholder';var discounts_holder='#discounts-placeholder';var global_errors_holder='#global-errors';$(root_holder).append(form_tpl);$(discounts_holder).hide();$('#money-form').submit(function(){var args=$(this).serialize();args+='&from_id='+readCookie('from_id')+'&referrer='+encodeURIComponent(readCookie('referrer'));$("#money-form-loader").show();$("#money-form-submit").hide();$.getScript("http://elfmoney.ru/aff/check-form/3/2/?"+args,function(){if(!data["form_is_valid"]){$('ul.errorlist').remove();for(var field in data["form_errors"]){errors=data["form_errors"][field] if(field=='__all__'){$(global_errors_holder).append('');for(i in errors){$(global_errors_holder).find('ul.errorlist:last').append('
  • '+errors[i]+'
  • ');}}else{$('#id_'+field).parent().append('');for(i in errors){$('#id_'+field).parent().find('ul.errorlist:first').append('
  • '+errors[i]+'
  • ');}}}}else{$(root_holder).html(returned_html);} $("#money-form-loader").hide();$("#money-form-submit").show();});return false;});function show_warning(method){var warning=payment_systems[method]['warning'];$('span.warning').html(warning);} function get_discount(amount,currency_code){if(isNaN(amount)){return 0;} if(currency_code=='RUR'){amount=v+amount;table=discounts;}else if(currency_code=='USD'){amount=u+amount;table=usd_discounts;} for(var volume in table){if(amount>=volume){d1=(table[volume]>fixed_discount)?table[volume]:fixed_discount;return(cd>d1)?cd:d1;}} return(cd>fixed_discount)?cd:fixed_discount;} function set_amount(amount){amount=parseFloat(amount).toFixed(2);if(!isNaN(amount)){$('input#id_amount').val(amount);}else{$('input#id_amount').val('');}} function show_result(raw,discount,unit,must_set_amount){must_set_amount=typeof(must_set_amount)!='undefined'?must_set_amount:false;raw=parseFloat(raw).toFixed(2);if(!isNaN(raw)){$("span#raw").html("Стоимость: {raw} {unit}
    ".supplant({'raw':raw,'unit':unit}));}else{$("span#raw").html("");} if(discount>0){$("span#dsc").html("Скидка: {discount}% ({discount_amount} {unit})
    ".supplant({'discount':discount,'unit':unit,'discount_amount':parseFloat(raw*discount/100).toFixed(2)}));}else{$("span#dsc").html("");} var total=raw-raw*discount/100;total=parseFloat(total).toFixed(2);if(!isNaN(total)){$("span#total").html("Итого с учетом скидки: "+total+" "+unit+"
    ");$("span#total-summ").html(total+" "+unit);}else{$("span#total").html("");$("span#total-summ").html(0+" "+unit);} $("span#amount-unit").html(unit);if(must_set_amount==true){set_amount(total);}} function update_vd(){if(fixed_discount>0){$("span#user-discount").show();$("span#user-discount").html("Зафиксированная скидка: "+fixed_discount+"%");}else{$("span#user-discount").html("");$("span#user-discount").hide();}} function isEmail(email){var re=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return email.match(re);} function uinfo(email){if(isEmail(email)){$.getJSON('http://elfmoney.ru/dyn/uinfo/?e='+email+'&jsoncallback=?',function(json){v=json.v;u=json.u;if(product_type=='GOLD'){fixed_discount=json.g_dsc;}else if(product_type=='KEY'){fixed_discount=json.k_dsc;} update_vd();recount();});}else{v=0;u=0;fixed_discount=0;update_vd();recount();}} function init_vd(){uinfo($('input#id_email').val());$('input#id_email').bind("change keyup blur",function(){uinfo($(this).val());});} function update_cd(){$("span#coupon-discount").html("Предоставлен купон со скидкой "+cd+"%");} function clean_cd(){cd=0;$("span#coupon-discount").html('');} function is_valid_code(code){var re=/^\d\d\d\d-\d\d\d\d-\d\d\d\d-\d\d\d\d$/;return code.match(re);} function cinfo(code){if(is_valid_code(code)){$.getJSON('http://elfmoney.ru/dyn/cinfo/?c='+code+'&jsoncallback=?',function(json){if(product_type=='GOLD'){cd=json.gold_discount;}else if(product_type=='KEY'){cd=json.key_discount;} if(cd>0){update_cd();recount();}else{clean_cd();recount();}});}else{clean_cd();recount();}} function init_cd(){cinfo($('input#id_coupon_code').val());$('input#id_coupon_code').bind("change keyup blur",function(){cinfo($(this).val());});} function recount(){method=$("select#id_payment_type").val();var amount=price*payment_systems[method]['multiplier'];var discount=get_discount(amount,payment_systems[method]['currency']);show_result(amount,discount,payment_systems[method]['unit']);} recount();init_vd();init_cd();$('select#id_payment_type').keyup(recount);$('select#id_payment_type').change(recount);