(function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(d.getElementById(id))return;js=d.createElement(s);js.id=id;js.src="//connect.facebook.net/ru_RU/all.js#xfbml=1";fjs.parentNode.insertBefore(js,fjs);}(document,'script','facebook-jssdk'));$(function(){function getAnchor(){var page=document.location.hash.substr(document.location.hash.lastIndexOf('=')+1);if(page){page=page.split('#');setTimeout("window.scrollBy(0,-100)",500);$('a[name='+page[1]+']').addClass('active').next('div').toggle();}}
getAnchor();try{VK.Widgets.Group("vk_groups",{mode:0,width:"235",height:"260",color1:'FFFFFF',color2:'555555',color3:'738ba4'},27541852);}catch(e){console.error(e);}
$('.faq-categories .faq-categories__title').each(function(){$(this).prev('li').addClass('last');});$('.faq-categories li:last').addClass('last');$('.faq-questions > li > a').click(function(){$(this).toggleClass('active');$(this).parent('li').next('ol').toggle();$(this).next('.faq-questions__content').toggle();return false;});$(".faq-questions__content-images img[class!=faq-printversion]").each(function(){curID=$(this).parent().parent().prev('a').attr('name');curName=$(this).parent().parent().prev('a').html();$(this).removeAttr('style').wrap('<a rel="group_'+curID+'" title="'+curName+'" href="'+$(this).attr("src")+'"></a>');});$('a[rel*=group_]').fancybox({'transitionIn':'none','transitionOut':'none','titlePosition':'over','titleFormat':function(title,currentArray,currentIndex,currentOpts){return'<span id="fancybox-title-over">Изображение '+(currentIndex+1)+' / '+currentArray.length+(title.length?' &nbsp; | &nbsp; '+title:'')+'</span>';}});$('.faq-questions__content-images').append('<br /><a style="font-style:italic;color:#666" href="javascript:" class="getPrintable"><img src="/images/printer_mono.png" class="faq-printversion" alt="Версия для печати" title="Версия для печати" style="vertical-align:baseline;height:12px" />Версия для печати</a>');$('a[class=getPrintable]').live('click',function(){var curObj=$(this).parent('div').prev('a').attr('name');getPrintableVersion(curObj);});});function showHelpForm(){$('.faq-content__helped-form').toggle();$('.faq-content__helped-link').toggleClass('active');location.href='#help-form';}
getPrintableVersion=function(questionObj){var innerTitle=$('a[name='+questionObj+']').html(),innerContent=$('a[name='+questionObj+']').next('div').html();var prwin=open('');prwin.document.open();prwin.document.writeln('<html><head><style type="text/css">html,body{font-family:Calibri;font-size:18px}img{max-width:800px}.getPrintable{display:none}<\/style><\/head>');prwin.document.writeln('<body onload="window.print()"><div style="width:800px;margin:0 auto"><h1>');prwin.document.writeln(innerTitle);prwin.document.writeln('<\/h1><br />');prwin.document.writeln(innerContent);prwin.document.writeln('<\/div>');prwin.document.writeln('<\/body><\/html>');prwin.document.close();}