﻿/*!
 * For the visually impaired v 0.54
 * https://984.ru/for-the-visually-impaired.html
 */

!function(i){var s={vi_init:function(t){var t=i.extend({"base-style":"",def_cvi_txt_size:js_vi_script.txt_size,def_cvi_sxema:js_vi_script.sxema,def_cvi_image:js_vi_script.image,def_cvi_font:js_vi_script.font,def_cvi_kerning:js_vi_script.kerning,def_cvi_line:js_vi_script.line,def_butt_txt:js_vi_script.btxt,def_close_txt:js_vi_script.btxt2,def_close_img2:js_vi_script.img_close2,def_auto_p_on:js_vi_script.auto_p_on,vi_container:"body"},t);i("*").each(function(){void 0==i(this).attr("original-font-size")&&i(this).attr("original-font-size",i(this).css("font-size")),void 0==i(this).attr("original-border-color")&&i(this).attr("original-border-color",i(this).css("border-color")),void 0==i(this).attr("original-background-color")&&i(this).attr("original-background-color",i(this).css("background-color")),void 0==i(this).attr("original-background-image")&&i(this).attr("original-background-image",i(this).css("background-image")),void 0==i(this).attr("original-color")&&i(this).attr("original-color",i(this).css("color")),void 0==i(this).attr("original-box-shadow")&&i(this).attr("original-box-shadow",i(this).css("box-shadow")),void 0==i(this).attr("original-text-shadow")&&i(this).attr("original-text-shadow",i(this).css("text-shadow")),void 0==i(this).attr("original-font-family")&&i(this).attr("original-font-family",i(this).css("font-family")),void 0==i(this).attr("original-letter-spacing")&&i(this).attr("original-letter-spacing",i(this).css("letter-spacing")),void 0==i(this).attr("original-line-height")&&i(this).attr("original-line-height",i(this).css("line-height"))}),"1"==t.def_auto_p_on&&Cookies.set("ftvi_init_id","1",{path:"/"}),"1"==Cookies.get("ftvi_init_id")?(i("svg").hide(),i(".bt_widget-vi-on").hide(),i(".bt_menu-vi-on").hide(),i(".bt_menu-vi-on").after(i('<li id="'+i(".bt_menu-vi-on").attr("id")+'"class="vi-closes"><a href="#" class="vi-close" title="'+t.def_close_txt+'">'+t.def_close_img2+" "+t.def_close_txt+"</a></li>")),i(".bt_widget-vi-on").after(i('<div class="vi-closes"><a href="#" class="vi-close" title="'+t.def_close_txt+'">'+t.def_close_img2+" "+t.def_close_txt+"</a></div>")),s.panel(),s.clicks(t),s.vi_changeParams(Cookies.get("cvi_txt_size")||t.def_cvi_txt_size,Cookies.get("cvi_sxema")||t.def_cvi_sxema,Cookies.get("cvi_image")||t.def_cvi_image,Cookies.get("cvi_font")||t.def_cvi_font,Cookies.get("cvi_kerning")||t.def_cvi_kerning,Cookies.get("cvi_line")||t.def_cvi_line)):(Cookies.remove("ftvi_init_id",{path:"/"}),i(".vi-closes,.vi-close").remove()),i(".bt_widget-vi-on, .bt_menu-vi-on").click(function(){return Cookies.set("ftvi_init_id","1",{path:"/"}),i("svg").hide(),i(".bt_menu-vi-on").hide(),i(".bt_menu-vi-on").after(i('<li id="'+i(".bt_menu-vi-on").attr("id")+'"class="vi-closes"><a href="#" class="vi-close" title="'+t.def_close_txt+'">'+t.def_close_img2+" "+t.def_close_txt+"</a></li>")),i(".bt_widget-vi-on").hide(),i(".bt_widget-vi-on").after(i('<a href="#" class="vi-close" title="'+t.def_close_txt+'">'+t.def_close_img2+" "+t.def_close_txt+"</a>")),s.panel(),s.clicks(t),s.vi_changeParams(Cookies.get("cvi_txt_size")||t.def_cvi_txt_size,Cookies.get("cvi_sxema")||t.def_cvi_sxema,Cookies.get("cvi_image")||t.def_cvi_image,Cookies.get("cvi_font")||t.def_cvi_font,Cookies.get("cvi_kerning")||t.def_cvi_kerning,Cookies.get("cvi_line")||t.def_cvi_line),!1})},panel:function(){if(Cookies.get("ftvi_init_id")){if(i("body").addClass("visually-impaired-controls-enable"),i('<div class="visually-impaired-controls"></div>').prependTo("body"),1==js_vi_script.scrool_panel){var s=i(document).scrollTop();s>30?i(".visually-impaired-controls").css({left:"0",right:0,"margin-left":"auto","margin-right":"auto","margin-bottom":"20px",position:"fixed","z-index":99999}):i(".visually-impaired-controls").removeAttr("style"),i(window).scroll(function(){i(document).scrollTop()>30?i(".visually-impaired-controls").css({left:"0",right:0,"margin-left":"auto","margin-right":"auto","margin-bottom":"20px",position:"fixed","z-index":99999}):i(".visually-impaired-controls").removeAttr("style")})}i('<div class="vi_panel"></div>').appendTo(".visually-impaired-controls"),i('<span id="vi-fontsize"><a href="#" id="vi-fontsize-smallest" title="'+js_vi_script.fs_title1+'">A</a><a href="#" id="vi-fontsize-small" title="'+js_vi_script.fs_title2+'">A</a><a href="#" id="vi-fontsize-normal" title="'+js_vi_script.fs_title3+'">A</a><a href="#" id="vi-fontsize-big" title="'+js_vi_script.fs_title4+'">A</a><a href="#" id="vi-fontsize-bigest" title="'+js_vi_script.fs_title5+'">A</a></span><span id="vi-colors"><a href="#" id="vi-color1" title="'+js_vi_script.sxem_title1+'">'+js_vi_script.sxem_title+'</a><a href="#" id="vi-color2" title="'+js_vi_script.sxem_title2+'">'+js_vi_script.sxem_title+'</a><a href="#" id="vi-color3" title="'+js_vi_script.sxem_title3+'">'+js_vi_script.sxem_title+'</a><a href="#" id="vi-color4" title="'+js_vi_script.sxem_title4+'">'+js_vi_script.sxem_title+'</a><a href="#" id="vi-color5" title="'+js_vi_script.sxem_title5+'">'+js_vi_script.sxem_title+'</a></span><span id="vi-images"><a href="#" class="vi-images-on" title="'+js_vi_script.img_title_on+'"></a><a href="#" class="vi-images-gs" title="'+js_vi_script.img_title_gs+'"></a><a href="#" class="vi-images-off" title="'+js_vi_script.img_title_off+'"></a></span><span id="vi-settings"><a href="#" class="vi-popped" title="'+js_vi_script.setting_title+'"></a><span id="vi-clos"><a href="#" class="vi-close" title="'+js_vi_script.close_title+'"></a></span>').appendTo(".vi_panel"),i('<div class="vi-popp"></div>').appendTo(".vi_panel"),i("<h2>"+js_vi_script.settings_title+' : </h2><p class="vi-choose-font-family">'+js_vi_script.setfont_title+' : <a class="vi-font-family-a" href="#">Arial</a> <a class="vi-font-family-tnr" href="#">Times New Roman</a></p><p class="vi-choose-letter-spacing">'+js_vi_script.setsplet+' : <a class="vi-letter-spacing-n" href="#">'+js_vi_script.standart+'</a> <a class="vi-letter-spacing-s" href="#">'+js_vi_script.average+'</a> <a class="vi-letter-spacing-b" href="#">'+js_vi_script.big+'</a></p><p class="vi-choose-line-height">'+js_vi_script.setspline+' : <a class="vi-line-height-n" href="#">'+js_vi_script.standart+'</a> <a class="vi-line-height-s" href="#">'+js_vi_script.average+'</a> <a class="vi-line-height-b" href="#">'+js_vi_script.big+"</a></p><h2>"+js_vi_script.sel_sxem+' : </h2><ul class="vi-choose-colors"><li id="vi-colors1"><a href="#"><span>—</span>'+js_vi_script.sxem_title1+'</a></li><li id="vi-colors2"><a href="#"><span>—</span>'+js_vi_script.sxem_title2+'</a></li><li id="vi-colors3"><a href="#"><span>—</span>'+js_vi_script.sxem_title3+'</a></li><li id="vi-colors4"><a href="#"><span>—</span>'+js_vi_script.sxem_title4+'</a></li><li id="vi-colors5"><a href="#"><span>—</span>'+js_vi_script.sxem_title5+'</a></li></ul><p class="vi-saveit"><a class="vi-closepopped" href="#"><span>'+js_vi_script.closepanel+'</span></a> <a class="vi-default" href="#"><span>'+js_vi_script.defsetpanel+"</span></a></p>").appendTo(".vi-popp")}else i(".vi-close").remove(),i(".bt_menu-vi-on").show(),i(".bt_widget-vi-on").show(),i("*").each(function(){void 0!=i(this).attr("original-border-color")&&i(this).css("border-color",i(this).attr("original-border-color")),void 0!=i(this).attr("original-background-color")&&i(this).css("background-color",i(this).attr("original-background-color")),void 0!=i(this).attr("original-background-image")&&i(this).css("background-image",i(this).attr("original-background-image")),void 0!=i(this).attr("original-color")&&i(this).css("color",i(this).attr("original-color")),void 0!=i(this).attr("original-font-size")&&i(this).css("font-size",i(this).attr("original-font-size")),void 0!=i(this).attr("original-font-family")&&i(this).css("font-family",i(this).attr("original-font-family")),void 0!=i(this).attr("original-letter-spacing")&&i(this).css("letter-spacing",i(this).attr("original-letter-spacing")),void 0!=i(this).attr("original-line-height")&&i(this).css("line-height",i(this).attr("original-line-height")),void 0!=i(this).attr("original-box-shadow")&&i(this).css("box-shadow",i(this).attr("original-box-shadow")),void 0!=i(this).attr("original-text-shadow")&&i(this).css("text-shadow",i(this).attr("original-text-shadow")),i(this).attr("style",i(this).attr("original-style"))}),i("svg").show(),i("img").show().removeClass("vi-gs-images"),i("body").removeClass("visually-impaired-controls-enable"),"1"==js_vi_script.reload_page&&location.reload()},clicks:function(t){i("#vi-close, .vi-close").click(function(){return Cookies.remove("ftvi_init_id",{path:"/"}),i(".vi-closes,.vi-close").remove(),i(".visually-impaired-controls").remove(),i(".vi-no-images").remove(),s.panel(),!1}),i(".vi-images-on").click(function(){return 0==i(".vi-images-on").hasClass("active")&&s.vi_changeParams(!1,!1,"1"),!1}),i(".vi-images-gs").click(function(){return 0==i(".vi-images-gs").hasClass("active")&&s.vi_changeParams(!1,!1,"2"),!1}),i(".vi-images-off").click(function(){return 0==i(".vi-images-off").hasClass("active")&&s.vi_changeParams(!1,!1,"0"),!1}),i("#vi-color1, #vi-colors1").click(function(){return s.vi_changeParams(!1,"1"),!1}),i("#vi-color2, #vi-colors2").click(function(){return s.vi_changeParams(!1,"2"),!1}),i("#vi-color3, #vi-colors3").click(function(){return s.vi_changeParams(!1,"3"),!1}),i("#vi-color4, #vi-colors4").click(function(){return s.vi_changeParams(!1,"4"),!1}),i("#vi-color5, #vi-colors5").click(function(){return s.vi_changeParams(!1,"5"),!1}),i("#vi-fontsize-smallest").click(function(){return s.vi_changeParams("14"),!1}),i("#vi-fontsize-small").click(function(){return s.vi_changeParams("16"),!1}),i("#vi-fontsize-normal").click(function(){return s.vi_changeParams("18"),!1}),i("#vi-fontsize-big").click(function(){return s.vi_changeParams("22"),!1}),i("#vi-fontsize-bigest").click(function(){return s.vi_changeParams("26"),!1}),i(".vi-popped,.vi-closepopped").click(function(){return i(".vi-popp").slideToggle("slow"),!1}),i(".vi-font-family-a").click(function(){return s.vi_changeParams(!1,!1,!1,"1"),!1}),i(".vi-font-family-tnr").click(function(){return s.vi_changeParams(!1,!1,!1,"2"),!1}),i(".vi-letter-spacing-n").click(function(){return s.vi_changeParams(!1,!1,!1,!1,"0"),!1}),i(".vi-letter-spacing-s").click(function(){return s.vi_changeParams(!1,!1,!1,!1,"2"),!1}),i(".vi-letter-spacing-b").click(function(){return s.vi_changeParams(!1,!1,!1,!1,"5"),!1}),i(".vi-line-height-n").click(function(){return s.vi_changeParams(!1,!1,!1,!1,!1,"0"),!1}),i(".vi-line-height-s").click(function(){return s.vi_changeParams(!1,!1,!1,!1,!1,"2"),!1}),i(".vi-line-height-b").click(function(){return s.vi_changeParams(!1,!1,!1,!1,!1,"4"),!1}),i(".vi-default").click(function(){return s.vi_changeParams(js_vi_script.txt_size,js_vi_script.sxema,js_vi_script.image,js_vi_script.font,js_vi_script.kerning,js_vi_script.line),!1})},vi_changeParams:function(s,t,e,a,o,r){if(s){switch(i("#vi-fontsize-smallest,#vi-fontsize-small,#vi-fontsize-normal,#vi-fontsize-big,#vi-fontsize-bigest").removeClass("active"),s){case"16":i("#vi-fontsize-small").addClass("active");break;case"18":i("#vi-fontsize-normal").addClass("active");break;case"22":i("#vi-fontsize-big").addClass("active");break;case"26":i("#vi-fontsize-bigest").addClass("active");break;default:i("#vi-fontsize-smallest").addClass("active")}Cookies.set("cvi_txt_size",s,{path:"/"}),i("*").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){"bold"==i(this).css("font-weight")?i(this).css({"font-size":Math.round(1.2*s)+"px"}):i(this).css({"font-size":s+"px"})})}if(t){Cookies.set("cvi_sxema",t,{path:"/"});var l="#000",c="#fff";switch(t){case"1":l="#000",c="#fff",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color1,#vi-colors1").addClass("active");break;case"2":l="#fff",c="#000",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color2,#vi-colors2").addClass("active");break;case"3":l="#063462",c="#9dd1ff",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color3,#vi-colors3").addClass("active");break;case"4":l="#4d4b43",c="#f7f3d6",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color4,#vi-colors4").addClass("active");break;case"5":l="#a9e44d",c="#3b2716",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color5,#vi-colors5").addClass("active");break;default:l="#000",c="#fff",i("#vi-color1,#vi-colors1,#vi-color2,#vi-colors2,#vi-color3,#vi-colors3,#vi-color4,#vi-colors4,#vi-color5,#vi-colors5").removeClass("active"),i("#vi-color1,#vi-colors1").addClass("active")}i("*").not(".visually-impaired-controls,.visually-impaired-controls *").each(function(){i(this).css({color:l}),i(this).css({"border-color":l}),i(this).css({"background-color":c}),"1"!==js_vi_script.allbackgrnd&&i(this).css({"background-image":"none"}),i(this).css({"box-shadow":"none"}),i(this).css({"text-shadow":"none"})})}if(e&&(Cookies.set("cvi_image",e,{path:"/"}),"1"==e?(i(".vi-images-on,.vi-images-gs,.vi-images-off").removeClass("active"),i(".vi-images-on").addClass("active"),i(".vi-no-images").remove(),i("img").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){i(this).show().removeClass("vi-gs-images")})):"2"==e?(i("img").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){i(this).show().addClass("vi-gs-images")}),i(".vi-images-on,.vi-images-gs,.vi-images-off").removeClass("active"),i(".vi-images-gs").addClass("active"),i(".vi-no-images").remove()):(i("img").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){var s=this.alt||js_vi_script.noimgdescr,t=i(this).attr("class")||"",e=i(this).attr("id")||"vi-no-images";i(this).hide(),1==js_vi_script.razmer_images?i(this).after(i('<div id="'+e+'" class="vi-no-images '+t+'" style="width: '+i(this).width()+"px; height: "+i(this).height()+'px">').html(js_vi_script.picture+" : "+s)):i(this).after(i('<div class="vi-no-images">').text(js_vi_script.picture+" : "+s))}),i(".vi-images-on,.vi-images-gs,.vi-images-off").removeClass("active"),i(".vi-images-off").addClass("active"))),a){if(Cookies.set("cvi_font",a,{path:"/"}),"1"==a){i(".vi-font-family-a,.vi-font-family-tnr").removeClass("active"),i(".vi-font-family-a").addClass("active");var v="Arial, sans-serif"}else{i(".vi-font-family-a,.vi-font-family-tnr").removeClass("active"),i(".vi-font-family-tnr").addClass("active");var v='"Times New roman", serif'}i("*").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){i(this).css({"font-family":v})})}if(o){switch(Cookies.set("cvi_kerning",o,{path:"/"}),o){case"2":i(".vi-letter-spacing-n,.vi-letter-spacing-s,.vi-letter-spacing-b").removeClass("active"),i(".vi-letter-spacing-s").addClass("active");break;case"5":i(".vi-letter-spacing-n,.vi-letter-spacing-s,.vi-letter-spacing-b").removeClass("active"),i(".vi-letter-spacing-b").addClass("active");break;default:i(".vi-letter-spacing-n,.vi-letter-spacing-s,.vi-letter-spacing-b").removeClass("active"),i(".vi-letter-spacing-n").addClass("active")}i("*").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){i(this).css({"letter-spacing":Math.round(o)+"px"})})}if(r){switch(Cookies.set("cvi_line",r,{path:"/"}),r){case"2":i(".vi-line-height-n,.vi-line-height-s,.vi-line-height-b").removeClass("active"),i(".vi-line-height-s").addClass("active");break;case"4":i(".vi-line-height-n,.vi-line-height-s,.vi-line-height-b").removeClass("active"),i(".vi-line-height-b").addClass("active");break;default:i(".vi-line-height-n,.vi-line-height-s,.vi-line-height-b").removeClass("active"),i(".vi-line-height-n").addClass("active")}i("*").not(".visually-impaired-controls,.visually-impaired-controls *,.bt_widget-vi,.bt_widget-vi *").each(function(){r>0?i(this).css({"line-height":r}):i(this).css({"line-height":""})})}}};i.fn.specialVisualy=function(t){return s[t]?s[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void i.error("Method named "+t+" exists for jQuery.specialVisualy"):s.bind.apply(this,arguments)}}(jQuery),jQuery(document).ready(function(i){i(".bt_widget-vi-on").specialVisualy("vi_init",{})});