$(document).ready(function()
{$('.compareCheckbox[checked]').parents('.BlockItem').css('border','1px solid #ffd633')});$(document).ready(function(){$('.PageItem__CountReview').click(function(){$('.BlockItemTab[data-idblock=review]').click();});$('.PageItem__TabsNavigate .BlockItemTab').click(function(){PageItem__ChangeActiveTab($(this));});$('.compareCheckbox').bind("chenge",function(){console.log("123");});});function PageItem__ChangeActiveTab(obj){var idTab=$(obj).attr('data-idblock')+'-tab';$('.PageItem__OneTabBlock').removeClass('PageItem__TabBlockActive');$('#'+idTab).addClass('PageItem__TabBlockActive');$('.BlockItemTab').removeClass('BlockItemTab__ActiveTab');$(obj).addClass('BlockItemTab__ActiveTab');}
function BlockLogin__init(){$("#BlockLogin__PasswordRecovery").click(function(){PasswordRecovery();});$("#BlockLogin__RegUser").click(function(){RegUser();});$("#loginF").submit(function(){shopLogin();return false;});}
function PasswordRecovery(){$.ajax({url:"/user/?mode=restore",success:function(data){$('#loginPlace').html(data);}});}
function RegUser(){$.ajax({url:"/user/?mode=reg",success:function(data){$('#loginPlace').html(data);}});}
function shopLogin(){if($('#log_email').val()==""||$('#log_password').val()==""){if($('#log_email').val()==""){$('#log_email_error').show().html('Заполните поле');$('#log_email').addClass('borderError');}
else{$('#log_email_error').hide();$('#log_email').removeClass('borderError');}
if($('#log_password').val()==""){$('#password_error').show().html('Заполните поле');$('#log_password').addClass('borderError');}
else{$('#password_error').hide();$('#log_password').removeClass('borderError');}
return false;}
$('
').appendTo($('.newLine'));$.post('/user/',{mode:$('#log_mode').val(),type:$('#log_type').val(),email:$('#log_email').val(),password:$('#log_password').val()},function(data){if(data.indexOf('class="BlockLogin__ErrorFill"')==-1){$('#BlockAuthUser').html(data);}else{$('#BlockAuthUser').html(data);$('#loginPlace').removeClass("hiddenBlock");$('#BlockEnterContainer').removeClass('hiddenBlock');$('#BlockEnter').removeClass('hiddenBlock');}})}
$(document).ready(function(){$('.PageNews__Container').each(function(){flagHeight=$(this).find('.PageNews__Text').height()-$(this).height();id=$(this).attr('id').substring(13);if(flagHeight>=20){$('#PageNews__Link'+id).removeClass('hiddenBlock');}});$('.PageNews__BlockLinkDesc .PageNews__Link').click(function(){id=$(this).parents('.PageNews__BlockLinkDesc').attr('id').substring(14);$('#PageNews__New'+id).toggleClass('PageNews__Container');$(this).addClass('hiddenBlock');$(this).siblings().removeClass('hiddenBlock');});});$(document).ready(function(){$('.BlockItemImage__BlockIcon[data-idIco*=ico]').click(function(){index=$(this).attr('data-idIco');srcImg=$('img#img_'+index).attr('src');show_image(srcImg,index);});listIco();if(document.getElementById('BlockItemImage__IconList')){var elem=document.getElementById('BlockItemImage__IconList');if(elem.addEventListener){if('onwheel'in document){elem.addEventListener("wheel",onWheel,false);}else if('onmousewheel'in document){elem.addEventListener("mousewheel",onWheel,false);}else{elem.addEventListener("MozMousePixelScroll",onWheel,false);}}else{elem.attachEvent("onmousewheel",onWheel);}}});function listIco(){var listIco=$('#BlockItemImage__IconList');heightIco=110;countIco=$('.BlockItemImage__BlockIcon').size()-3;var up=$('.BlockItemImage__arrowTopIconList');var down=$('.BlockItemImage__arrowBottomIconList');up.addClass('disabled');index=0;listIco.attr('data-index',index);thisTop=0;down.click(function(){thisTop=parseInt(listIco.attr('data-index'));if(thisTop0){index=--thisTop;listIco.attr('data-index',index);if(thisTop==0){$(this).addClass('disabled');}
listIco.animate({top:"+="+heightIco+"px"},500);down.removeClass('disabled');}});}
function onWheel(e){e=e||window.event;var delta=e.deltaY||e.detail||e.wheelDelta;scroll_list(delta);e.preventDefault?e.preventDefault():(e.returnValue=false);}
function scroll_list(delta){var listIco=$('#BlockItemImage__IconList');heightIco=110;i=listIco.attr('data-index');countIco=$('.BlockItemImage__BlockIcon').size()-3;var up=$('.BlockItemImage__arrowTopIconList');var down=$('.BlockItemImage__arrowBottomIconList');if(delta>0){if(i0){listIco.attr('data-index',--i);if(i==0){up.addClass('disabled');}
listIco.animate({top:"+="+heightIco+"px"});down.removeClass('disabled');}}}
$(window).load(function()
{if($('#vlightbox').css('display')=='block'){if($('#img_ico0').width()>318){$(".BlockItemImage__ItemBigImage").addClass("BlockItemImage__Lups");$(".BlockItemImage__ItemBigImage.BlockItemImage__Lups").click(function(){ShowGallery()});}
window.Lightbox=new jQuery().visualLightbox({borderSize:57,classNames:'vlightbox',closeLocation:'top',descSliding:false,enableRightClick:false,enableSlideshow:false,resizeSpeed:7,slideTime:4,strings:{closeLink:""},startZoom:false})}});function show_image(url_img,id){$("#BlockItemImage__ImgMain").attr({src:url_img});$(".BlockItemImage__ItemBigImage").unbind("click");$("#BlockItemImage__IcoLups").attr('data-idblock',id);if($('#img_'+id).width()>318){$(".BlockItemImage__ItemBigImage").addClass("BlockItemImage__Lups");$(".BlockItemImage__ItemBigImage.BlockItemImage__Lups").click(function(){ShowGallery()});}else{if($('#img_'+id).height()>318){$(".BlockItemImage__ItemBigImage").addClass("BlockItemImage__Lups");$(".BlockItemImage__ItemBigImage.BlockItemImage__Lups").click(function(){ShowGallery()});}else{$(".BlockItemImage__ItemBigImage").removeClass("BlockItemImage__Lups");}}
$("#BlockItemImage__IconGallery .BlockItemImage__BlockIcon").removeClass("BlockItemImage__IcoSelect");$(".BlockItemImage__BlockIcon[data-idIco="+id+"]").addClass("BlockItemImage__IcoSelect");};function ShowGallery(){var click_id=$('#BlockItemImage__IcoLups').attr('data-idblock');$('a#'+click_id).click();}
function BlockRestore__init(){$("#BlockRestore__OpenBlockLogin").click(function(){BlockRestore__OpenBlockLogin();});$("#BlockRestore__OpenBlockReg").click(function(){BlockRestore__OpenBlockReg();});$("#BlockRestore__Form").submit(function(){BlockRestore__SubmitForm();return false;});}
function BlockRestore__SubmitForm(){var email=$('#res_email').val();emailTest="^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$";var regex=new RegExp(emailTest,'i');if(regex.test(email)==false){$('#res_email_error').html('Некорректный e-mail');$('#res_email_error').show();$('#res_email').addClass('BlockRestore__BorderError');}else{$.post('/user/',{mode:'restore',email:$('#res_email').val()},function(data){if(data==0)
{$('#res_email_error').html('Неизвестный e-mail');$('#res_email_error').show();$('#res_email').addClass('BlockRestore__BorderError');}
else{$('#res_email').removeClass('BlockRestore__BorderError');$('#res_email').val('');$('#res_email_error').hide();alert('Пароль был выслан на указанный Вами e-mail.');BlockRestore__OpenBlockLogin();}})}
return false;}
function BlockRestore__OpenBlockLogin(){if($('#flagPageAuth').val()=='')
urlAjax='/user/?mode=login'+'&form_log=simple&'+Math.round(Math.random()*10000000);else
urlAjax='/user/?mode=login'+'&page_name='+$('#flagPageAuth').val()+'&form_log=simple&'+Math.round(Math.random()*10000000)
$.ajax({url:urlAjax,success:function(data){$('#loginPlace').html(data);}});}
function BlockRestore__OpenBlockReg(){$.ajax({url:"/user/?mode=reg",success:function(data){$('#loginPlace').html(data);}});}
$(document).ready(function(){if($('.PageCompare__GroupBlock').hasClass("PageCompare__ActiveGroupBlock")){idNumb=$('.PageCompare__ActiveGroupBlock').attr('id').substring(13);HeightLine(idNumb);if($("#CompareBlockValue_"+idNumb).find('li').length>3){CarouseCompareBlock(idNumb);}}
$(".BlockItemTab").click(function(){PageCompare__GroupTab($(this));});});function CarouseCompareBlock(idNumb){id="CompareBlockValue_"+idNumb;classBtnNext=".PageCompare__NextButtom"+idNumb;classBtnPrev=".PageCompare__PrevButtom"+idNumb;$('#'+id).jCarouselLite({btnNext:classBtnNext,btnPrev:classBtnPrev,circular:false,speed:300,scroll:1,visible:3});HeightBlockCompareItem(idNumb);}
function HeightLine(idNumb){lineTitle={};$('#CompareBlock_'+idNumb+' .PageCompare__TitleLine').each(function(){idLine=$(this).data('idtitle');lineTitle[idLine]=$(this).outerHeight();maxHeight=0;$('#CompareBlock_'+idNumb+' .BlockCompareItem__ItemHaracterValue[data-idvalue='+idLine+']').each(function(){h=$(this).outerHeight();if($(this).outerHeight()>maxHeight){maxHeight=$(this).outerHeight();}});if(maxHeight>lineTitle[idLine]){lineTitle[idLine]=maxHeight;}
if(lineTitle[idLine]>41){heightValue=lineTitle[idLine]-26;$('#CompareBlock_'+idNumb+' .PageCompare__TitleLine[data-idtitle='+idLine+']').css('height',heightValue);$('#CompareBlock_'+idNumb+' .BlockCompareItem__ItemHaracterValue[data-idvalue='+idLine+']').css('height',heightValue);}});}
function HeightBlockCompareItem(idNumb){maxHeightCompare=0;$('#CompareBlockValue_'+idNumb+' .BlockCompareItem').each(function(){liHeightCompare=$(this).outerHeight();if(liHeightCompare>maxHeightCompare){maxHeightCompare=liHeightCompare;}});$('#CompareBlockValue_'+idNumb+' .PageCompare__GroupBlockValueList').css('height',maxHeightCompare);$('#CompareBlockValue_'+idNumb+' .PageCompare__BlockItem').css('height',maxHeightCompare);}
function PageCompare__GroupTab(obj){idTab=$(obj).attr('data-idblock').substring(11);$('.BlockItemTab').removeClass('BlockItemTab__ActiveTab');$(obj).addClass('BlockItemTab__ActiveTab');$('.PageCompare__GroupBlock').removeClass('PageCompare__ActiveGroupBlock');$('#CompareBlock_'+idTab).addClass('PageCompare__ActiveGroupBlock');HeightLine(idTab);if($("#CompareBlockValue_"+idTab).find('li').length>3){CarouseCompareBlock(idTab);}}
$(document).ready(function(){$('select#currency_id').chosen();ShcartRadio();ShcartRadioDefault();$('#currency_id').change(function(){if($('#bring_id')){$('#bring_id').change();}
if($('#payment_id')){$('#payment_id').change();}});});function ShcartRadio(){$('.PageShcart input:radio').each(function(){idRadio=$(this).attr('id');nameRadio=$(this).attr('name');$(this).before("");$(this).css('display','none');});$('.PageShcart__Radio').click(function(){if($(this).hasClass('PageShcart__RadioDisabled')==false){id=$(this).data('id');name=$(this).data('name');$('#'+id).click();$('.PageShcart__Radio[data-name='+name+']').each(function(){$(this).removeClass('PageShcart__RadioChecked');});$(this).addClass('PageShcart__RadioChecked');ShcartRadioDefault();}});$('.PageShcart__BlockRadio label').click(function(){id=$(this).attr('for');name=$('#'+id).attr('name');if($('.PageShcart__Radio[data-id='+id+']').hasClass('PageShcart__RadioDisabled')==false){$('.PageShcart__Radio[data-name='+name+']').each(function(){$(this).removeClass('PageShcart__RadioChecked');});$('.PageShcart__Radio[data-id='+id+']').addClass('PageShcart__RadioChecked');}});}
function ShcartRadioDefault(){$('.PageShcart__Radio').removeClass('PageShcart__RadioChecked');$('.PageShcart__Radio').removeClass('PageShcart__RadioDisabled')
$('input[type=radio]').filter(':disabled').each(function(){id=$(this).attr('id');$('.PageShcart__Radio[data-id='+id+']').addClass('PageShcart__RadioDisabled');});$('input[type=radio]').filter(':checked').each(function(){id=$(this).attr('id');$('.PageShcart__Radio[data-id='+id+']').addClass('PageShcart__RadioChecked');});$('input[type=radio]').filter(':disabled').each(function(){id=$(this).attr('id');$('.PageShcart__Radio[data-id='+id+']').addClass('PageShcart__RadioDisabled');});}
$(document).ready(function(){$(".BlockSortingSection__SortingNum").chosen();$(".BlockSortingSection__ContainerNum .BlockSortingSection__SortingNum").siblings('div.chosen-container').width(60);});function ChactionSelSection(elem)
{document.location.href=elem.options[elem.selectedIndex].value;}
$(document).ready(function()
{$('.BlockCompareButton__CompareInputDisabled').click(function(){idItem=$(this).parents('.BlockCompareButton__Content').data('idblockdisabl');BlockCompareButton__Checked(idItem);CreatBlockHelp(idItem);setTimeout(removeHelp,2000);var urlAdd=$('#BlockCompareButton__Active'+idItem).data('href');$('#fcompare').attr('src',urlAdd);});$('.BlockCompareButton__CompareInput').click(function(){idItem=$(this).parents('.BlockCompareButton__Content').data('idblockactiv');$('#BlockCompareButton__Disabled'+idItem).removeClass('hiddenBlock');$('#BlockCompareButton__Active'+idItem).addClass('hiddenBlock');removeHelp();var urlDel=$('#BlockCompareButton__Disabled'+idItem).data('href');$.get(urlDel,function(data){$('#fcompare').attr('src','/compare/?hidden=1');});});});function BlockCompareButton__Checked(idItem){$('#BlockCompareButton__Disabled'+idItem).addClass('hiddenBlock');$('#BlockCompareButton__Active'+idItem).removeClass('hiddenBlock');}
function CreatBlockHelp(idItem){$("body").prepend("");xHelp=$('#BlockCompareButton__Active'+idItem).offset().left-60;yHelp=$('#BlockCompareButton__Active'+idItem).offset().top+25;$(".BlockTextHelp").css({'left':xHelp,'top':yHelp});}
function removeHelp(){$('.BlockTextHelp').remove();}
var cursor_pos=0;$(document).ready(function(){HeightBlockCatalogContent();var flag=true;document.getElementsByTagName('body')[0].addEventListener('mouseover',function(e){if($(e.target).parents().hasClass('LinkCatalog')){ShowCatalogContent();}
if($(e.target).hasClass('LinkCatalog')){flag=!flag;ShowCatalogContent();}});document.getElementsByTagName('body')[0].addEventListener('mouseout',function(e){if(flag&&((!$(e.target).parents().hasClass('LinkCatalog'))||(!$(e.target).hasClass('LinkCatalog')))){flag=!flag;updateTimeout();}});$('.CatalogContent').hover(function(){delTimeoutCatalog();cursor_pos=1;},function(){updateTimeout();cursor_pos=0;});$(".BlockCatalogLevel3__ContentLevel3").hover(function(){},function(){$(this).hide();});$(".MainBody").click(function(){$('.BlockCatalogLevel3__ContentLevel3:visible').hide();HidCatalogContent();});$(".LinkCatalog").click(function(){if(cursor_pos==0){return false;}else{return true;}});});var tmShBlock=null;function ShowCatalogContent(){clearTimeout(tmShBlock);if($(".CatalogContent").css('left')=='-3000px'){$('.BlockCatalogContent__linkCatalogLevel2Hover').removeClass('BlockCatalogContent__linkCatalogLevel2Hover');$(".CatalogContent").css('left','-125px').css("opacity","0").show().animate({opacity:1},300);$(".LinkCatalog").addClass('LinkCatalogActiv');}}
function updateTimeout(){tmShBlock=window.setTimeout(HidCatalogContent,2000);}
function HidCatalogContent(){if($('.BlockCatalogLevel3__ContentLevel3:visible').size()==0){if(tmShBlock)clearTimeout(tmShBlock);$(".CatalogContent").css('left','-3000px');$(".LinkCatalog").removeClass('LinkCatalogActiv');$('.BlockCatalogLevel3__ContentLevel3:visible').hide();}}
function delTimeoutCatalog(){clearTimeout(tmShBlock);}
function HeightBlockCatalogContent(){var maxHeight=0;$('.BlockCatalogContent__liHeight').each(function(){liHeight=$(this).outerHeight();if(liHeight>maxHeight){maxHeight=liHeight;}});$('.BlockCatalogContent__ListBlock').css('height',maxHeight);$('.BlockCatalogContent__ListBlock li').css('height',maxHeight);}
function BlockUserMenu__init(){$("#BlockUserMenu__BlockEnter").click(function(){BlockEnter();});$("#BlockUserMenu__BlockReg").click(function(){$('#loginPlace').html('');LoadContentOverlay('/user/?mode=reg');});ClosetBlockOverlay();}
function BlockUserMenu__initProfil(){$("#BlockUserMenu__BlockUserinfo").click(function(){LoadContentOverlay('/profile/?mode=userinfo');});$("#BlockUserMenu__BlockAddress").click(function(){LoadContentOverlay('/profile/?mode=address');});ClosetBlockOverlay();}
function LoadContentOverlay(urlAjax){$.ajax({url:urlAjax,success:function(data){$('#loginPlace').html(data);}});OpenBlockOverlay();}
function OpenBlockOverlay(){$('#loginPlace .loginPlace__ErrorFill').hide();if($('#loginPlace').css('display')!='block'){$('#loginPlace').show();$('#BlockEnterContainer').removeClass('hiddenBlock');$('#BlockEnter').removeClass('hiddenBlock');}}
function ClosetBlockOverlay(){$(document).bind('click.myEvent',function(e){if($(e.target).closest('#BlockEnter').length!=0&&($(e.target).closest('#loginPlace').length==0||$(e.target).closest('.BlockUserMenu__ButtonExit').length!=0)){$('#loginPlace').hide();$('#BlockEnterContainer').addClass('hiddenBlock');$('#BlockEnter').addClass('hiddenBlock');$('#loginPlace').html('');}});}
function BlockEnter(){if($('#flagPageAuth').val()=='')
urlAjax='/user/?mode=login'+'&form_log=simple&'+Math.round(Math.random()*10000000);else
urlAjax='/user/?mode=login'+'&page_name='+$('#flagPageAuth').val()+'&form_log=simple&'+Math.round(Math.random()*10000000)
LoadContentOverlay(urlAjax);}
$(document).ready(function(){$('.PageSitemap__MarkerLevelPlus').click(function(){id=$(this).data('idsitemap');PageSitemap__LevelNext(id);});});function PageSitemap__LevelNext(id)
{if($('.PageSitemap__MarkerLevel[data-idsitemap='+id+']').hasClass('PageSitemap__MarkerLevelPlus')==true){$('.PageSitemap__MarkerLevel[data-idsitemap='+id+']').removeClass('PageSitemap__MarkerLevelPlus');$('.PageSitemap__MarkerLevel[data-idsitemap='+id+']').addClass('PageSitemap__MarkerLevelMinus');$('#PageSitemap__BlockNextLevel'+id).show();}else{$('.PageSitemap__MarkerLevel[data-idsitemap='+id+']').addClass('PageSitemap__MarkerLevelPlus');$('.PageSitemap__MarkerLevel[data-idsitemap='+id+']').removeClass('PageSitemap__MarkerLevelMinus');$('#PageSitemap__BlockNextLevel'+id).hide();}}
$(document).ready(function(){$('#findtext').click(function(){$('.BlockSearch').css('background','#ffffff');});$('#findtext').blur(function(){$('.BlockSearch').css('background','#EBEBEB');});$("input[data-id=findtips]").Watermark("Поиск","#4c4c4c");});$(document).ready(function(){$('.BlockAdditionalFeedback .BlockButtonSubmit').click(function(){feedbackSubmit();return false;});$('.BlockAdditionalFeedback__CaptchaImgBlock').click(function(){BlockAdditionalFeedback__ReloadCaptcha();return false;});});var feedbackSubmit=function(){if(!CheckFeedBack())
return false;var d={'model':'FeedbackForm','name':$('#name').val(),'email':$('#email').val(),'message':$('#msg').val(),'captcha':$('#captcha').val()};$.getJSON('lib/forms/form.php/index/check',d,function(data){if(data=='success'){alert('Сообщение успешно отправлено!\nПостараемся ответить Вам как можно скорее.');}else if(data=='fail'){alert('К сожалению, сообщение не может быть отправлено.\nВ ходе выполнения произошла ошибка!\n.');}
CheckFeedBack(data);$('#captcha_img').attr('src','/captcha/captcha.php?mode=new&'+(new Date).getTime());});return false;}
function CheckFeedBack(errors){var email=$('.BlockAdditionalFeedback__Form #email').val();emailTest="^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$";var regex=new RegExp(emailTest,'i');var param='no';var errorArr=[];var summ=$('.BlockAdditionalFeedback__Param').size();if(errors==undefined){if($('#name').val()==""){errorArr.push(['name','1']);}
if($('#email').val()==""){errorArr.push(['email','1']);}else if(regex.test(email)==false){errorArr.push(['email','3']);}
if($('#msg').val()==""){errorArr.push(['msg','1']);}
if($('#captcha').val()==""){errorArr.push(['captcha','1']);}}else{if(errors.name!=undefined){errorArr.push(['name','2']);}
if(errors.email!=undefined){errorArr.push(['email','2']);}
if(errors.message!=undefined){errorArr.push(['msg','2']);}
if(errors.captcha!=undefined){errorArr.push(['captcha','2']);}}
if(errorArr.length!=0){for(var j=0;jДа ('+(Number(countYes)+1)+') Нет ('+countNo+')';var staticNo='Отзыв полезен? Да ('+countYes+') Нет ('+(Number(countNo)+1)+')';if(help=='helpful')
{$.post("/lib/reviews.php",{mode:"vote",review_id:review_id,helpful:''},function(data){if(data==0){var countBlock=$('#helpfulBlock_'+review_id);countBlock.html(staticYes);}
if(data==105)
{alert('Вы уже голосовали!');return false;}
else{}})}
else{$.post("/lib/reviews.php",{mode:"vote",review_id:review_id,helpless:''},function test(data){if(data==0){var countBlock=$('#helpfulBlock_'+review_id);countBlock.html(staticNo);}
if(data==105)
{alert('Вы уже голосовали!');return false;}
else{}})}
return false;}
function BlockItemReviews__TextareaChange(name)
{var count=500;a=document.getElementById(name).value.length;if(a>count){document.getElementById(name).value=document.getElementById(name).value.substring(0,count);}
a=document.getElementById(name).value.length;num=count-a;document.getElementById(name+'_message').innerHTML='Осталось '+num+' символов';}
function BlockItemReviews__ReloadCaptcha(){$('#b-captchaImg').css('background','url(/pics/form_loader.gif) 130px center no-repeat');$('#captchaImg').attr('src','/captcha/captcha.php?mode=new&'+Math.round(Math.random()*10000000));$('#b-captchaImg').css('background','none');}
function CheckCaptchaRev()
{$('#createReview .buttons').css('background','url(/pics/form_loader.gif) 150px center no-repeat');$.post("/captcha/captcha.php",{captcha:$('#rf_captcha').val(),mode:"check"},checkReviewForm)
return false;}
function checkReviewForm(data){var email=$('#rf_email').val();emailTest="^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$";var regex=new RegExp(emailTest,'i');var param='no';var errorArr=[];var summ=$('.BlockItemReviews__ReviewParam').size();if($('#rf_name').val()==''){errorArr.push(['rf_name','1']);}
if($('#rf_email').val()==''){errorArr.push(['rf_email','1']);}else if(regex.test(email)==false){errorArr.push(['rf_email','2']);}
if($('#rf_positive').val()==''){errorArr.push(['rf_positive','1']);}
if($('#rf_negative').val()==''){errorArr.push(['rf_negative','1']);}
if($('#rf_comment').val()==''){errorArr.push(['rf_comment','1']);}
if($('#rf_captcha').val()==''){errorArr.push(['rf_captcha','1']);}else if(data==0){errorArr.push(['rf_captcha','2']);}
if($('#rf_mark').val()=='0'){errorArr.push(['rf_mark','3']);}
if(errorArr.length!=0){for(var j=0;j=90){if($('.TopMenuWrapper').css('position')!='fixed'){$('.TopMenuWrapper').addClass('BlockTopMenu_fixed');$('.BlockCatalogLevel3__ContentLevel3:visible').css('position','fixed');}}else{$('.TopMenuWrapper').removeClass('BlockTopMenu_fixed');$('.BlockCatalogLevel3__ContentLevel3:visible').css('position','inherit');}
var scrolled=window.pageYOffset||document.documentElement.scrollTop;if(scrolled>=800){$("#upButton").fadeIn("slow");}else{$("#upButton").fadeOut("slow");}}
function LoadLoginBlock(){var url_request;if($('#flagPageAuth').val()=='')
url_request='/user/?mode=login'+'&'+Math.round(Math.random()*10000000);else
url_request='/user/?mode=login'+'&page_name='+$('#flagPageAuth').val()+'&'+Math.round(Math.random()*10000000)
if(request!=0)
requestget.abort();requestget=$.ajax({url:url_request,beforeSend:function(){request=1;},success:function(data){$('#BlockAuthUser').html(data);request=0;}});};function BackShop(){document.location="/";}
$(document).ready(function()
{$(".CatalogCarousel").jCarouselLite({btnNext:".CatalogContent .nextButtom",btnPrev:".CatalogContent .prevButtom",circular:false,speed:300,scroll:1,visible:4})
$(".CatalogCarousel").mousewheel(function(event,delta){if(delta>0&&$('.prevButtom:visible').attr('class')=='prevButtom')
$(".CatalogContent .prevButtom").click();else if(delta<0&&$('.nextButtom:visible').attr('class')=='nextButtom')
$(".CatalogContent .nextButtom").click();return false;});$('.BlockCatalogContent__linkText').hover(function(){id=$(this).attr('id');if(id==undefined)
$('.BlockCatalogLevel3__ContentLevel3:visible').hide();$('.BlockCatalogContent__linkCatalogLevel2Hover').each(function(i,e)
{if($(e).find('.BlockCatalogContent__linkText').attr('id')!=id)
$(e).removeClass('BlockCatalogContent__linkCatalogLevel2Hover');});},function(){});});function ShowLevel3(id){if($('#'+id+':visible').attr('id')!=id)
{$('.BlockCatalogLevel3__CatalogBlockLevel').hide();$('.BlockCatalogLevel3__ContentLevel3:visible').hide();}
if($('#'+id+':visible').attr('id')==id)return true;$('#'+id).show().css({"opacity":"0","position":"fixed"}).animate({opacity:1},300);$('.BlockCatalogContent__linkText[id=parent_'+id+']').parent().addClass('BlockCatalogContent__linkCatalogLevel2Hover');x=$('#parent_'+id).offset().left+200;y=$('#parent_'+id).offset().top-15;max=$('body').outerWidth()-240;if(parseInt(x)>max)x-=430;$('#'+id).offset({top:y,left:x});}
function HidLevel3(id){$('#'+id).hide();$('#'+id).removeAttr('style');}
eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.1g.1w=6(o){o=$.1f({r:n,x:n,N:n,17:q,J:n,L:1a,16:n,y:q,u:12,H:3,B:0,k:1,K:n,I:n},o||{});8 G.R(6(){p b=q,A=o.y?"15":"w",P=o.y?"t":"s";p c=$(G),9=$("9",c),E=$("10",9),W=E.Y(),v=o.H;7(o.u){9.1h(E.D(W-v-1+1).V()).1d(E.D(0,v).V());o.B+=v}p f=$("10",9),l=f.Y(),4=o.B;c.5("1c","H");f.5({U:"T",1b:o.y?"S":"w"});9.5({19:"0",18:"0",Q:"13","1v-1s-1r":"S","z-14":"1"});c.5({U:"T",Q:"13","z-14":"2",w:"1q"});p g=o.y?t(f):s(f);p h=g*l;p j=g*v;f.5({s:f.s(),t:f.t()});9.5(P,h+"C").5(A,-(4*g));c.5(P,j+"C");7(o.r)$(o.r).O(6(){8 m(4-o.k)});7(o.x)$(o.x).O(6(){8 m(4+o.k)});7(o.N)$.R(o.N,6(i,a){$(a).O(6(){8 m(o.u?o.H+i:i)})});7(o.17&&c.11)c.11(6(e,d){8 d>0?m(4-o.k):m(4+o.k)});7(o.J)1p(6(){m(4+o.k)},o.J+o.L);6 M(){8 f.D(4).D(0,v)};6 m(a){7(!b){7(o.K)o.K.Z(G,M());7(o.u){7(a<=o.B-v-1){9.5(A,-((l-(v*2))*g)+"C");4=a==o.B-v-1?l-(v*2)-1:l-(v*2)-o.k}F 7(a>=l-v+1){9.5(A,-((v)*g)+"C");4=a==l-v+1?v+1:v+o.k}F 4=a}F{7(a<0||a>l-v)8;F 4=a}b=12;9.1o(A=="w"?{w:-(4*g)}:{15:-(4*g)},o.L,o.16,6(){7(o.I)o.I.Z(G,M());b=q});7(!o.u){$(o.r+","+o.x).1n("X");$((4-o.k<0&&o.r)||(4+o.k>l-v&&o.x)||[]).1m("X")}}8 q}})};6 5(a,b){8 1l($.5(a[0],b))||0};6 s(a){8 a[0].1k+5(a,\'1j\')+5(a,\'1i\')};6 t(a){8 a[0].1t+5(a,\'1u\')+5(a,\'1e\')}})(1x);',62,96,'||||curr|css|function|if|return|ul|||||||||||scroll|itemLength|go|null||var|false|btnPrev|width|height|circular||left|btnNext|vertical||animCss|start|px|slice|tLi|else|this|visible|afterEnd|auto|beforeStart|speed|vis|btnGo|click|sizeCss|position|each|none|hidden|overflow|clone|tl|disabled|size|call|li|mousewheel|true|relative|index|top|easing|mouseWheel|padding|margin|200|float|visibility|append|marginBottom|extend|fn|prepend|marginRight|marginLeft|offsetWidth|parseInt|addClass|removeClass|animate|setInterval|0px|type|style|offsetHeight|marginTop|list|jCarouselLite|jQuery'.split('|'),0,{}))
function BlockRegistration__init(){$("#BlockRegistration__OpenBlockLogin").click(function(){BlockRegistration__OpenBlockLogin();});$(".BlockRegistration__ImgCaptcha").click(function(){BlockRegistration__ReloadCaptcha();return false;});$("#regForm").submit(function(){BlockRegistration__SubmitForm();return false;});}
function BlockRegistration__OpenBlockLogin(){if($('#flagPageAuth').val()=='')
urlAjax='/user/?mode=login'+'&form_log=simple&'+Math.round(Math.random()*10000000);else
urlAjax='/user/?mode=login'+'&page_name='+$('#flagPageAuth').val()+'&form_log=simple&'+Math.round(Math.random()*10000000)
$.ajax({url:urlAjax,success:function(data){$('#loginPlace').html(data);}});}
function BlockRegistration__SubmitForm(){if(!shopReg())
return false;var email2=$('#reg_email').val();var pass=$('#reg_password').val();var d={'model':'RegShopForm','reg_email':$('#reg_email').val(),'reg_password':$('#reg_password').val(),'reg_password2':$('#reg_password2').val(),'captcha':$('#reg_captcha').val()};$.getJSON('/lib/forms/form.php/index/check',d,function(data){if(data=='success'){alert('Регистрация прошла успешно!');$.post('/user/',{mode:'login',type:'email_password',email:email2,password:pass},function(data){$('#BlockAuthUser').html(data);});}else if(data=='fail'){alert('Ошибка при отправке запроса: такой логин уже существует.');return false;}
shopReg(data);$('#captcha_img').attr('src','/captcha/captcha.php?mode=new&'+(new Date).getTime());});return false;}
function shopReg(errors){var email2=$('#reg_email').val();var pass=$('#reg_password').val();var pass2=$('#reg_password2').val();var param='no';var errorArr=[];var summ=$('.BlockRegistration__Param').size();emailTest="^[_\\.0-9a-z-]+@([0-9a-z][0-9a-z_-]+\\.)+[a-z]{2,4}$";passTest="^.{4,}";var regex_email=new RegExp(emailTest,'i');var regex_pass=new RegExp(passTest);if(errors==undefined){if(email2==''){errorArr.push(['reg_email','1']);}else if(regex_email.test(email2)==false){errorArr.push(['reg_email','2']);}
if(pass==''){errorArr.push(['reg_password','1']);}else if(regex_pass.test(pass)==false){errorArr.push(['reg_password','2']);}
if(pass2==''){errorArr.push(['reg_password2','1']);}else if(pass!=pass2){errorArr.push(['reg_password2','2']);}
if(document.getElementById('reg_captcha').value==""){errorArr.push(['reg_captcha','1']);}}else{if(errors.reg_email!=undefined){errorArr.push(['reg_email','3']);}
if(errors.reg_password!=undefined){errorArr.push(['reg_password','3']);}
if(errors.reg_password2!=undefined){errorArr.push(['reg_password2','3']);}
if(errors.captcha!=undefined){errorArr.push(['reg_captcha','3']);}}
if(errorArr.length!=0){for(var j=0;j");});$('.BlockShcartItemList__InputBox').click(function(){$(this).toggleClass('BlockShcartItemList__InputBoxChecked');id=$(this).data('id').substring(3);$('input[name='+id+']').click();});}
function summ1_count(){shcart_summ1=0;SummEl=$(".js_itemSumm");if($(".quantity_value").is('input')){SummEl.each(function(i){shcart_summ1=shcart_summ1+Number($(SummEl[i]).html());});}else{SummElCount=($(".quantity_value").length>0)?$(".quantity_value"):0;SummEl.each(function(i){shcart_summ1+=Number($(SummEl[i]).html())*Number($(SummElCount[i]).html());});}
shcart_summ1=normalizePrice(Math.round(shcart_summ1/cur[curId].cur_round)*cur[curId].cur_round);return shcart_summ1;}
function summ1_view(summ){$("#_t_summ_step1").val(summ).change();$("#_v_summ_step1").html(summ);}
function ChangeDel(){if($(".del_checkbox:checked").length>0){$(".BlockShcartItemList__ButtonDelItem_disable").hide();$(".BlockShcartItemList__ButtonDelItem").show();}else{$(".BlockShcartItemList__ButtonDelItem_disable").show();$(".BlockShcartItemList__ButtonDelItem").hide();}}
function del_items(){$param=new Object();$(".del_checkbox:checked").each(function(index){$param[this.name]="on";});$.ajax({type:"POST",url:"/shcart/?step=1&mode=hidden",data:$param}).done(function(msg){el=$(".del_checkbox:checked");el.each(function(index){$(".BlockShcartItemList").find("#"+$(el[index]).attr("name")).remove();});if(typeof(recalc)==="function"){recalc();}
ChangeDel();summ1_view(summ1_count());if($(".del_checkbox").length==$(".del_checkbox:checked").length){window.location.reload();}});}
$(document).ready(function(){$('.BlockCompareButton__CompareInputDisabled').click(function(){idItem=$(this).parents('.BlockCompareButton__Content').data('idblockdisabl');$('.BlockItem[data-idblockitem='+idItem+']').addClass('BlockItem__BorderActive');});$('.BlockCompareButton__CompareInput').click(function(){idItem=$(this).parents('.BlockCompareButton__Content').data('idblockactiv');$('.BlockItem[data-idblockitem='+idItem+']').removeClass('BlockItem__BorderActive');});});function BlockItem__BorderActiveCompare(idItem){$('.BlockItem[data-idblockitem='+idItem+']').addClass('BlockItem__BorderActive');}
var nTimeOut=0;var oID=[0,0,0,0,0,0,0,0,0];var hideTime=2000;var lastID=0;function hideLayer(i)
{if($("#mi_"+i).length>0)
{$("#mi_"+i).hide();$("#ai_"+i).removeClass('BlockCatalogLevel3__HrefLinkSel');for(a=0;a<7;a++)
{if(oID[a]==i)
{oID[a]=0;break;}}}}
function showLayer(i,level)
{clearTimeout(nTimeOut);if($('#mi_'+i+':visible').attr('id')!="mi_"+i)
hideChild(level);if($("#mi_"+i).length>0)
{if($("#mi_"+i+':visible').attr('id')=="mi_"+i)return true;$("#mi_"+i).show().css("opacity","0").animate({opacity:1},300);$("#ai_"+i).addClass('BlockCatalogLevel3__HrefLinkSel');y=$('#ai_'+i).offset().top-13;x=$('#ai_'+i).offset().left+200;max=$('body').outerWidth()-240;if(parseInt(x)>max)x-=420;$("#mi_"+i).offset({top:y,left:x});oID[level]=i;lastID=i;}}
function hideChild(level)
{for(a=level;a<7;a++)
{if(oID[a]&&$("#mi_"+oID[a]).length>0)
{$("#mi_"+oID[a]).hide();$("#ai_"+oID[a]).removeClass('BlockCatalogLevel3__HrefLinkSel');oID[a]=0;}}}
function setHide(i)
{clearTimeout(nTimeOut);nTimeOut=window.setTimeout("hideLayer("+i+")",hideTime);}
$(document).ready(function(){$('.BlockButtonAddSchart__ButtonItem').click(function(){add_item(this);});});function add_item(obj)
{var url_1='/shcart/?data_id='+$(obj).attr('data-idblock')+'&step=0&mode=add';window.top.frames["win_basket"].location=url_1;var PosLeft=$(obj).offset().left-38;var PosTop=$(obj).offset().top+40;if($('div').hasClass('PageItem__BlockButtonItem')==true){var PosLeft=$(obj).offset().left-31;var PosTop=$(obj).offset().top+45;}
CreateShMess(PosLeft,PosTop);}
var tmSh=null;function CreateShMess(PosLeft,PosTop)
{removeShMess();var TextMessage="Товар добавлен в корзину.
Перейти к оформлению";$("body").prepend("");$("#fixme").css({'left':PosLeft,'top':PosTop});$("#fixme").html(TextMessage);$('#fixme').click(function(){$('#fixme').remove();});tmSh=window.setTimeout(removeShMess,6000);}
function removeShMess()
{if(tmSh)clearTimeout(tmSh);if($("#fixme").length)
{$('#fixme').remove();}}
function BackShop(){document.location="/";}
function BlockUserinfo__init(){$("#profile_form").submit(function(){UserinfoSubmit();return false;});}
function UserinfoSubmit(){var a={};$("#profile_form input").each(function(index,value){if($(value).attr("name")!="reset"&&$(value).attr("name")!="savebut"){if($(value).attr("name")!="mode"&&$(value).attr("name")!="attr_password"&&$(value).attr("name")!="action"){str=$(value).attr("value");strr='';for(i=0;i");$(this).attr('data-idinput',i);$(this).attr('class','hiddenBlock');i++;});$('.PageFind__InputBox').click(function(){id=$(this).data('idinputbox');$(this).toggleClass('PageFind__InputBoxChecked');if($('input[data-idinput='+id+']:checked').length!=0){$('input[data-idinput='+id+']').removeAttr('checked');}else{$('input[data-idinput='+id+']').attr('checked','checked');}});$('.PageFind input:checked').each(function(){id=$(this).data('idinput');$('.PageFind__InputBox[data-idinputbox='+id+']').addClass('PageFind__InputBoxChecked');});}
function SubmitFindForm(id){var find_form=$('#f'+id);var main_course=find_form.find('input[data-id="main_course"]').val();var course=find_form.find('input[data-id="course"]').val();var error=[];var checkBefore=find_form.find('input[data-id="price_before_new"]').val();var checkAfter=find_form.find('input[data-id="price_after_new"]').val();if((!checkBefore.match(/^[0-9\,\.\(\)]*$/))||(!checkAfter.match(/^[0-9\,\.\(\)]*$/))){error.push(0);}
if(checkBefore.indexOf(',')!=-1){checkBefore=checkBefore.replace(",",".");find_form.find('input[data-id="price_before_new"]').val(checkBefore);}
if(checkAfter.indexOf(',')!=-1){checkAfter=checkAfter.replace(",",".");find_form.find('input[data-id="price_after_new"]').val(checkAfter);}
for(var i=0;iprice_after)){error.push(1);}
if(!error.length){var price_before=find_form.find('input[data-id="price_before_new"]').val()!=""?price_before:'';find_form.find('input[data-id="price_before"]').attr('value',price_before);var price_after=find_form.find('input[data-id="price_after_new"]').val()!=""?price_after:'';find_form.find('input[data-id="price_after"]').attr('value',price_after);$('#f'+id).submit();}else{if(typeof(console)=='object'){console.group("find error");console.groupEnd();}
alert('Неправильно заполнены поля поиска.');}
return false;}
function OpenFormGroup(i)
{if($('#sb'+i).hasClass('hiddenBlock')){$(".PageFind__GroupSearchHeader").removeClass("PageFind__GroupActiv");$('.PageFind__BlockFindGroup').removeClass('PageFind__BlockFindGroupActiv');$(".PageFind__FilterBlock").addClass("hiddenBlock");}
$('#sb'+i).toggleClass('hiddenBlock');$('#backgr'+i).toggleClass('PageFind__GroupActiv');$('#backgr'+i).parents('.PageFind__BlockFindGroup').toggleClass('PageFind__BlockFindGroupActiv');$('#sb'+i+' select').chosen();}
function BlockEditAddress__init(idForm){$("#updateBut_"+idForm).click(function(){submitEditAddress(idForm);return false;});}
function submitEditAddress(id){var errorArr=[];if($('#attr_street_185_'+id).val()==''){errorArr.push('street_185');}
if($('#attr_house_175_'+id).val()==''){errorArr.push('house_175');}
if(errorArr.length!=0){$('#attr_house_175_'+id).removeClass('BlockAddAddress__borderError');$('#house_175_'+id).hide();$('#attr_street_185_'+id).removeClass('BlockAddAddress__borderError');$('#street_185_'+id).hide();for(var i=0;i