function AjaxForm(n,t,i,r){return $.ajax({cache:!1,type:"POST",url:n,data:t,dataType:"json",success:function(n){n=n||{};typeof n.Status=="undefined"&&(n.Status=1);i&&i(n,r)},error:function(n,t){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(t);i&&i({Status:-500,Message:"Internal Server Error"},r)}})}function AjaxHtml(n,t,i,r){return $.ajax({cache:!1,type:"POST",url:n,data:t,dataType:"html",success:function(n){i&&i({Status:1,Html:n},r)},error:function(n,t){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(t);i&&i({Status:-500,Message:"Internal Server Error"},r)}})}function HtmlEncode(n){return n==null?"":n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/>/g,"&gt;")}function OptExtend(n,t){t=t||{};for(var i in n)typeof t[i]=="undefined"&&(t[i]=n[i]);return t}function Log(n,t){t=t||"log";typeof console!="undefined"&&typeof console[t]!="undefined"&&console[t](n)}function px(n,t){return(n=ToInt(n),n==null)?"":t===!0&&n<0?"0":n==0?"0":n+"px"}function ppx(n){return px(n,!0)}function EventFix(n){return jQuery.event.fix(n||window.event)}function EventKill(n){return n==null?!1:(typeof n.returnValue!="undefined"&&(n.returnValue=!1),typeof n.cancelBubble!="undefined"&&(n.cancelBubble=!0),n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),!1)}function CE(n,t){if(t==null)return document.createElement(n);var i=document.createElement(n);return i.prop(t),i}function FE(n,t,i){if(i==null)return $.find(n,t)[0];var r=$.find(n,t)[0];return r?(r.prop(i),r):null}function _takeElem(n,t){return typeof n=="string"?CE(n,t):(n.prop(t),n)}function EventMan(){var t=this,n=[];t.Add=function(t,i){n.push([t,i])};t.Fire=function(){for(var i,r,t=0,u=n.length;t<u;t++)(i=n[t],r=i[0],r)&&r.apply(i[1]||this,arguments)}}function ToStr(n,t){return typeof n=="boolean"&&(n=n?"1":"0"),n==null?typeof t=="undefined"?null:t:String(n)}function ToInt(n,t){var i=parseInt(n);return isNaN(i)?typeof t=="undefined"?null:t:i}function ToFloat(n,t){var i=parseFloat(n);return isNaN(i)?typeof t=="undefined"?null:t:i}function ToBool(n,t){switch((""+n).toLowerCase()){case"true":case"yes":case"on":case"1":return!0;case"false":case"no":case"off":case"0":return!1;case"":case"null":case"undefined":case null:return typeof t=="undefined"?null:t;default:return Boolean(n)}}function rs(n){return _rs?_rs[n]||n:n}function Loc(n,t){function s(n,t){h(n);o(t)}function h(n){if(n!=null&&n.length!==0){var u=n.indexOf("?"),t=n.indexOf("#");u<0?(e=null,t<0?(f=n,r=null):(f=n.substr(0,t),r=n.substr(t))):(f=n.substr(0,u),t<0?(e=n.substr(u),r=null):(e=n.substr(u,t-u),r=n.substr(t)),i=c(e))}}function c(n){var i,r,e,u,t,f;if(n==null||n===""||n==="?"||(n.indexOf("?")==0&&(n=n.substr(1)),i=n.split("&"),i.length==0))return null;for(r={},e=i.length,u=0;u<e;u++)(t=i[u],t!=null&&t.length!==0)&&(t.indexOf("=")>-1?(f=t.split("="),r[f[0]]=Loc.dec(f[1])):r[t]=null);return r}function o(n,t){if(n!=null){if(typeof n=="object"){i||(i={});for(var r in n)i[r]=n[r];return}if(typeof t=="undefined")return i?i[n]:null;i||(i={});i[n]=t}}var u=this,f=null,e=null,r=null,i=null;s(n,t);u.load=function(n,t){f=null;e=null;r=null;i=null;s(n,t)};u.path=function(n){if(typeof n=="undefined")return f;f=n};u.hash=function(n){if(typeof n=="undefined")return r;r=n==null||n===""||n==="#"?null:(n.indexOf("#")===0?"":"#")+n};u.param=o;u.paramI=function(n){return ToInt(o(n))};u.paramB=function(n){return ToBool(o(n))};u.render=function(){var n=f||"",t,u,e;if(i!=null){t=0;for(e in i)(u=i[e],u!=null)&&(n+=(t>0?"&":"?")+e+"="+Loc.enc(u),t++)}return r!=null&&(n+=r),n};u.params=function(){return i};u._test=function(){return{path:f,search:e,params:i,hash:r}}}function parseYear(n){var t=parseInt(n,10);return t<45?t+2e3:t<100?t+1900:t}function ExtendValidation(){document.HasExValidation||(typeof Page_ClientValidate=="undefined"?window.Page_ClientValidate=Atom_ClientValidate:(MS_ClientValidate=Page_ClientValidate,Page_ClientValidate=Extended_ClientValidate),document.HasExValidation=!0)}function Extended_ClientValidate(n){var t=MS_ClientValidate(n),i=Atom_ClientValidate(n);return t&&i}function Atom_ClientValidate(n){var t=$(".Captcha")[0];return t.Validate(n)}function CheckboxValidator(n,t,i){window[n]=function(n,i){i.IsValid=$("#"+t).is(":checked")};$("#"+t).change(function(){var n=FE("#"+i);n!=null&&ValidatorValidate(n)})}function SubmitForm(n,t,i){(typeof Page_ClientValidate=="undefined"||Page_ClientValidate(i))&&__doPostBack(n,t)}function SubmitOnEnter(n,t){n=EventFix(n);n.keyCode==13&&(typeof Page_ClientValidate!="undefined"?Page_ClientValidate(t)&&__doPostBack():__doPostBack())}function ComeBack(n,t){var i=window.location;typeof t=="undefined"&&(t=i.pathname+i.search+i.hash);$.cookie("lru",t,{path:"/",raw:!0});i.href=n}function ShieldBack(n){var t=window.location,i=t.pathname.replace("/nabidka","")+t.search+t.hash;ComeBack(n,i)}function ConfirmPostBack(n,t,i){confirm(n)&&__doPostBack(t,i)}function PromptPostBack(n,t,i,r,u){var f=prompt(n,t);f==i&&__doPostBack(r,u)}function ConfirmUrl(n,t){confirm(n)&&(window.location.href=t)}function InitUap(){Uap.IsAuthenticated=document.body.getAttribute("data-isauth")=="1";Uap.UserId=ToInt(document.body.getAttribute("data-userid"))}function DelayFocus(n){var t=FE(n);t&&setTimeout(function(){t.focus()},100)}function SelectMe(n,t){typeof t=="undefined"&&(t=10);setTimeout(function(){n!=null&&n.select()},t)}function UrlClean(n){var t=n.indexOf("#_");return t>-1&&n.length==t+2?n.substring(0,t):n}function FirePost(n,t){var r=document.body.appendElem("form",{method:"post",action:UrlClean(n)}),i;if(t!=null)for(i in t)r.appendElem("input",{type:"hidden",name:i,value:t[i]});r.submit()}function clearDocumentSelection(){try{typeof getSelection!="undefined"?window.getSelection().removeAllRanges():typeof document.selection!="undefined"&&document.selection.empty()}catch(n){}}function TextLeft2(n,t,i){return(typeof i=="undefined"&&(i="..."),n===null||n.length===0)?n:t>=n.length?n:n.substr(0,t)+i}function AnimateTo(n,t){typeof t=="undefined"&&(t="slow");$("html, body").animate({scrollTop:n},t)}function HasFlag(n,t){return n===null?null:(n&t)>0}function WinStb(){return ElemStb(window,document)}function ElemStb(n,t){return $(n).scrollTop()+$(n).height()>$(t).height()-10}function JudSearch(){var n=new Loc(window.location.href),t=FE("input[name='text']");t!=null&&n.param("text",t.value);window.location.href=n.render()}function ParseDocUrl(n){var e,t,i,r,u,f;return n==null?null:(e=/^\/([a-z-]+)\/([a-z0-9-]+)(?:\/(znenie?-[0-9]+|vse(?:chna|tky)-znenia?))?(?:\/(so?uvislosti|histori[ea]|monitor|casove-verzie))?$/g,t=e.exec(n),!t)?null:(i={collection:t[1],doc:t[2],slice:null,tab:null},r=t[3],r!=null&&(r==="vsechna-zneni"||r==="vsetky-znenia"?i.slice="*":(u=r.split(/znenie?-/),u!=null&&u.length===2&&(i.slice=u[1]))),f=t[4],f!=null&&(i.tab=f),i)}function FormatDocUrl(n,t,i,r){typeof r=="undefined"&&(r="cs");var u="/"+n+"/"+t;return i!=null&&(u+=i==="*"?r==="cs"?"/vsechna-zneni":"/vsetky-znenia":(r==="cs"?"/zneni-":"/znenie-")+i),u}function AddJQueryPlugin(n,t){(function(i){i.fn[n]=t})(jQuery)}function IsNullOrEmpty(n){return n==null?!0:n.length===0}function IsNullOrZero(n){return n==null||n==0}function SplashDoc(n){typeof n=="undefined"&&(n={FID:null,Ver:null,Shift:null});n.FID!=null&&$(function(){frape.init();var t=frape.fragByFID(n.FID,n.Ver);frape.scrollTo(t,n.Shift)})}function ShowSplashClickHandler(n){$(n.target).is('a[href][target!="_blank"],a[onclick],input[type=button],input[type=submit],label[onclick]')&&n.ctrlKey==!1&&ShowSplash()}function ShowSplash(n){splash==null&&(splash=new SplashLoader);splash.show(n)}function HideSplash(){var n,t;if(splash==null){n=FE(".loader_bg");n!=null&&n.remove();t=FE(".loader");t!=null&&t.remove();return}splash.hide()}function Banner2(n,t){t===void 0&&(t=null);new Banner(n,t)}var Timer=function(){function n(n){this._Delay=null;this._tm=null;this._Delay=n}return n.prototype.run=function(n,t){t===void 0&&(t=null);t==null&&(t=this._Delay);this.clear();this._tm=window.setTimeout(n,t)},n.prototype.clear=function(){this._tm!==null&&(clearTimeout(this._tm),this._tm=null)},n}(),Wgm,OptEx,_testElem,Setup,Uap,ToolMan,splash,SplashLoader,Sort,eman,__extends,TooltipDrv,Tooltip,KeyCode,SearchUrlBuilder,SearchCancelEx,Search,UserBox,ShareBox,MeetDoc,MeetJud,JudResult,JudHeader,XTable,LinkPreview,Super,SuperBubble,EurSum,EurCtn,Modal,FavLogic,Banner,MtrStay;jQuery.cookie=function(n,t,i){function o(n,t){var i,r,u,f;if(n==null)return"";if(typeof n=="object"){i="";r=0;for(u in n)f=n[u],i+=(r>0?"&":"")+u+"="+encodeURIComponent(ToStr(f,"")),r++;return i}return t?ToStr(n,""):encodeURIComponent(ToStr(n,""))}var r,e,u,f;return arguments.length===1?(r=new RegExp("(?:^|; )"+encodeURIComponent(n)+"=([^;]*)").exec(document.cookie),r?decodeURIComponent(r[1]):null):(i=i||{},t===null&&(i.expires=-1),typeof i.expires=="number"&&(e=i.expires,u=i.expires=new Date,u.setDate(u.getDate()+e)),f=encodeURIComponent(n)+"="+o(t,i.raw)+(i.expires?"; expires="+i.expires.toUTCString():"")+(i.path?"; path="+i.path:"; path=/")+(i.domain?"; domain="+i.domain:"")+(i.secure?"; secure":""),document.cookie=f,f)};jQuery.cookieI=function(n,t){return ToInt(jQuery.cookie(n),t)};jQuery.cookieB=function(n,t){return ToBool(jQuery.cookie(n),t)};jQuery.cookieJSON=function(n,t){function r(n){var i,r,e,u,t,f;if(n==null||n.length==0||(i=n.split("&"),i.length===0))return null;for(r={},e=i.length,u=0;u<e;u++)(t=i[u],t!=null&&t.length!==0)&&(t.indexOf("=")>-1?(f=t.split("="),r[f[0]]=decodeURIComponent(f[1].replace(/\+/g," "))):r[t]=null);return r}typeof t=="undefined"&&(t=null);var i=r(jQuery.cookie(n));return i==null?t:i},function(n){typeof n.fn.wheel=="undefined"&&(n.fn.wheel=function(n,t){function f(n,t,f,e){n[r](u+t,i=="wheel"?f:function(n){n||(n=window.event);var t={originalEvent:n,target:n.target||n.srcElement,type:"wheel",deltaMode:n.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){n.preventDefault?n.preventDefault():n.returnValue=!1}};return i=="mousewheel"?(t.deltaY=-1/40*n.wheelDelta,n.wheelDeltaX&&(t.deltaX=-1/40*n.wheelDeltaX)):t.deltaY=n.detail,f(t)},e||!1)}var u="",r,i;window.addEventListener?r="addEventListener":(r="attachEvent",u="on");i="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==undefined?"mousewheel":"DOMMouseScroll";this.each(function(){f(this,i,n,t);i=="DOMMouseScroll"&&f(this,"MozMousePixelScroll",n,t)})})}(jQuery),function(n){n.fn.wheelnobubble=function(){var i=this[0],t=n(i);t.wheel(function(n){if(n.deltaY<0)t.scrollTop()==0&&EventKill(n);else{var r=t.innerHeight(),u=t.scrollTop(),f=i.scrollHeight;r+u==f&&EventKill(n)}})}}(jQuery),function(n){function u(n){var i=new r(n);return t.push(i),i}function f(n){if(t!=null){var i=o(n);i>-1&&t.splice(i,1)}}function i(n,i){n===void 0&&(n=null);i===void 0&&(i=null);var u,r;for(n==null&&(n=9),r=t.length-1;r>=0;r--)u=t[r],u!=i&&u.Close(n)}function e(n){i(n)}function o(n){for(var u=t.length,r,i=0;i<u;i++)if(r=t[i],r.Code===n)return i;return-1}var t=[],r;n.Add=u;n.Remove=f;n.Close=i;n.CloseAll=e;r=function(){function n(n){this._Opt=null;this._Opt=OptEx({Code:null,Close:null,Level:0,Enable:!1},n)}return Object.defineProperty(n.prototype,"Code",{get:function(){return this._Opt.Code},enumerable:!1,configurable:!0}),n.prototype.Close=function(n){(n===void 0&&(n=null),n!=null&&this._Opt.Level>n)||this._Opt.Enable&&(this._Opt.Enable=!1,this._Opt.Close&&this._Opt.Close())},n.prototype.CloseOthers=function(n){n===void 0&&(n=null);n==null&&(n=this._Opt.Level);i(n,this)},n.prototype.Enable=function(){this._Opt.Enable=!0},n.prototype.Disable=function(){this._Opt.Enable=!1},n.prototype.Swap=function(n){this._Opt.Enable=n},n}();n.Item=r}(Wgm||(Wgm={}));$(function(){$(document).click(function(){Wgm.Close(0)}).keydown(function(n){n.keyCode==27&&Wgm.Close(1)})});OptEx=OptExtend;_testElem=CE("a");Element.prototype.prop=function(n){var i,t,r,u,f;for(i in n){t=n[i];switch(i){case"attr":for(r in t)u=t[r],u==null?this.removeAttribute(r):this.setAttribute(r,ToStr(u));break;case"style":for(f in t)this.style[f]=t[f];break;case"cls":this.className=t;break;case"html":this.innerHTML=t;break;case"txt":this.textContent=t;break;default:this[i]=t}}};typeof _testElem.classList!="undefined"?(Element.prototype.hasClass=function(n){return!this.className||!n?!1:this.classList.contains(n)},Element.prototype.removeClass=function(n){this.className&&n&&this.classList.remove(n)},Element.prototype.addClass=function(n){n&&this.classList.add(n)},Element.prototype.toggleClass=function(n,t){return n?typeof t=="undefined"?this.classList.toggle(n):(t?this.classList.add(n):this.classList.remove(n),t):!1}):(Element.prototype.hasClass=function(n){return!this.className||!n?!1:(" "+this.className+" ").indexOf(" "+n+" ")>-1},Element.prototype.removeClass=function(n){this.className=jQuery.trim((" "+this.className+" ").replace(" "+n+" "," "))},Element.prototype.addClass=function(n){n&&(" "+this.className+" ").indexOf(" "+n+" ")===-1&&(this.className=jQuery.trim(this.className+" "+n))},Element.prototype.toggleClass=function(n,t){if(!n)return!1;var i=(" "+this.className+" ").indexOf(" "+n+" ")>-1;return typeof t=="undefined"&&(t=!i),t?i||(this.className=jQuery.trim(this.className+" "+n)):i&&(this.className=jQuery.trim((" "+this.className+" ").replace(" "+n+" "," "))),t});Element.prototype.attr=function(n,t){if(typeof t=="undefined")return this.hasAttribute(n)?this.getAttribute(n):null;t===null?this.removeAttribute(n):this.setAttribute(n,ToStr(t))};Element.prototype.attrI=function(n,t){return ToInt(this.getAttribute(n),t)};Element.prototype.attrF=function(n,t){return ToFloat(this.getAttribute(n),t)};Element.prototype.attrB=function(n,t){return ToBool(this.getAttribute(n),t)};Element.prototype.show=function(n){this.style.display=typeof n=="undefined"?"":n};Element.prototype.hide=function(){this.style.display="none"};Element.prototype.toggle=function(n,t){return typeof n=="undefined"&&(n=!this.isVisible()),n?this.show(t):this.hide(),n};Element.prototype.isVisible=function(){return this.style.display!=="none"};Element.prototype.beforeElem=function(n,t){return n=_takeElem(n,t),this.parentNode.insertBefore(n,this)};Element.prototype.afterElem=function(n,t){n=_takeElem(n,t);var i=this.parentNode;return i.lastChild===this?i.appendChild(n):i.insertBefore(n,this.nextSibling)};Element.prototype.prependElem=function(n,t){return n=_takeElem(n,t),this.insertBefore(n,this.firstChild)};Element.prototype.appendElem=function(n,t){return n=_takeElem(n,t),this.appendChild(n)};Element.prototype.insertElem=function(n,t,i){n=_takeElem(n,i);t<=0?this.insertBefore(n,this.firstChild):t>this.children.length-1?this.appendChild(n):this.insertBefore(n,this.children[t])};Element.prototype.wrapElem=function(n,t){return n=_takeElem(n,t),this.parentNode.insertBefore(n,this),n.appendChild(this),n};Element.prototype.closestElem=function(n,t){for(var i=this,r=i.ownerDocument;i!==null;){if(i===t||i===r)return null;if($.find.matchesSelector(i,n))return i;i=i.parentNode}return null};Element.prototype.hasChildren=function(){return this.children.length>0};Element.prototype.empty=function(){while(this.hasChildNodes())this.removeChild(this.lastChild)};typeof _testElem.remove=="undefined"&&(Element.prototype.remove=function(){return this.parentNode.removeChild(this)});typeof _testElem.closest=="undefined"&&(Element.prototype.closest=function(n){for(var t=this,i=t.ownerDocument;t!==null;){if(t===i)return null;if($.find.matchesSelector(t,n))return t;t=t.parentNode}return null});Element.prototype.indexOfElem=function(){return Array.prototype.indexOf.call(this.parentNode.children,this)};Element.prototype.css=function(n){for(var t in n)this.style[t]=n[t]};Setup=new function(){function e(){t=$.cookieJSON(r,{})}function o(n){if(n==null||n.length==0)return null;var t=n.match(f);return t!=null?new Date(t[3],ToInt(t[2],0)-1,t[1]):(t=n.match(u),t==null?null:new Date(t[1],ToInt(t[2],0)-1,t[3]))}function s(n){return n==null||!(n instanceof Date)?null:i(n.getDate())+"."+i(n.getMonth()+1)+"."+n.getFullYear()}function i(n){return(n<10?"0":"")+n}function h(n){return n==null||!(n instanceof Date)?null:n.getFullYear()+"-"+i(n.getMonth()+1)+"-"+i(n.getDate())}var n=this,u=/^\s*(\d+)-(\d+)-(\d+)\s*$/,f=/^\s*(\d+)\s*\.\s*(\d+)\s*\.\s*(\d+)\s*$/,t={},r="Setup";n.ValueS=function(n,i){typeof i=="undefined"&&(i=null);var r=t[n];return r==null?i:r};n.ValueI=function(n,i){typeof i=="undefined"&&(i=null);var r=ToInt(t[n]);return r==null?i:r};n.ValueI0=function(t){return n.ValueI(t,0)};n.ValueB=function(n,i){typeof i=="undefined"&&(i=null);var r=ToBool(t[n]);return r==null?i:r};n.ValueB0=function(t){return n.ValueB(t,!1)};n.ValueD=function(n,i){var f,r;return(typeof i=="undefined"&&(i=null),f=t[n],f==null)?null:(r=f.match(u),r==null?i:new Date(r[1],ToInt(r[2],0)-1,r[3]))};n.ValueDateFmt=function(t,i){return s(n.ValueD(t,i))};n.Update=function(i,u,f){if(u==null){n.Delete(i,f);return}var e=null;e=u instanceof Date?h(u):ToStr(u);Uap.IsAuthenticated&&AjaxForm("/handler/uap.ashx?Cmd=Setup_IU",{Key:i,Value:e},f);t[i]=e;$.cookie(r,t);Uap.IsAuthenticated||typeof f!="function"||f()};n.UpdateDateFmt=function(t,i,r){var u=o(i);n.Update(t,u,r)};n.Delete=function(n,i){Uap.IsAuthenticated&&AjaxForm("/handler/uap.ashx?Cmd=Setup_D",{Key:n},i);delete t[n];$.cookie(r,t);Uap.IsAuthenticated||typeof i!="function"||i()};n._Values=function(){return t};e()};Loc.enc=function(n){return n==null?"":encodeURIComponent(n)};Loc.dec=function(n){if(n==null)return"";var t=/%u([0-9a-f]{4})/g;return t.test(n)&&(n=n.replace(t,function(n,t){return String.fromCharCode(parseInt(t,16))})),decodeURIComponent(n.replace(/\+/g," "))};Uap={IsAuthenticated:!1,UserId:null};ToolMan={Diff:"porov",DiffMin:"porovmin",Comment:"koment",CommentMin:"komentmin",CommentEdit:"komentedit",CommentExp:"e",CommentSlice:"s",CommentTicket:"t",Novel:"refer",Effect:"datum",Anchor:"citace",Judik:"judik"};splash=null;$(function(){setTimeout(function(){return HideSplash()},300)});SplashLoader=function(){function n(n){this.bg=null;this.splash=null;this.img=null;this.label=null;this.tm=null;this.msg=null;typeof n=="undefined"&&(n="Vyčkejte chviličku ...");this.msg=n;this.init()}return n.prototype.show=function(n){var t=this;this.tm!=null&&clearTimeout(this.tm);n?this.tm=window.setTimeout(function(){return t.runShow()},n):this.runShow()},n.prototype.hide=function(){this.tm!=null&&clearTimeout(this.tm);this.splash.style.display="none";this.bg.style.display="none"},n.prototype.runShow=function(){var n=this;this.bg.style.display="block";this.splash.style.display="block";window.onbeforeunload=function(){setTimeout(function(){return n.refreshGif()},100)}},n.prototype.init=function(){this.splash=document.createElement("div");this.splash.style.display="none";this.splash.style.position="fixed";this.splash.style.zIndex="300000";this.splash.style.width="160px";this.splash.style.top="50%";this.splash.style.marginTop="-48px";this.splash.style.left="50%";this.splash.style.marginLeft="-80px";this.splash.style.border="medium solid silver";this.splash.style.backgroundColor="white";this.splash.style.padding="10px";this.splash.style.fontSize="14px";this.splash.style.textAlign="center";this.img=document.createElement("img");this.img.src="data:image/gif;base64,R0lGODlhHwAfAPUgALbQ5uvy99nm8cfa67vT57HN5OHr9MTY6qvI4ujw9t7p87jR5rDM5L3U6NTj8Pf5+1WRxdvn8urx91iTxkuLwm6hzs7f7oiy1qTE4HOkz/r7/IGu1GWcy8/g7vn6/Gedy////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAgACwAAAAAHwAfAAAG/0CQcEgMCAaEAmhSuSAcxKh0aDggrlcQZbvdNDxTaWKALWu53EsnPFQsymY0+rNggxjwuJwLCSsYIHlYZ3sUdwpRCW8IgVgNDgkPIAEWGBlojQsJRGSDCAARYRoFHIZlA1R5IJt2a3kGQlZlABJ2QxIAcAeTeaG2QxF5RnANv1ENcEdwUMZDDnBIcKzNq3BJcJLUIA9wStrNBdjf3GUFBNLfCdadWMzUz6cCxN/IZQIBvdTBcAEgsli0jOHSJcSAqmlhNr0awo7RJ19TIuRqdAXVEEVZyjyKtC2Bg3oZEWiK8oeiKkFZGCCaggelSTiA2LhxiXLBSjZjBL2siNBOFQ84Lw/A+mYEiRJzA+7ZCQIAIfkECQoAIAAsAAAAAB8AHwAABv9AkHBIDAgGhAKoQBgIAsSodGg4IK5XEPZ6MEynicEWqx0jBonvULEwZ92IhUINYsARZTfjq9jf82YgEAtRCW14Ww0OCQ8gDwkODVsgFBQfHURiZAgAEWoRAHiVlRceQgaBaXRpo6MNQlZbABJ0Qx0crRQbIAFmnrVDBbkUDgJjr8BDGhm5Z2MOyUQYuRcEY6rRIBa5FQVjjdm8uRPh2d5b4NkPY0zX5QljTc/lDmNOx+WSW0++2RFmUGJhmZVMQqgtB06lqpXGjBchmt50+hQK0AAiht5gUcTIESR9GhdgE9IH0BiTkxjMmWIHDkose9SwcQlHDsOIk9ygiVbl5JgMLuV4HUmypMkTOkEAACH5BAkKACAALAAAAAAfAB8AAAb/QJBwSAwIBoQCqEAYCALEqHRoOCCuVxD2ejBMp4nBFqsdIwaJ71CxMGfdiIVCDWLAEWU346vY3/NmdXNECW14Ww0OCQ8gDwkODVtlC2lDYmQIABFqEQCHWANUgZVqaWZeIFZbABJ0QxKeWwcgAWabrkMRZkZjDbhRkVtHYw6/RA5jSGOkxgljSWOMxkIPY0rT0wXR2LQU3t4TBMvcFt/eFZdYxdgY5hQXAr3YGhnuCLVjt78F7hTFqlhY/erAwd0GIQZGuUrTz5eQdIc0cfIEwtwFD0MKvcGSaFGjR8GyePvQIUofQGNQSoKw4IsdOCqx7FHDBiYcOQshYjKDxliVDpRjunCjdSTJkiZP6AQBACH5BAkKACAALAAAAAAfAB8AAAb/QJBwSAwIBoQCqEAYCALEqHRoOCCuVxD2ejBMp4nBFqsdIwaJ71CxMGfdiIVCDWLAEWU346vY3/NmdXNECW14Ww0OCQ8gDwkODVtlC2lDYmQIABFqEQCHWANUgZVqaWZeIFZbABJ0QxKeWwcgAWabrkMRZkZjDbhRkVtHYw6/RA5jSGOkxgljSWOMxkIPY0rT0wXR2I3WBMvczltNxNzIW0693MFYT7bTumNQqlisv7BjsyAGo64dgFdQgbj0RtMXDQU4UAAUakihN1gSLaJlAUMGChgXXqEUpQ9ASRlDYhT0xQ4cECJDQqDD5mRKjB8WuArjBmXKC/9+VRljM+OGDwYeuBlBomRChQsIiqkJAgAh+QQJCgAgACwAAAAAHwAfAAAG/0CQcEgMCAaEAqhAGAgCxKh0aDggrlcQ9nowTKeJwRarHSMGie9QsTBn3YiFQg1iwBFlN+Or2N/zZnVzRAlteFsNDgkPIA8JDg1bZQtpQ2JkCAARahEAh1gDVIGVamlmXiBWWwASdEMSnlsHIAFmm65DEWZGYw24UZFbR2MOv0QOY0hjpMYJY0ljjMZCD2NK09MF0diN1gTL3M5bTcTcyFtOvdzBWE+207pjUKpYrL+wY7MgBoEdrqZjUIG4lIUChwIavnT6dCXUkEIFKUjMgMECFEeQJF2hFKUPCIkgQwIaI+gLhJAoR27Zo2bBB5QgVW4cpKbDBZgUZKL55aHBhg+U+QROQ3ahwoQlTZ7QCQIAIfkECQoAIAAsAAAAAB8AHwAABv9AkHBIDAgGhAKoQBgIAsSodGg4IK5XEPZ6MEynicEWqx0jBonvULEwZ92IhUINYsARZTfjq9jf82Z1c0QJbXhbDQ4JDyAPCQ4NW2ULaUNiZAgAEWoRAIdYA1SBlWppZl4gVlsAEnRDEp5bByABZpuuQxFmRmMNuFGRW0djDr9EDmNIY6TGCWNJY4zGQg9jStPTExTb21DY1VsFFdzbFtggzlsEF+QUGOfIW2LtGRrYwVgCDu0U17+6Y6BsaMehwy9YY2aBaMAPnStTY1B5YMdNiyZOngCFGtLhwzZAiRY1eoTvE6UoCyAAGrNSEoNBUuzAaYlljxo2M+HIeXiJpRsRNMaq+JSFCpsRJEqYOPH2JQgAIfkECQoAIAAsAAAAAB8AHwAABv9AkHBIDAgGhAKoQBgIAsSodGg4IK5XEPZ6MEynicEWqx0jBonvULEwZ92IhUINYsARZTfju4DkzX9jdXNEHR8UFH8NDgkPIA8JDg1bZQtpQh4XiIhaABFqEQB4WwNDDZubIJdqaWZeIBuoFBwddEMSolsHIA6yFEq2QxFmAQiyGRrBRJNbApqoGMpEDmMDFbIW0kMJYwQTslDaj2PA4soFY47iD+QEY6vS3FtNYw7m1KQCYw3mzFhPZj5JGzYGipUtACQowzVmFwgDgOCBCYTgFQgxZBB4AiXqT6ltbUZhWdToUSR/Ii1FUbDnDkUyDAhJsQPn5ZU9atjUhCPHVhgTNy/RSKsiqKFFbUaQKGHiJNyXIAAh+QQFCgAgACwAAAAAHwAfAAAG/0CQcEh0IC6VCahAGAgCxKhU6GlsKFgsCMHlHgzTaeeSLW+73UEiPFx8ymY0eqFggyDwuLzLCCv6eVlnewggDHVECQtcIGUZGBZQDwkODWhnC2tDA5cUHAUaYREAhWgDQwZ7IB12IGt7YCAHcgASrUISpGgHIAF7EbdDEXsBAnINwUSWaAKcaA7JQ0amBHKa0QlyBAVyD9FCD3IF39HcaN7f4WhM1uTZaE1y0N/TacZoyN/LXU+/0cNyoMxCUytYLjm8QKSS46rVKzmxQDhjhAAAMFGkBiE4NUQRxS4NHCTwNqnSJS6ZovzRyJAQo0NhGLgs5bIPGwWLCLHsQsfhxBWTe9QkMzCwC8sv5Ho127akyRM7QQAAOw==";this.img.width=31;this.img.height=31;this.img.style.display="block";this.img.style.margin="10px auto";this.splash.appendChild(this.img);this.label=document.createElement("label");this.label.innerHTML=this.msg;this.label.style.display="block";this.label.style.margin="10px 0";this.splash.appendChild(this.label);document.body.appendChild(this.splash);this.bg=document.createElement("div");this.bg.style.display="none";this.bg.style.position="fixed";this.bg.style.top="0";this.bg.style.left="0";this.bg.style.right="0";this.bg.style.bottom="0";this.bg.style.zIndex="200000";this.bg.style.background="#fff";this.bg.style.msFilter="progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";this.bg.style.filter="alpha(opacity=80)";this.bg.style.opacity="0.8";document.body.appendChild(this.bg)},n.prototype.refreshGif=function(){this.img!=null&&this.img.setAttribute("src",this.img.getAttribute("src"))},n}();Sort=function(){function n(n,t){var i=this;this._Opt=null;this._Root=null;this._$Root=null;this._Origin=null;this._$Origin=null;this._Shift=null;this._PH=null;this._$Win=null;this._$Doc=null;this._Border=null;this._Folders=null;this._Opt=OptEx({Folder:null,EmptyMsg:"Empty folder",Item:null,Grip:null,Cross:!1,Callback:null,PH:"PH"},t);this._Root=n;this._$Root=$(this._Root);this._$Root.css("position","relative");this._$Win=$(window);this._$Doc=$(document);this._Border=40;this._Folders=[];this._$Root.mousedown(function(n){return i.RootMousedown(n)})}return n.prototype.ToggleDocBind=function(n){var t=this;if(n){this._$Doc.on("mousemove",function(n){return t.DocumentMousemove(n)});this._$Doc.on("mouseup",function(n){return t.DocumentMouseup(n)});this._$Doc.on("keyup",function(n){return t.DocumentKey(n)})}else this._$Doc.off("mousemove",function(n){return t.DocumentMousemove(n)}),this._$Doc.off("mouseup",function(n){return t.DocumentMouseup(n)}),this._$Doc.off("keyup",function(n){return t.DocumentKey(n)})},n.prototype.RootMousedown=function(n){var t,i,r;n.which===1&&(t=n.target,this._Origin=t.closestElem(this._Opt.Item,this._Root),this._Origin)&&t.closestElem(this._Opt.Grip,this._Origin)&&(this.AttachFolders(),this._$Origin=$(this._Origin),i=this._$Origin.position(),this.StyleOrigin({opacity:"0.4",height:px(this._Origin.dim.height),width:px(this._Origin.dim.width),top:px(i.top),left:px(i.left),position:"absolute",zIndex:"1000"}),r=this._$Origin.offset(),this._Shift={top:n.pageY-r.top,left:n.pageX-r.left},this.CreatePH(this._Origin),this.ToggleDocBind(!0),EventKill(n))},n.prototype.DocumentMousemove=function(n){var i;if(this._Origin!=null){this.ScrollElement(n);this.StyleOrigin({top:px(n.pageY-this._$Root.offset().top-this._Shift.top),left:px(n.pageX-this._$Root.offset().left-this._Shift.left)});var u={top:n.pageY,left:n.pageX-this._Shift.left+this._Origin.dim.width/2},r=this.GetFolder(this._PH),t=this.SeekElem(this._Folders,u);t!=null&&t.Within&&(this._Opt.Cross||t.Elem==r)&&(this.HasItems(t.Elem)?(i=this.SeekElem(t.Elem.children,u),i!=null&&(i.Trend<0?i.Elem.beforeElem(this._PH):i.Elem.afterElem(this._PH))):t.Elem.appendElem(this._PH),t.Elem!=r&&(this.ToggleEmpty(r),this.ToggleEmpty(t.Elem)),EventKill(n))}},n.prototype.DocumentMouseup=function(n){this._Origin!=null&&(this.Destroy(!0),EventKill(n))},n.prototype.DocumentKey=function(n){this._Origin!=null&&n.keyCode==27&&this.Destroy(!1)},n.prototype.Destroy=function(n){var r=this,t,i;this.StyleOrigin({position:"",top:"",left:"",width:"",height:"",opacity:"",zIndex:""});n&&this._Opt.Callback?(t=this._Origin,i=t.afterElem("div",{cls:"line"}),this._PH.afterElem(t),this._PH.remove(),this._Opt.Callback(t,this.Sort(t)-1,function(n){if(n.Status!==1){if(t!=null){var u=r.GetFolder(i),f=r.GetFolder(t);i.beforeElem(t);i.remove();r.ToggleEmpty(u);r.ToggleEmpty(f)}n.Msg!=null&&alert(n.Msg)}else i.remove()})):this._PH.remove();this._Origin=null;this._$Origin=null;this._PH=null;this.ToggleDocBind(!1)},n.prototype.ScrollElement=function(n){var t=this._$Win.height()-this._Border;n.pageY<this._$Win.scrollTop()+this._Border&&this._$Win.scrollTop(n.pageY-this._Border);n.pageY>this._$Win.scrollTop()+t&&this._$Win.scrollTop(n.pageY-t)},n.prototype.Hit=function(n,t){var u=$(n),i=this.GetDim(n,u),r=u.offset();return{Trend:r.top+i.height/2<t.top?1:-1,Within:this.IsBetween(r.top,i.height,t.top)&&this.IsBetween(r.left,i.width,t.left)}},n.prototype.IsBetween=function(n,t,i){return n<=i&&i<=n+t},n.prototype.SeekElem=function(n,t){var e,r,i,u,f;if(n==null||n.length==0)return null;if(e=n.length,i=this.GetFirst(n),i!=null&&(r=this.Hit(i,t),!r.Within&&r.Trend<0))return{Elem:i,Trend:-1,Within:!1};for(u=null,f=0;f<e;f++)if(i=n[f],this.IsSortable(i)){if(r=this.Hit(i,t),r.Within)return{Elem:i,Trend:r.Trend,Within:!0};if(r.Trend<0)return u;u={Elem:i,Trend:1,Within:!1}}return u},n.prototype.GetFirst=function(n){for(var i,r=n.length,t=0;t<r;t++)if(i=n[t],this.IsSortable(i))return i;return null},n.prototype.Sort=function(n){for(var t=0;n!=null;)n.IsSortable&&t++,n=n.previousElementSibling;return t},n.prototype.CreatePH=function(n){this._PH=n.afterElem("div",{cls:this._Opt.PH,style:{height:px(n.dim.height),width:px(n.dim.width)}});this._PH.appendElem("div")},n.prototype.AttachFolders=function(){var i,t,n;for(this._Folders=this._Opt.Folder==null?null:$.find(this._Opt.Folder,this._Root),(this._Folders==null||this._Folders.length==0)&&(this._Folders=[this._Root]),i=this._Folders.length,n=0;n<i;n++)t=this._Folders[n],t.IsSortable=!0,this.AttachItems(t)},n.prototype.HasItems=function(n){for(var i=n.children.length,t=0;t<i;t++)if(this.IsSortable(n.children[t]))return!0;return!1},n.prototype.AttachItems=function(n){for(var r=n.children.length,t,i=0;i<r;i++)(t=n.children[i],t.IsSortable=$.find.matchesSelector(t,this._Opt.Item),t.IsSortable)&&(t.dim=this.GetDim(t))},n.prototype.GetDim=function(n,t){return typeof n.dim!="undefined"?n.dim:(typeof t=="undefined"&&(t=$(n)),{height:t.outerHeight(!0),width:t.outerWidth(!0)})},n.prototype.StyleOrigin=function(n){(n===void 0&&(n=null),this._Origin!=null&&n!=null)&&this._Origin.css(n)},n.prototype.ToggleEmpty=function(n){this.HasItems(n)?$("p",n).remove():FE("p",n)==null&&n.appendElem("p",{txt:this._Opt.EmptyMsg})},n.prototype.IsSortable=function(n){return n.IsSortable&&n!=this._Origin},n.prototype.GetFolder=function(n){return this._Opt.Folder==null?this._Root:n.closestElem(this._Opt.Folder,this._Root)},n}();AddJQueryPlugin("sort",function(n){new Sort(this[0],n)}),function(n){var t=function(){function n(){this.ev=new EventMan;this.$win=$(window);this.Init()}return n.prototype.Change=function(n){this.ev.Add(n)},n.prototype.GoTo=function(n){var t,i;(n=this.ParseHash(n),n&&n!=="_")&&(t=this.ParseInterval(n),t)&&(t.Elem1=FE("#"+t.Id1),t.Elem2=t.Id2!=null?FE("#"+t.Id2):null,IsNullOrEmpty(t.Id1)||IsNullOrEmpty(t.Id2)||t.Elem1==null&&t.Elem2==null||(i=$(t.Elem1||t.Elem2).offset(),i!=null&&this.$win.scrollTop(i.top)),this.ev.Fire(t))},n.prototype.Run=function(){var n=window.location.hash;this.GoTo(n)},n.prototype.Init=function(){var n=this;this.$win.on("hashchange",function(){return n.Run()})},n.prototype.ParseHash=function(n){return!n||n==="#"?null:n.indexOf("#")===0?n.substr(1):n},n.prototype.ParseInterval=function(n){if(!n)return null;var t=n.split("_"),i={Id1:t[0]};return t.length>1&&t[0]!==t[1]&&(i.Id2=t[1]),i},n}(),i=function(){function n(){var n=this;this.items={};$(document).keypress(function(t){var i=document.activeElement,r;(i==null||i.tagName!=="INPUT")&&i.tagName!=="TEXTAREA"&&i.tagName!=="A"&&(r=n.formatId(t),typeof n.items[r]!="undefined")&&n.items[r].Fire()})}return n.prototype.Add=function(n,t){var r,i;if(n&&t)if(Array.isArray(n))for(r=n.length,i=0;i<r;i++)this.AddItem(n[i],t);else this.AddItem(n,t)},n.prototype.AddItem=function(n,t){if(n.which){var i=this.formatId(n);typeof this.items[i]=="undefined"&&(this.items[i]=new EventMan);this.items[i].Add(t)}},n.prototype.formatId=function(n){var t="";return(n.ctrlKey||n.metaKey)&&(t+="ctrl+"),n.shiftKey&&(t+="shift+"),n.altKey&&(t+="alt+"),t+n.which},n}();n.NavSum=new EventMan;n.Hash=new t;n.Shortcuts=new i}(eman||(eman={}));var Frape=function(){function n(n){this.opt=null;this._inited=null;this.$win=null;this.$root=null;this.root=null;this.opt=OptEx({HL:"HL",DD:"DIF",EM:"edit-mode",Fall:125},n);this._inited=!1;this.$win=$(window);this.root=null;this.$root=null}return n.prototype.attach=function(n,t){(t===void 0&&(t=!1),t||!this._inited)&&(this.root=n,this.root==null?(this.$root=null,this._inited=!1):(this.$root=$(this.root),this._inited=!0))},n.prototype.init=function(n,t){n===void 0&&(n=".Frags");t===void 0&&(t=!1);this.attach(FE(n),t)},n.prototype.zoomTables=function(){this.root.ZoomTables&&this.root.ZoomTables()},n.prototype.hold=function(n){var t=this.visibleFrag();n();this.scrollTo(t.Row,t.Shift)},n.prototype.pick=function(n){n===void 0&&(n=null);$(".THIS",this.root).removeClass("THIS");n!=null&&n.addClass("THIS")},n.prototype.highlight=function(n,t){var r,e,o;if(t===void 0&&(t=null),n!=null){t==null&&(t=n);n.addClass(this.opt.HL);var u=n.indexOfElem(),f=n==t?u:t.indexOfElem(),i=0;if(u<f)for(i=u;i<=f;i++)r=this.root.children[i],r.addClass(this.opt.HL);for(e=this.getLevel(t),o=this.root.children.length,i=f+1;i<o;i++){if(r=this.root.children[i],this.getLevel(r)<=e)break;r.addClass(this.opt.HL)}}},n.prototype.clean=function(){$("."+this.opt.HL,this.root).removeClass(this.opt.HL)},n.prototype.closestFID=function(n){var t=this.closestRow(n);return t?this.getFID(t):null},n.prototype.closestID=function(n){var t=this.closestRow(n);return t?this.getID(t):null},n.prototype.colNovel=function(n){var i=this.closestRow(n),t;return i?(t=this.closestChild(i,n),t!=null&&t.tagName=="EM"&&t.hasChildren()):!1},n.prototype.colOscar=function(n){var i=this.closestRow(n),t;return i?(t=this.closestChild(i,n),t!=null&&t.tagName=="DFN"&&n.closestElem("i",t)!=null):!1},n.prototype.colJudik=function(n){var i=this.closestRow(n),t;return i?(t=this.closestChild(i,n),t!=null&&t.tagName=="DFN"&&n.closestElem("u",t)!=null):!1},n.prototype.hasOscar=function(n){return FE("> dfn i",n)!=null},n.prototype.addOscar=function(n){var t=FE("> dfn",n)||n.appendElem("dfn");t.prependElem("i")},n.prototype.colCtn=function(n){var r=this.closestRow(n.target),i;if(!r)return!1;var u=$(r),f=n.pageX-u.offset().left,e=u.innerWidth(),t=40;return this.root.hasClass("EFFECT")&&(t+=85),this.root.hasClass("NOVEL")&&(t+=40),i=40,this.root.hasClass("RICIN")&&(i+=50),f>t&&f<e-i},n.prototype.contains=function(n){return this.root.contains(n)},n.prototype.isAnchor=function(n){var t=this.closestAnchor(n);return t!=null},n.prototype.alertCm=function(){var n=this.unfinished();return n==null||n.length==0?!1:(this.animateTo(n[0]),this.setIntervalX(function(){document.body.toggleClass("alert-cm")},300,10),!0)},n.prototype.hasClass=function(n){return this.root.hasClass(n)},n.prototype.addClass=function(n){this.root.addClass(n)},n.prototype.removeClass=function(n){this.root.removeClass(n)},n.prototype.toggleClass=function(n,t){return this.root.toggleClass(n,t)},n.prototype.bind=function(n,t){this.$root.on(n,t)},n.prototype.unbind=function(n,t){this.$root.off(n,t)},n.prototype.togglebind=function(n,t,i){i?this.$root.on(n,t):this.$root.off(n,t)},n.prototype.fragByFID=function(n,t){return this.fragByID(this.formatID(n,t))},n.prototype.fragByID=function(n){var t=FE("#f"+n,this.root);return t==null?null:this.closestRow(t)},n.prototype.fragByAnchor=function(n){var t=FE("#"+n,this.root);return t==null?null:this.closestRow(t)},n.prototype.commentByFID=function(n,t){t===void 0&&(t=null);var i=FE("[data-for='"+this.formatID(n,t)+"']",this.root);return i==null?null:this.closestRow(i)},n.prototype.commentByID=function(n){var t=FE("#c"+n,this.root);return t==null?null:this.closestRow(t)},n.prototype.firstComment=function(){var n=this;return this.nextRowByIndex(function(t){return n.isCm(t)})},n.prototype.prevComment=function(n){var t=this;return this.prevRowByIndex(function(n){return t.isCm(n)},n.indexOfElem())},n.prototype.nextComment=function(n){var t=this;return this.nextRowByIndex(function(n){return t.isCm(n)},n.indexOfElem())},n.prototype.lastComment=function(){var n=this;return this.prevRowByIndex(function(t){return n.isCm(t)})},n.prototype.firstDiff=function(){var n=this;return this.nextRowByIndex(function(t){return n.isDiff(t)})},n.prototype.prevDiff=function(n){var t=this;return this.prevRowByIndex(function(n){return t.isDiff(n)},n.indexOfElem())},n.prototype.nextDiff=function(n){var t=this;return this.nextRowByIndex(function(n){return t.isDiff(n)},n.indexOfElem())},n.prototype.lastDiff=function(){var n=this;return this.prevRowByIndex(function(t){return n.isDiff(t)})},n.prototype.prevRowByIndex=function(n,t){var i,r;for(typeof t=="undefined"&&(t=this.root.children.length),i=t-1;i>=0;i--)if(r=this.root.children[i],n(r))return r;return null},n.prototype.nextRowByIndex=function(n,t){var u,i,r;for(typeof t=="undefined"&&(t=-1),u=this.root.children.length,i=t+1;i<u;i++)if(r=this.root.children[i],n(r))return r;return null},n.prototype.closestRow=function(n){return this.closestChild(this.root,n)},n.prototype.closestFrag=function(n){var t=this.closestRow(n);return t!=null&&!this.isCm(t)?t:null},n.prototype.visibleRow=function(n){for(var u=this.$win.scrollTop()+this.opt.Fall,t,f,i,r=0,e=this.root.children.length;r<e;r++)if((t=this.root.children[r],n(t))&&(f=$(t),i=f.offset(),i.top>=u))return{Row:t,FID:this.getFID(t),Ver:this.getVer(t),Shift:this.opt.Fall+Math.round(i.top-u)};return null},n.prototype.visibleDiff=function(){var n=this;return this.visibleRow(function(t){return n.isDiff(t)})},n.prototype.visibleFrag=function(){var n=this;return this.visibleRow(function(t){return n.isFragInSlice(t)})},n.prototype.visibleComment=function(){var n=this;return this.visibleRow(function(t){return n.isCm(t)})},n.prototype.scrollTo=function(n,t){var u=this,i,r;(typeof t=="undefined"&&(t=this.opt.Fall),n!=null)&&(i=$(n).offset(),r=i.top-t,setTimeout(function(){u.$win.scrollTop(r)},0))},n.prototype.animateTo=function(n,t){if(typeof t=="undefined"&&(t=this.opt.Fall),n!=null){var i=$(n).offset(),r=i.top-t;AnimateTo(r)}},n.prototype.getLevel=function(n){return n!=null?this.parseLevel(n.className):0},n.prototype.getFID=function(n){var t=this.getID(n);return t==null?null:this.parseFID(t)},n.prototype.getVer=function(n){var t=this.getID(n);return t==null?null:this.parseVer(t)},n.prototype.getID=function(n){var t=FE("> a[id]",n);return t==null?null:t.id.substr(1)},n.prototype.formatID=function(n,t){t===void 0&&(t=null);var i=ToStr(n);return t!=null&&(i+="-"+t),i},n.prototype.parseFID=function(n){var t=n.indexOf("-");return t>-1&&(n=n.substring(0,t)),ToInt(n)},n.prototype.parseVer=function(n){var t=n.indexOf("-");return t>-1?ToInt(n.substr(t+1)):null},n.prototype.parseLevel=function(n){var t=/(?:\s|^)L(\d+)(?:\s|$)/.exec(n);return t?ToInt(t[1],0):0},n.prototype.isFragInSlice=function(n){return!this.isCm(n)&&!this.isOtherSlice(n)&&!this.isSilver(n)},n.prototype.isOtherSlice=function(n){return n.hasClass("OS")},n.prototype.isSilver=function(n){return n.hasClass("SIL")},n.prototype.isCm=function(n){return n.tagName=="FIGURE"},n.prototype.isDiff=function(n){return n.hasClass(this.opt.DD)},n.prototype.closestChild=function(n,t){if(t==null||!n.contains(t))return null;for(var i=0;t!=null&&t.parentNode!=n&&i<20;)t=t.parentNode,i++;return t},n.prototype.unfinished=function(){return $.find("figure."+this.opt.EM,this.root)},n.prototype.setIntervalX=function(n,t,i){var r=0,u=window.setInterval(function(){n();++r===i&&window.clearInterval(u)},t)},n.prototype.canWriteCm=function(){return this.root.hasClass("AddCm")},n.prototype.closestAnchor=function(n){var i=this.closestRow(n),t;return i?(t=n.closestElem("a",this.root),!t)?null:this.isCm(i)?t.closestElem(".value",i)!=null?t:null:t.attr("id")?null:t:null},n}(),frape=new Frape(null),Formater=function(){function n(){this._dia={"á":"a","ä":"a","č":"c","ď":"d","é":"e","ě":"e","í":"i","ľ":"l","ĺ":"l","ň":"n","ó":"o","ô":"o","ř":"r","š":"s","ú":"u","ů":"u","ý":"y","ž":"z"};this._replace={a:"[aáä]",c:"[cč]",d:"[dď]",e:"[eéě]",i:"[ií]",l:"[lľĺ]",n:"[nň]",o:"[oóô]",r:"[rřŕ]",s:"[sš]",t:"[tť]",u:"[uůú]",y:"[yý]",z:"[zž]"}}return n.prototype.RemoveDia=function(n){var t=this._dia;return n.replace(/[^\u0000-\u007E]/g,function(n){return t[n]||n})},n.prototype.CreateRx=function(n){var t=this._replace;return n.replace(/[\u0061-\u007A]/g,function(n){return t[n]||n})},n.prototype.PrepareRx=function(n){return n?(n=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),n=n.toLowerCase(),n=this.RemoveDia(n),n=this.CreateRx(n),n.length==0?null:new RegExp(n,"gi")):null},n}(),PopupTabs=function(){function n(n){(this.opt=null,this.popup=null,this.$popup=null,this.header=null,this.body=null,this.activeTab=null,n.Popup!=null&&n.Body!=null&&n.Header!=null)&&(this.opt=OptEx({Popup:null,Header:null,Body:null,Key:null,Tsel:".Tab",CodeAttr:"data-code",NameAttr:"data-name",AC:"Selected"},n),this.popup=n.Popup,this.$popup=$(this.popup),this.header=n.Header,this.body=n.Body,this.activeTab=null)}return n.prototype.Init=function(){if(this.LoadHeader(),IsNullOrEmpty(this.opt.Key))this.TryActivateTab();else{var n=Setup.ValueS(this.opt.Key);n=this.TryActivateTab(n);Setup.Update(this.opt.Key,n)}},n.prototype.SelectTab=function(n){this.LoadHeader();IsNullOrEmpty(this.opt.Key)?this.TryActivateTab(n):(n=this.TryActivateTab(n),Setup.Update(this.opt.Key,n))},n.prototype.TabExist=function(n){for(var t=0,i=this.header.children.length;t<i;t++)if(this.header.children[t].Code==n)return!0;return!1},n.prototype.TryActivateTab=function(n){return n===void 0&&(n=null),n!=null&&this.TabExist(n)||(n=this.TabFirstCode()),this.ActivateTab(n),n},n.prototype.ActivateTab=function(n){for(var r,u,f,t=0,i=this.header.children.length;t<i;t++)r=this.header.children[t],r.toggleClass(this.opt.AC,r.Code==n);for(u=this.BdTabs(),t=0,i=u.length;t<i;t++)f=u[t],f.toggle(f.attr(this.opt.CodeAttr)==n);this.activeTab=n},n.prototype.LoadHeader=function(){var f=this,r=this.BdTabs(),n,u,t,i;for(this.header.empty(),n=0,u=r.length;n<u;n++)t=r[n],i=this.header.appendElem("li",{onclick:function(n){return f.Tab_Click(EventFix(n))}}),i.Code=t.attr(this.opt.CodeAttr),i.appendElem("span",{html:t.attr(this.opt.NameAttr)})},n.prototype.TabFirstCode=function(){return this.header.hasChildren()?this.header.children[0].Code:null},n.prototype.Tab_Click=function(n){var t=this,i=n.currentTarget,u=this.$popup.outerHeight(),f=this.ParsePx(this.popup.style.top),e=this.ParsePx(this.body.style.minHeight)||0,r=$(this.body).outerHeight();r>e&&(this.body.style.minHeight=px(r));this.ActivateTab(i.Code);IsNullOrEmpty(this.opt.Key)||Setup.Update(this.opt.Key,i.Code);setTimeout(function(){var n=u-t.$popup.outerHeight();t.popup.style.top=px(f+n)},0)},n.prototype.ParsePx=function(n){if(n==null||n.length==0)return null;var t=n.match(/^([0-9\.]+)px$/);return t?ToFloat(t[1]):null},n.prototype.BdTabs=function(){return $.find(this.opt.Tsel,this.body)},n}();(function(n){n.fn.buzzdocs=function(t){function u(r){var u,f;(n(".buzz-pack-grid tr."+t.HL).removeClass(t.HL),u=r.Elem1,u)&&(f=u.closestElem("tr",i),f)&&f.addClass("HL")}function f(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptEx({HandlerUrl:"/handler/comment.ashx",HL:"HL"},t);var i=this[0],r=new Super;n(i).sort({Folder:".items",Item:"table",Grip:"img.sort",Callback:function(n,t){var i=n.attrI("data-p");i!=null&&t!=null&&f("PackSort",{PackId:i,Sort:t+1},function(){})}});n(i).click(function(n){var f=n.target,t=f.closestElem("[data-p]",i),u;if(t!=null&&(u=f.closestElem(".pack-super",t),u!=null)){r.Run("SuperPack",{PackId:t.attrI("data-p"),View:3},u);return}});n(window).on({scroll:function(){return r.Close()},resize:function(){return r.Move()}});eman.Hash.Change(u)}})(jQuery);__extends=this&&this.__extends||function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),function(n){function a(n){if((n.tagName==="A"||n.tagName==="SPAN"||n.tagName==="DIV")&&n.hasAttribute("data-cmd")){var t=n.attr("data-cmd");switch(t){case r.Cmd:return new r;case u.Cmd:return new u;case f.Cmd:return new f;case e.Cmd:return new e;case o.Cmd:return new o;case s.Cmd:return new s;case h.Cmd:return new h;default:return null}}else return n.hasAttribute("data-desc-body")?new l:new c}var i=function(){function n(){this._elem=null;this._opt=null}return n.prototype.Init=function(n,t){this._elem=n;this._opt=t},n.prototype.GetWidth=function(){return this._opt.Width},n}(),t=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.Process=function(n){var i=this,r=this.GetData(),t=this.GetCache();this._elem[t]==null?AjaxForm(this._opt.HandlerUrl,r,function(r){r.Status===1?(i._elem[t]=r.Html,n(i._elem,r.Html)):i._elem[t]=null}):n(this._elem,this._elem[t])},t.prototype.GetCache=function(){return"CacheTT"},t}(i),r=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetWidth=function(){return 680},t.prototype.GetData=function(){return{cmd:t.Cmd,packid:this._elem.attrI("data-packid"),docid:this._elem.attrI("data-docid")}},t.prototype.GetCache=function(){return"CacheTT-"+this._elem.attrI("data-packid",0)},t.Cmd="pack",t}(t),u=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,typeid:this._elem.attrI("data-typeid"),itemid:this._elem.attrI("data-itemid")}},t.Cmd="field",t}(t),f=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,value:this._elem.attr("data-value")}},t.Cmd="sdate",t}(t),e=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,docid:this._elem.attrI("data-docid"),indirect:this._elem.attrB("data-indirect")}},t.Cmd="novel",t}(t),o=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,docid:this._elem.attrI("data-docid"),sliceid:this._elem.attrI("data-sliceid"),href:this._elem.attr("href")}},t.Cmd="lag",t}(t),s=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,talkid:this._elem.attrI("data-talkid")}},t.Cmd="talk",t}(t),h=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:t.Cmd,value:this._elem.attr("data-value")}},t.Cmd="sblock",t}(t),c=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.GetData=function(){return{cmd:"href",value:this._elem.attr("href")||""}},t.prototype.GetWidth=function(){var n=this._elem.attr("href")||"";return n.indexOf("/balicek")>-1?680:this._opt.Width},t}(t),l=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return __extends(t,n),t.prototype.Process=function(n){var t=this.DescRender(this._elem.attr("data-desc-body"),this._elem.attr("data-desc-head")||this._elem.innerHTML);n(this._elem,t)},t.prototype.DescRender=function(n,t){return'<div class="PopArea Edges"><div class="Hd"><span class="Number"><span class="val">'+t+'<\/span><\/span><span class="Name">'+n+"<\/span><\/div><\/div>"},t}(i);n.Create=a}(TooltipDrv||(TooltipDrv={}));Tooltip=function(){function n(n,t){var i=this;this._Opt=null;this._Popup=null;this._$Popup=null;this._Ctn=null;this._Tm1=null;this._Tm2=null;this._Wg=null;this._$Win=null;this._Active=null;this._$Active=null;this._Arrow=null;this._Opt=OptEx({HandlerUrl:"/handler/tooltip.ashx",Width:600,Page:900,Delay:500,ArrowOffset:12},t);this._Tm1=new Timer(this._Opt.Delay);this._Tm2=new Timer(this._Opt.Delay);this._$Win=$(window);this._Wg=Wgm.Add({Close:function(){return i.Close()},Level:0});n.on({mouseenter:function(n){return i.LinkMouseenter(n)},mouseleave:function(n){return i.LinkMouseleave(n)},mousedown:function(n){return i.LinkMousedown(n)}})}return n.prototype.LinkMouseenter=function(n){var t=this;this.SetActive(n.currentTarget);this._Tm1.run(function(){return t.Start()});this._Tm2.clear()},n.prototype.LinkMouseleave=function(){var n=this;this.SetActive(null);this._Tm1.clear();this._Tm2.run(function(){return n.Close()})},n.prototype.LinkMousedown=function(){this.SetActive(null);this._Tm1.clear();this._Tm2.clear();this.Close()},n.prototype.PopupMouseenter=function(){this.SetActive(null);this._Tm1.clear();this._Tm2.clear()},n.prototype.PopupMouseleave=function(){var n=this;this.SetActive(null);this._Tm1.clear();this._Tm2.run(function(){return n.Close()})},n.prototype.PopupClick=function(n){this._Ctn.contains(n.target)&&n.stopPropagation()},n.prototype.Create=function(){var n=this,t;this._Popup=document.body.appendElem("div",{cls:"Pop NA",style:{display:"none",width:px(this._Opt.Width)}});t=this._Popup.appendElem("div",{cls:"OC"});t.appendElem("a",{cls:"Close",onclick:function(){return n.Close()}});this._Ctn=t.appendElem("div",{cls:"Con"});this._Arrow=this._Popup.appendElem("div",{cls:"Bulvar"});this._$Popup=$(this._Popup);this._$Popup.on({mouseenter:function(t){return n.PopupMouseenter(t)},mouseleave:function(t){return n.PopupMouseleave(t)},click:function(t){return n.PopupClick(t)}})},n.prototype.Start=function(){var t=this,n;this._Active!=null&&(this._Popup==null&&this.Create(),n=TooltipDrv.Create(this._Active),n!=null&&(n.Init(this._Active,{HandlerUrl:this._Opt.HandlerUrl,Width:this._Opt.Width}),this._Popup.style.width=px(n.GetWidth()),n.Process(function(n,i){t.Open(n,i)})))},n.prototype.Open=function(n,t){this._Popup!=null&&(this._Wg.CloseOthers(),this._Wg.Enable(),this._Ctn.innerHTML=t,this._Popup.show("block"),this.Move())},n.prototype.Close=function(){this._Popup!=null&&(this._Wg.Disable(),this._Popup.hide(),this._Ctn.empty())},n.prototype.Move=function(){var o,t;if(this._Popup!=null&&this._Active!=null){var i=this._$Active.offset(),s=i.top-this._$Popup.outerHeight()-this._Opt.ArrowOffset,u=this._$Win.width(),f=this._$Popup.outerWidth(),r=(u-this._Opt.Page)/2,e=u-r-f,n=i.left+this._$Active.outerWidth()/2-f/5;n<r&&(n=r);n>e&&(n=e);this._Popup.css({top:px(s),left:px(n)});o=i.left+this._$Active.outerWidth()/2-n;this._Arrow.style.left=px(o);FE(".Go",this._Ctn,{href:this._Active.attr("href")});t=FE(".Frags",this._Ctn);t!=null&&($(t).wheelnobubble(),setTimeout(function(){var n=FE(".HL",t);n!=null&&$(t).scrollTop($(n).position().top+$(t).scrollTop()-50)},0));$(".Pv",this._Ctn).hide()}},n.prototype.SetActive=function(n){this._Active=n;this._$Active=n!=null?$(n):null},n}();AddJQueryPlugin("tooltip",function(n){new Tooltip(this,n)}),function(n){n.fn.trafo=function(t){function c(i){var p=f(i.attr("data-tc"),t.TS),a=i.attr("disabled")!=null,u=i.parentNode.appendElem("div",{cls:p}),l,v,c,y;a&&u.addClass("disabled");u.title=i.attr("data-title");l=u.appendElem("a");v=l.appendElem("span");l.appendElem("i",{cls:"ai ai-wedge"});var h=null,o=null,s=null;if(!a)for(h=u.appendElem("ul",{style:{display:"none"}}),c=0,y=i.options.length;c<y;c++)o=i.options[c],s=h.appendElem("li",{html:o.text}),s.option=o,s.toggleClass("disabled",o.attr("disabled")!=null),s.toggleClass("lock",o.attrB("data-lock")),IsNullOrEmpty(o.title)||(s.title=o.title),n(s).click(d);i.hide();u.cap=v;u.ul=h;u.select=i;u.activeIndex=i.selectedIndex;h!=null&&n(h).wheelnobubble();r.push(u);e(u)}function l(i){var u=f(i.attr("data-tc"),t.TR),r=CE("span",{cls:u});r.toggleClass(t.CC,i.checked);i.wrapElem(r);n(i).change(a)}function a(){n("input[type='radio'][name='"+this.name+"']").each(function(){this.parentNode.toggleClass(t.CC,this.checked)})}function v(i){var u=f(i.attr("data-tc"),t.TC),r=CE("span",{cls:u});r.toggleClass(t.CC,i.checked);r.toggleClass("disabled",i.disabled);i.wrapElem(r);i.disabled||n(i).change(w)}function y(n){var i=f(n.attr("data-tc"),t.TI);n.wrapElem("div",{cls:i})}function p(n){var i=f(n.attr("data-tc"),t.TT),r=n.beforeElem("div",{cls:i});r.appendElem(n)}function w(){this.parentNode.toggleClass(t.CC,this.checked)}function b(n){var f=n.target,r=f.closestElem("div."+t.TS),e;if(r){if(e=f.closestElem("a",r),!e||!r.ul)return;r.ul.isVisible()?u(r):(g(r),o())}else i=null,o()}function k(t){var r,f;if(i&&i.ul.isVisible()){r=i;switch(t.which){case 13:case 9:f=r.ul.childNodes[r.activeIndex];f.option.selected=!0;e(r);u(r);n(r.select).trigger("change");EventKill(t);break;case 27:u(r);EventKill(t);break;case 38:h(r,-1);EventKill(t);break;case 40:h(r,1);EventKill(t)}}}function d(t){if(this.option.attr("disabled")!=null){EventKill(t);return}var i=this.parentNode.parentNode;this.option.selected=!0;e(i);u(i);n(i.select).trigger("change")}function g(n){n.ul&&(i=n,s(n,n.select.selectedIndex),n.ul.show("block"),n.addClass("on"))}function o(){var f,n,t;if(r&&r.length!=0)for(f=r.length,n=0;n<f;n++)t=r[n],(i==null||t!=i)&&u(t)}function u(n){n.ul&&(n.ul.hide(),n.removeClass("on"),i===n&&(i=null))}function s(n,i){var u,f,r,e;if(n.ul)for(n.activeIndex=i,u=n.ul,f=u.children.length,r=0;r<f;r++)e=u.children[r],e.toggleClass(t.AC,r==i)}function e(n){var t=n.select,i=t.selectedIndex;i>-1&&(n.cap.innerHTML=t.options[i].text)}function h(n,t){var r=n.ul.childNodes.length-1,i=n.activeIndex==null?-1:n.activeIndex;t>=0?i++:i--;i>r&&(i=0);i<0&&(i=r);s(n,i)}function f(){for(var u,n,f,i,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(u=r.length,u===0)return"";for(n="",i=0;i<u;i++)(f=r[i],f)&&(n.length>0&&(n+=" "),n+=f);return n}t=OptEx({TS:"tfs",TC:"tfc",TR:"tfr",TI:"tfi",TT:"tft",AC:"active",CC:"checked"},t);var r=[],i=null;this.each(function(){switch(this.tagName){case"SELECT":c(this);break;case"INPUT":switch(this.type){case"radio":l(this);break;case"checkbox":v(this);break;case"text":case"password":y(this)}break;case"TEXTAREA":p(this)}});r!=null&&r.length>0&&(n(document).mousedown(b),n(document).keydown(k))}}(jQuery),function(n){n[n.backspace=8]="backspace";n[n.tab=9]="tab";n[n.enter=13]="enter";n[n.esc=27]="esc";n[n.arrow_up=38]="arrow_up";n[n.arrow_down=40]="arrow_down"}(KeyCode||(KeyCode={})),function(n){function u(n){var t=f(n.Type);return t.Init(n),t}function f(n){switch(n){case t.doc:return new r;default:return new i}}var t,i,r;(function(n){n[n.basic=0]="basic";n[n.doc=1]="doc"})(t=n.Type||(n.Type={}));i=function(){function n(){this._Opt=null}return n.prototype.Init=function(n){this._Opt=OptEx({Type:t.basic,SearchUrl:null,DocBestCode:null},n)},n.prototype.Navigate=function(n){return n},n.prototype.Fulltext=function(n){var t=new Loc(window.location.href);return t.hash(null),t.param("text",n),t.render()},n.prototype.Search=function(n){var t=new Loc;return t.load(this._Opt.SearchUrl),t.hash(null),t.param("text",n),t.render()},n}();r=function(){function n(){this._Opt=null}return n.prototype.Init=function(n){this._Opt=OptEx({Type:t.doc,SearchUrl:null,DocBestCode:null},n)},n.prototype.Navigate=function(n){var u=new Loc(n),t=ParseDocUrl(window.location.pathname)||{},i=ParseDocUrl(u.path())||{},r;return t.collection===i.collection&&t.doc===i.doc&&(t.slice||this._Opt.DocBestCode)===(i.slice||this._Opt.DocBestCode)&&IsNullOrEmpty(t.tab)?(r=new Loc(window.location.href),r.hash(u.hash()),r.render()):n},n.prototype.Fulltext=function(n){var t=new Loc(window.location.href),i=ParseDocUrl(t.path());return i==null||IsNullOrEmpty(i.tab)||t.path(FormatDocUrl(i.collection,i.doc,i.slice)),t.hash(null),t.param("text",n),t.render()},n.prototype.Search=function(n){var t=new Loc;return t.load(this._Opt.SearchUrl),t.hash(null),t.param("text",n),t.render()},n}();n.Create=u}(SearchUrlBuilder||(SearchUrlBuilder={}));SearchCancelEx=function(){function n(n){var t=this;(this.ToggleCancel=function(){t._Cancel.toggle(!IsNullOrEmpty(t._Input.value))},n==null||n.type!=="search"||n.parentNode.hasClass("search-cancel-ex")||navigator.userAgent.match(/Firefox\//g)==null)||(this.WrapInput(n),this.AppendBtn(this._Container),this.AttachAll(),this.Position())}return n.prototype.WrapInput=function(n){this._Input=n;this._$Input=$(this._Input);this._Container=this._Input.beforeElem("div",{cls:"search-cancel-ex"});this._Input.wrapElem(this._Container)},n.prototype.AppendBtn=function(n){this._Cancel=n.appendElem("span",{cls:"search-cancel-btn",innerHTML:"×",style:{display:"none"}});this._$Cancel=$(this._Cancel)},n.prototype.AttachAll=function(){var n=this;this._$Cancel.click(function(){n._Input.value="";$(n._Input).focus()});this._$Input.on({blur:this.ToggleCancel,focus:this.ToggleCancel,keydown:this.ToggleCancel,input:this.ToggleCancel});this.ToggleCancel()},n.prototype.Position=function(){var n=this._$Input.outerHeight(),t=this._$Cancel.outerHeight();this._Cancel.style.top=px(n/2-t/2)},n}();Search=function(){function n(n,t){var i=this,r,u,f;if(this._Opt=null,this._Root=null,this._Items=[],this._Index=null,this._Tm=null,this._Xhr=null,this._IsLocal=!1,this._Suggest=null,this._Input=null,this._Marks=[],this._MarkIndex=-1,this._Pager=null,this._PagerNext=null,this._PagerPrev=null,this._PagerCount=null,this._Chip=null,this._ChipBtn=null,this._Opt=OptEx({SuggestPlace:".SuggestPlace",Focus:!1,Context:{},Value:null,IsDetail:!1,StartWithLocal:!1,HandlerUrl:"/handler/suggest2.ashx",Delay:200,SC:"suggest_over",MinChars:1,DetailName:null,UrlBuilder:null,Marks:null},t),this._Root=n,this._Root!=null){this._IsLocal=this._Opt.StartWithLocal;this._Tm=new Timer(this._Opt.Delay);this._UrlBuilder=SearchUrlBuilder.Create(this._Opt.UrlBuilder);frape.init();this._Input=FE("input",this._Root);$(this._Input).on({blur:function(n){return i.InputOnBlur(n)},focus:function(n){return i.InputOnFocus(n)},keydown:function(n){return i.InputOnKeydown(n)}});$(this._Input).on("input propertychange",function(n){return i.InputOnInput(n)});if(this._Opt.Focus&&(this._Input.focus(),setTimeout(function(){i._Input.selectionStart=i._Input.selectionEnd=1e4},0)),new SearchCancelEx(this._Input),r=FE(this._Opt.SuggestPlace,this._Root),r==null)throw"SuggestPlace '"+this._Opt.SuggestPlace+"' neexistuje!";u=r.afterElem("div",{cls:"suggest-parent"});this._Suggest=u.appendElem("div",{cls:"suggest",style:{display:"none",width:px($(r).outerWidth())}});$(this._Suggest).on({click:function(n){return i.SuggestOnClick(n)},mouseover:function(n){return i.SuggestOnMouseOver(n)}});this._Suggest.empty();this.AddData(null,this.IsBackRow);f=FE(".BtnSubmit",this._Root);$(f).on({click:function(n){return i.BtnOnClick(n)}});$(window).on({keydown:function(n){if(n.which===114||n.shiftKey&&n.which===114||n.altKey&&n.which===70){if(i._IsLocal&&i._Pager!=null&&i._Pager.isVisible()&&(n.shiftKey&&n.which===114?i.Mark_PrevOnClick(n):n.which===114&&i.Mark_NextOnClick(n)),EventKill(n),document.activeElement===i._Input)return;i._Input.focus()}}});this._Opt.IsDetail&&(this._Marks=this._Opt.Marks||[],this._Pager=FE(".Pager",this._Root),this._Pager!=null&&(this._PagerNext=FE(".Next",this._Pager,{title:"F3"}),$(this._PagerNext).click(function(n){return i.Mark_NextOnClick(n)}),this._PagerPrev=FE(".Prev",this._Pager,{title:"Ctrl+F3"}),$(this._PagerPrev).click(function(n){return i.Mark_PrevOnClick(n)}),this._PagerCount=FE(".Count",this._Pager),this._Marks!=null&&this._Marks.length>0&&IsNullOrEmpty(window.location.hash)&&(this._MarkIndex=this.Mark_FindNext(),this.Mark_Anim()),this.Mark_DrawCount()),this._Chip=FE(".Chip",this._Root),this._ChipBtn=FE("a",this._Chip),$(this._ChipBtn).click(function(){i.ChipHide();i._Input.focus()}))}}return Object.defineProperty(n.prototype,"IsBackRow",{get:function(){return this._Opt.IsDetail&&!this._IsLocal},enumerable:!1,configurable:!0}),n.prototype.BtnOnClick=function(n){this.FormSubmit();EventKill(n)},n.prototype.InputOnKeydown=function(n){switch(n.which){case KeyCode.arrow_up:EventKill(n);this._Items==null||this._Items.length===0?this.Load():this._Suggest.isVisible()?this.Step(-1):(this._Index=null,this.SelectByIndex(),this.SuggestShow());break;case KeyCode.arrow_down:EventKill(n);this._Items==null||this._Items.length===0?this.Load():this._Suggest.isVisible()?this.Step(1):(this._Index=null,this.SelectByIndex(),this.SuggestShow());break;case KeyCode.esc:EventKill(n);this.SuggestHide();this._Index=null;this.SelectByIndex();break;case KeyCode.tab:case KeyCode.enter:this._Index!=null?(EventKill(n),this.Run()):(EventKill(n),this.FormSubmit());break;case KeyCode.backspace:IsNullOrEmpty(this._Input.value)&&(EventKill(n),this.ChipHide())}},n.prototype.InputOnInput=function(){var n=this;this._Tm.run(function(){return n.Load()})},n.prototype.InputOnFocus=function(){},n.prototype.InputOnBlur=function(){var n=this;setTimeout(function(){return n.SuggestLazyKill()},this._Opt.Delay)},n.prototype.SuggestOnMouseOver=function(){this._Index=null;this.SelectByIndex()},n.prototype.SuggestOnClick=function(n){var t=n.target.closestElem("li",this._Suggest);t!=null&&(this.Process(t),this.SuggestHide())},n.prototype.SuggestLazyKill=function(){document.activeElement!==this._Input&&this.SuggestHide()},n.prototype.SuggestShow=function(){this._Suggest.show("block")},n.prototype.SuggestHide=function(){this._Suggest.hide();this.SelectByIndex(null)},n.prototype.SuggestFill=function(n,t){this._Suggest.hide();this._Suggest.empty();this.AddData(n,t);(n!=null&&n.length>0||t)&&this.SuggestShow()},n.prototype.FormSubmit=function(){var n=$.trim(this._Input.value);window.location.href=this._IsLocal?this._UrlBuilder.Fulltext(n):this._UrlBuilder.Search(n)},n.prototype.Load=function(){var i=this,r=$.trim(this._Input.value),n,t;if(r.length>=this._Opt.MinChars){n={text:r};for(t in this._Opt.Context)n[t]=this._Opt.Context[t];this._Xhr&&this._Xhr.readyState!==4&&this._Xhr.abort();this._Xhr=AjaxForm(this._Opt.HandlerUrl,n,function(n){n.Status===1&&i.SuggestFill(n.Data,i.IsBackRow)})}else this.SuggestFill(null,this.IsBackRow)},n.prototype.AddData=function(n,t){var r,i;if(t===void 0&&(t=!1),this._Items=[],this._Index=null,t&&this.AddDataBack(),n!=null)for(r=n.length-1,i=r;i>=0;i--)this.AddDataBlock(this._Suggest,n[i])},n.prototype.AddDataBack=function(){var t=this._Suggest.appendElem("div",{cls:"Back"}),i=t.appendElem("ul"),n=i.appendElem("li",{html:"zpět na lokální vyhledávání v <a>"+(this._Opt.DetailName||"detailu")+"<\/a>",title:"jdi zpět na lokální vyhledávání"});n.Text=null;n.Url=null;n.Index=this._Items.length;n.IsBack=!0;this._Items.push(n)},n.prototype.AddDataBlock=function(n,t){var u;if(t.Items!=null&&t.Items.length!==0){var f=n.appendElem("div",{cls:t.CssClass||""}),e=f.appendElem("ul"),o=t.Items.length,i,r;for(u=0;u<o;u++)i=t.Items[u],r=e.appendElem("li",{html:(IsNullOrEmpty(t.Caption)?"":"lokálně na ")+(i.Html||i.Text),title:"jdi na "+(IsNullOrEmpty(t.Caption)?"":t.Caption+" ")+i.Text}),r.Text=i.Text,r.Url=i.Url,r.IsBack=!1,r.Index=this._Items.length,this._Items.push(r)}},n.prototype.SelectByIndex=function(n){var i,t;if(n===void 0&&(n=null),this._Items!=null&&this._Items.length!==0)for(this._Index=n,i=this._Items.length,t=0;t<i;t++)this._Items[t].toggleClass(this._Opt.SC,this._Index===t)},n.prototype.Run=function(){this._Index!=null&&(this.Process(this._Items[this._Index]),this.SuggestHide())},n.prototype.Process=function(n){if(n.IsBack){this.ChipShow();this._Input.focus();return}if(IsNullOrEmpty(n.Url))this._Input.value=n.Text,this._Input.select(),this.FormSubmit();else{window.location.href=this._UrlBuilder.Navigate(n.Url);return}},n.prototype.Step=function(n){var i=this._Items.length-1,t=this._Index==null?-1:this._Index;n>=0?t++:t--;t>i&&(t=0);t<0&&(t=i);this._Index=t;this.SelectByIndex(t);this._Input.focus()},n.prototype.Mark_NextOnClick=function(n){EventKill(n);this._MarkIndex<this._Marks.length&&(this._MarkIndex=this.Mark_FindNext(),this.Mark_Anim(),this.Mark_DrawCount())},n.prototype.Mark_PrevOnClick=function(n){EventKill(n);this._MarkIndex>0&&(this._MarkIndex=this.Mark_FindPrev(),this.Mark_Anim(),this.Mark_DrawCount())},n.prototype.Mark_Anim=function(){if(this._MarkIndex>=0){var n=frape.fragByAnchor(this._Marks[this._MarkIndex]);frape.animateTo(n,95)}},n.prototype.Mark_DrawCount=function(){this._PagerCount!=null&&(this._MarkIndex>=0?(this._PagerCount.href=this.SearchResultsUrl(),this._PagerCount.title="seznam výskytů hledání v předpisu",this._PagerCount.innerHTML=""+(this._MarkIndex+1)+" z "+this._Marks.length):this._Marks.length===0?(this._PagerCount.href="",this._PagerCount.title="",this._PagerCount.innerHTML=""+this._Marks.length):(this._PagerCount.href=this.SearchResultsUrl(),this._PagerCount.title="seznam výskytů hledání v předpisu",this._PagerCount.innerHTML=""+this._Marks.length))},n.prototype.SearchResultsUrl=function(){var n=new Loc(window.location.pathname+window.location.search);return n.path(this.RemoveTrailingSlash(n.path())+"/hledani/"),n.render()},n.prototype.RemoveTrailingSlash=function(n){return IsNullOrEmpty(n)?null:n[n.length-1]==="/"?n.substr(0,n.length-1):n},n.prototype.Mark_FindNext=function(){var i,t,n,r,u;if(this._Marks.length===0)return-1;for(i=$(window),t=i.scrollTop(),t+=50,n=this._MarkIndex;n<this._Marks.length-1;)if(n++,r=frape.fragByAnchor(this._Marks[n]),u=$(r).offset().top,u>=t)break;return n},n.prototype.Mark_FindPrev=function(){var n,r,u;if(this._Marks.length===0)return-1;if(this._MarkIndex<0)return 0;var t=$(window),i=t.scrollTop(),f=t.height(),e=i+f;for(i+=50,n=this._MarkIndex;n>0;)if(n--,r=frape.fragByAnchor(this._Marks[n]),u=$(r).offset().top,u<e)break;return n},n.prototype.PagerHide=function(){this._Pager!=null&&this._Pager.hide()},n.prototype.ChipHide=function(){this._IsLocal=!1;this._Chip!=null&&this._Chip.isVisible()&&this._Chip.hide();this._Pager!=null&&this._Pager.isVisible()&&this._Pager.hide();this.Load()},n.prototype.ChipShow=function(){this._IsLocal=!0;this._Chip!=null&&this._Chip.show();this.Load()},n}();AddJQueryPlugin("search",function(n){new Search(this[0],n)}),function(n){n.fn.formvalidation=function(t){function f(){setTimeout(u,t.Delay)}function e(){setTimeout(u,t.Delay)}function o(){var t,i,u,o;if(Page_Validators!=null)for(t="",i=0;i<Page_Validators.length;i++)if(u="/"+Page_Validators[i].controltovalidate+"/",(t.length==0||t.length>0&&t.indexOf(u)<0)&&Page_Validators[i].controltovalidate!=null){t=t+u;o=FE("#"+Page_Validators[i].controltovalidate,r);n(o).on({blur:f,focus:e})}}function u(){var t,r,n,u;if(Page_Validators!=null)for(t="",r=0;r<Page_Validators.length;r++)(n=FE("#"+Page_Validators[r].controltovalidate),n!=null)&&(u="/"+Page_Validators[r].controltovalidate+"/",Page_Validators[r].isvalid?(n.hasClass(i)&&t.length>0&&t.indexOf(u)<0||n.hasClass(i)&&t.length==0)&&n.removeClass(i):(t=t+u,n.hasClass(i)||n.addClass(i)))}var r,i;(t=OptEx({Delay:50,CssClassError:"ErrOn"},t),r=this[0],r)&&(i=t.CssClassError,o())}}(jQuery),function(n){n.fn.profilemenu=function(t){function r(){n("a[data-pm]",i).removeClass(t.CssClassSelect);t.DataPM!=""&&n("a[data-pm='"+t.DataPM+"']").addClass(t.CssClassSelect)}t=OptExtend({DataPM:"",CssClassSelect:"select"},t);var i=this[0];i&&r()}}(jQuery);UserBox=function(){function n(n,t){var i=this;this._Opt=null;this._Root=null;this._Handle=null;this._Bubble=null;this._Bd=null;this._Wg=null;this._Opt=OptEx({HandlerUrl:"/handler/menutop.ashx",AC:"Active",Handle:"a.Handle",Bubble:"div.Bubble",Delay:200,ExtraClazz:null,Cmd:null,Help:null},t);this._Root=n;this._Handle=FE(this._Opt.Handle,this._Root);$(this._Handle).click(function(n){return i.BtnOnClick(n)});this._Wg=Wgm.Add({Close:function(){i._Bubble!=null&&i._Bubble.isVisible()&&i.HideBubble()},Level:1});$(document).on({click:function(n){var t=n.target;i._Root.contains(t)||i._Bubble!=null&&i._Bubble.isVisible()&&i.HideBubble()}})}return n.prototype.BtnOnClick=function(n){this._Bubble!=null&&this._Bubble.isVisible()?this.HideBubble():this.ShowBubble();EventKill(n)},n.prototype.HideBubble=function(){this._Bubble.hide();this._Handle.removeClass(this._Opt.AC);this._Wg.Disable()},n.prototype.ShowBubble=function(){var n=this;this._Bubble==null&&this.CreateBubble();this._Wg.CloseOthers();this._Wg.Enable();this._Handle.addClass(this._Opt.AC);this._AjaxHtml(this._Opt.Cmd,{help:this._Opt.Help},function(t){t.Status===1&&(n._Bd.innerHTML=t.Html,setTimeout(function(){n._Bubble.show("block")},10))})},n.prototype.CreateBubble=function(){var i=this,n,t;this._Bubble=this._Root.appendElem("div",{cls:"Bubble",style:{display:"none"}});IsNullOrEmpty(this._Opt.ExtraClazz)||this._Bubble.addClass(this._Opt.ExtraClazz);n=this._Bubble.appendElem("div",{cls:"Hd"});t=n.appendElem("a",{cls:"Close"});$(t).click(function(){return i.HideBubble()});this._Bd=this._Bubble.appendElem("div",{cls:"Bd"})},n.prototype._AjaxHtml=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxHtml(u,t,i,r)},n}();AddJQueryPlugin("userbox",function(n){new UserBox(this[0],n)});ShareBox=function(){function n(n,t){var i=this;this._Opt=null;this._Root=null;this._Handle=null;this._Bubble=null;this._UL=null;this._Bd=null;this._Tabs=null;this._Wg=null;this._Opt=OptEx({HandlerUrl:"/handler/sharebox.ashx",AC:"active",Handle:"a.Handle",Bubble:"div.Bubble",Delay:200,ItemId:null},t);this._Root=n;this._Handle=FE(this._Opt.Handle,this._Root);$(this._Handle).click(function(n){return i.BtnOnClick(n)});this._Wg=Wgm.Add({Close:function(){i._Bubble!=null&&i._Bubble.isVisible()&&i.HideBubble()},Level:1});$(document).on({click:function(n){var t=n.target;i._Root.contains(t)||i._Bubble!=null&&i._Bubble.isVisible()&&i.HideBubble()}})}return n.prototype.CreateBubble=function(){var t=this,n;this._Bubble=this._Root.appendElem("div",{cls:"Bubble",style:{display:"none",top:"45px",left:"-600px",width:"670px"}});n=this._Bubble.appendElem("div",{cls:"Hd"});n.appendElem("a",{cls:"Close",onclick:function(){t._Bubble!=null&&t._Bubble.isVisible()&&t.HideBubble()}});n.appendElem("div",{cls:"Bar",txt:"Sdílení"});this._UL=n.appendElem("ul");this._Bd=this._Bubble.appendElem("div",{cls:"Bd"});this._Tabs=new PopupTabs({Popup:this._Bubble,Header:this._UL,Body:this._Bd})},n.prototype.BtnOnClick=function(n){this._Bubble==null&&this.CreateBubble();this._Bubble.isVisible()?this.HideBubble():this.ShowBubble();EventKill(n)},n.prototype.HideBubble=function(){this._Bubble.hide();this._Handle.removeClass(this._Opt.AC);this._Wg.Disable()},n.prototype.ShowBubble=function(){var n=this;this._Wg.CloseOthers();this._Wg.Enable();this._Handle.addClass(this._Opt.AC);this._AjaxForm({ItemId:this._Opt.ItemId},function(t){var r,i,u,f;if(t.Status===1){if(n._Bd.innerHTML=t.Html,n._Tabs.Init(),r=$.find(".ZC",n._Bd),r!=null)for(i=0,u=r;i<u.length;i++)f=u[i],new ClipboardJS(f);n._Bubble.show("block")}})},n.prototype._AjaxForm=function(n,t,i){AjaxForm(this._Opt.HandlerUrl,n,t,i)},n}();AddJQueryPlugin("sharebox",function(n){new ShareBox(this[0],n)}),function(n){var t,i;(function(n){n[n.None=0]="None";n[n.Minus=1]="Minus";n[n.Plus=2]="Plus"})(t||(t={}));i=function(){function n(n,t){var i=this;(this._Opt=null,this._Root=null,this._Labels=null,this._Opt=OptEx({HandlerUrl:"/handler/rule.ashx",Text:null,OnlyFID:!1,ShowTooltip:!1},t),this._Labels={RootPlus:{Text:"Rozbalit obsah předpisu",Title:"Rozbalit"},RootMinus:{Text:"Sbalit obsah předpisu",Title:"Sbalit"},NodePlus:{Text:rs("Zpl.Unpack"),Src:"/res/tree-plus0.png"},NodeNone:{Text:rs("Zpl.Nochildren"),Src:"/res/tree-none.png"},NodeMinus:{Text:rs("Zpl.Pack"),Src:"/res/tree-minus0.png"}},this._Root=n,this._Root!=null)&&$(this._Root).click(function(n){return i.RootClick(n,i._Root)})}return n.prototype.RootClick=function(n,t){var u=this,f=n.target,r=f.closestElem("a.icon",t),i;r&&(i=r.parentNode,this.Attach(i,r),i.IsLoaded?i.Body!=null&&i.Body.hasChildren()&&(i.IsExpanded=!i.IsExpanded,i.Body.toggle(i.IsExpanded),this.RebuildExpander(i)):this.Load(i,function(){i.Body!=null&&u._Opt.ShowTooltip&&new LinkPreview(i.Body,{Perm:!0,InsideBtn:!0,StandAlone:!0})}))},n.prototype.Attach=function(n,t){typeof n.Expander=="undefined"&&t!=null&&(n.Expander=t,typeof n.Expander.img=="undefined"&&(n.Expander.img=FE("img",n.Expander)));typeof n.IsLoaded=="undefined"&&(n.IsLoaded=!1);typeof n.IsExpanded=="undefined"&&(n.IsExpanded=!1);typeof n.Body=="undefined"&&(n.Body=null)},n.prototype.Load=function(n,t){var i=this;this._AjaxForm("Sum",{DocId:n.attrI("data-docid"),SliceId:n.attrI("data-sliceid"),FragId:n.attrI("data-f"),Text:this._Opt.Text,OnlyFID:this._Opt.OnlyFID},function(r){if(r.Status===1){if(n.IsLoaded=!0,r.Data==null){n.IsExpanded=!1;n.hasClass("root")&&n.remove();return}n.IsExpanded=!0;i.AddData(n,r.Data);t!=null&&t()}})},n.prototype.AddData=function(n,t){for(var i,r,u=0;u<t.length;u++)i=t[u],r=this.FindNode(n,"data-f",i[0]),r==null&&(r=this.AddNode(n,i)),i[10]!=null&&(r.IsLoaded=!0,this.AddData(r,i[10]));this.RebuildExpander(n)},n.prototype.AddNode=function(n,t){var i=CE("div",{cls:"node",attr:{"data-f":t[0],"data-docid":t[1],"data-sliceid":t[2]}}),f=t[3],r=t[4],e=t[5],u,o;return i.HasChildren=t[6],i.IsExpanded=!1,i.IsLoaded=!1,n.HasChildren=!0,t[9]>0&&i.addClass("selected"),i.Expander=i.appendElem("a",{cls:"icon"}),i.Expander.img=i.Expander.appendElem("img"),IsNullOrEmpty(f)?i.appendElem("span",{cls:"name",title:r,html:r}):(u=i.appendElem("div",{cls:"con"}),o=u.appendElem("a",{cls:"link",href:this._Root.attr("data-baseurl")+f,target:"_blank",title:r,html:r}),IsNullOrEmpty(e)||u.appendElem("span",{cls:"note",html:"("+e+")"})),this.RebuildExpander(i),this.AddChild(n,i),i},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n.prototype.FindNode=function(n,t,i){var u,r,f;if(n.Body==null)return null;for(u=n.Body.children,r=0;r<u.length;r++)if(f=u[r],f.attrI(t)===i)return f;return null},n.prototype.RebuildExpander=function(n){var r=n.Expander,f=this._Labels,i,u;n.hasClass("root")?(i=n.IsExpanded?t.Minus:t.Plus,u=this.GetRootLabel(i,f),this.SetRootLabel(r,u),n.attr("data-status",i)):r!=null&&r.img!=null&&(i=n.HasChildren?n.IsLoaded?n.IsExpanded?t.Minus:t.Plus:t.Plus:t.None,u=this.GetNodeLabel(i,f),this.SetNodeLabel(r,u),n.attr("data-status",i))},n.prototype.AddChild=function(n,t){n.Body==null&&(n.Body=n.afterElem("div",{cls:"body",style:{display:n.IsExpanded?"":"none"}}));n.Body.appendChild(t)},n.prototype.SetRootLabel=function(n,t){n.innerHTML=t.Text;n.title=t.Title},n.prototype.GetRootLabel=function(n,i){switch(n){case t.Minus:return i.RootMinus;case t.Plus:return i.RootPlus;default:return null}},n.prototype.GetNodeLabel=function(n,i){switch(n){case t.Minus:return i.NodeMinus;case t.Plus:return i.NodePlus;default:return i.NodeNone}},n.prototype.SetNodeLabel=function(n,t){n.title=n.img.alt=t.Text;n.img.src=t.Src},n}();n.Worker=i}(MeetDoc||(MeetDoc={}));AddJQueryPlugin("meetdoc",function(n){this.each(function(t,i){new MeetDoc.Worker(i,n)})}),function(n){var t,i;(function(n){n[n.None=0]="None";n[n.Minus=1]="Minus";n[n.Plus=2]="Plus"})(t||(t={}));i=function(){function n(n,t){var i=this;(this._Opt=null,this._Root=null,this._Labels=null,this._Opt=OptEx({HandlerUrl:"/handler/jud.ashx"},t),this._Labels={RootPlus:{Text:"Rozbalit citovaná zákonná ustanovení",Title:"Rozbalit"},RootMinus:{Text:"Sbalit citovaná zákonná ustanovení",Title:"Sbalit"},NodePlus:{Text:rs("Zpl.Unpack"),Src:"/res/tree-plus0.png"},NodeNone:{Text:rs("Zpl.Nochildren"),Src:"/res/tree-none.png"},NodeMinus:{Text:rs("Zpl.Pack"),Src:"/res/tree-minus0.png"}},this._Root=n,this._Root!=null)&&$(this._Root).click(function(n){return i.RootClick(n)})}return n.prototype.RootClick=function(n){var r=n.target,i=r.closestElem("a.icon",this._Root),t;i&&(t=i.parentNode,this.Attach(t,i),t.hasClass("root")&&!t.IsLoaded?this.Load(t,function(){t.Body!=null&&new LinkPreview(t.Body,{Perm:!0,InsideBtn:!0,StandAlone:!0})}):t.Body!=null&&t.Body.hasChildren()&&(t.IsExpanded=!t.IsExpanded,t.Body.toggle(t.IsExpanded),this.RebuildExpander(t)))},n.prototype.Attach=function(n,t){typeof n.Expander=="undefined"&&t!=null&&(n.Expander=t,typeof n.Expander.img=="undefined"&&(n.Expander.img=FE("img",n.Expander)));typeof n.IsLoaded=="undefined"&&(n.IsLoaded=!1);typeof n.IsExpanded=="undefined"&&(n.IsExpanded=!1);typeof n.Body=="undefined"&&(n.Body=null)},n.prototype.Load=function(n,t){var i=this;this._AjaxForm("Meet",{ItemId:n.attrI("data-itemid")},function(r){if(r.Status===1){if(n.IsLoaded=!0,r.Data==null){n.IsExpanded=!1;n.hasClass("root")&&n.remove();return}n.IsExpanded=!0;i.AddData(n,r.Data);t!=null&&t()}})},n.prototype.AddData=function(n,t){for(var r,u,i=0;i<t.length;i++)r=t[i],u=this.FindNode(n,"data-docid",r[0]),u==null&&(u=this.AddNode(n,r));this.RebuildExpander(n)},n.prototype.AddNode=function(n,t){var i=CE("div",{cls:"node doc",attr:{"data-docid":t[0]}}),e=t[1],o=t[2],a=t[3],s=t[4],u=t[6],h,c,r,f,l;if(i.HasChildren=u!=null&&u.length>0,i.IsExpanded=!1,i.IsLoaded=!0,n.HasChildren=!0,i.Expander=i.appendElem("a",{cls:"icon"}),i.Expander.img=i.Expander.appendElem("img"),h=i.appendElem("div",{cls:"con"}),c=h.appendElem("a",{cls:"link",href:a,target:"_blank",title:e,html:e}),!IsNullOrEmpty(s))for(r=0,f=s.split(" ");r<f.length;r++)l=f[r],c.addClass(l);return IsNullOrEmpty(o)||i.appendElem("span",{cls:"name",html:o}),this.RebuildExpander(i),this.AddChild(n,i),this.AddPieces(i,u),i},n.prototype.AddPieces=function(n,t){var r,u,f,i;if(t!=null&&t.length>0)for(u=0,f=t;u<f.length;u++)i=f[u],r=CE("div",{cls:"node piece",style:{paddingLeft:px(i[0]*20)}}),r.appendElem("a",{txt:i[1],href:i[2],target:"_blank",cls:i[4]?"selected":""}),IsNullOrEmpty(i[3])||r.appendElem("span",{txt:i[3]}),this.AddChild(n,r)},n.prototype.FindNode=function(n,t,i){var u,r,f;if(n.Body==null)return null;for(u=n.Body.children,r=0;r<u.length;r++)if(f=u[r],f.attrI(t)===i)return f;return null},n.prototype.RebuildExpander=function(n){var r=n.Expander,f=this._Labels,i,u;n.hasClass("root")?(i=n.IsExpanded?t.Minus:t.Plus,u=this.GetRootLabel(i,f),this.SetRootLabel(r,u),n.attr("data-status",i)):r!=null&&r.img!=null&&(i=n.HasChildren?n.IsLoaded?n.IsExpanded?t.Minus:t.Plus:t.Plus:t.None,u=this.GetNodeLabel(i,f),this.SetNodeLabel(r,u),n.attr("data-status",i))},n.prototype.AddChild=function(n,t){n.Body==null&&(n.Body=n.afterElem("div",{cls:"body",style:{display:n.IsExpanded?"":"none"}}));n.Body.appendChild(t)},n.prototype.SetRootLabel=function(n,t){n.innerHTML=t.Text;n.title=t.Title},n.prototype.SetNodeLabel=function(n,t){n.title=n.img.alt=t.Text;n.img.src=t.Src},n.prototype.GetRootLabel=function(n,i){switch(n){case t.Minus:return i.RootMinus;case t.Plus:return i.RootPlus;default:return null}},n.prototype.GetNodeLabel=function(n,i){switch(n){case t.Minus:return i.NodeMinus;case t.Plus:return i.NodePlus;default:return i.NodeNone}},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n}();n.Worker=i}(MeetJud||(MeetJud={}));AddJQueryPlugin("meetjud",function(n){this.each(function(t,i){new MeetJud.Worker(i,n)})}),function(n){var t=function(){function n(n,t){var i=this;this._Root=null;this._Opt=null;this._Root=n;this._Opt=OptEx({Perm:!1,HandlerUrl:"/handler/jud.ashx"},t);$(".Item.Jud",this._Root).each(function(n,t){$(".title",t).linkpreview({Perm:i._Opt.Perm,InsideBtn:!0,StandAlone:!0});$(".sentence",t).linkpreview({Perm:i._Opt.Perm,InsideBtn:!0,StandAlone:!0});$(t).click(function(n){return i.JudClick(n,t)})})}return n.prototype.JudClick=function(n,t){var e=this,r,u,f,o=n.target,i=o.closestElem("a.more,a.less",t);i!=null&&this._AjaxForm("PropLoad",{ItemId:(r=i.closestElem("[data-itemid]"))===null||r===void 0?void 0:r.attrI("data-itemid"),Prop:(u=i.closestElem("[data-prop]"))===null||u===void 0?void 0:u.attr("data-prop"),Cfg:(f=i.closestElem("[data-cfg]"))===null||f===void 0?void 0:f.attr("data-cfg"),Cut:!i.hasClass("more")},function(n){if(n.Status===1){var t=i.closestElem("[data-prop]");t!=null&&(t.innerHTML=n.Html,$(t).linkpreview({Perm:e._Opt.Perm,InsideBtn:!0,StandAlone:!0}))}})},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n}();n.Worker=t}(JudResult||(JudResult={}));AddJQueryPlugin("judresult",function(n){new JudResult.Worker(this[0],n)}),function(n){var t=function(){function n(n,t){var i=this;this._Root=null;this._Opt=null;this._Root=n;this._Opt=OptEx({Perm:!1,ItemId:null,HandlerUrl:"/handler/jud.ashx"},t);$(".jud-lnk",n).linkpreview({Perm:this._Opt.Perm,InsideBtn:!0,StandAlone:!0});$(n).click(function(t){return i.JudClick(t,n)})}return n.prototype.JudClick=function(n,t){var r,u,f=n.target,i=f.closestElem("a.more,a.less",t);i!=null&&this._AjaxForm("PropLoad",{ItemId:this._Opt.ItemId,Prop:(r=i.closestElem("[data-prop]"))===null||r===void 0?void 0:r.attr("data-prop"),Cfg:(u=i.closestElem("[data-cfg]"))===null||u===void 0?void 0:u.attr("data-cfg"),Cut:!i.hasClass("more")},function(n){if(n.Status===1){var t=i.closestElem("[data-prop]");t!=null&&(t.innerHTML=n.Html,$(t).linkpreview({Perm:!0,InsideBtn:!0,StandAlone:!0}))}})},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n}();n.Worker=t}(JudHeader||(JudHeader={}));AddJQueryPlugin("judheader",function(n){new JudHeader.Worker(this[0],n)}),function(n){n.fn.facet=function(n){function o(){t.Body=t.appendElem("div");t.Name="ROOT";i(t,n.Data)}function i(n,t){var f,e,r,u;if(t)for(e=0;e<t.length;e++)r=t[e],u=h(n,r[0]),u||(u=s(n,r[0],r[1],r[2],r[3],r[4],r[5])),f=r[6],f!=null&&(u.IsExpanded?i(u,f):u.Children=f)}function s(t,i,r,o,s,h,l){var p=u(h,2),w=u(h,1),y=u(h,4),a,v;return IsNullOrEmpty(n.BaseUrl)||l==null||(l=n.BaseUrl+l),a=CE("div",{cls:"FacN"}),a.NodeId=i,a.IsExpanded=w,a.IsChecked=y,a.HasChildren=p,a.exp=a.appendElem("img",{cls:"FacE",src:"/res/"+e(a),onclick:f}),v=IsNullOrEmpty(o)?r:o,IsNullOrZero(s)||(v+=" ("+s+")"),IsNullOrEmpty(l)?a.appendElem("span",{cls:y?"FacT2":"FacT",txt:r,title:v,onclick:f}):a.appendElem("a",{cls:y?"FacT2":"FacT",txt:r,title:v,href:l}),IsNullOrZero(s)||a.appendElem("span",{cls:"FacC",txt:"("+s+")"}),c(t,a),a}function h(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.NodeId===t)return u;return null}function c(n,t){var i=a(n);i.appendElem(t);r(n)}function l(n){return n.Body&&n.Body.hasChildren()}function a(n){return n.Body||(n.Body=n.afterElem("div",{cls:"FacB",style:{display:n.IsExpanded?"":"none"}})),n.Body}function f(){var n=this.parentNode,t;if(n.HasChildren)if(l(n))n.IsExpanded=!n.IsExpanded,n.Body.toggle(n.IsExpanded),r(n);else{if(t=p(n.Children),t==null||t.length===0)return;w("Group",{Ids:t.join(",")},function(t){if(t.Status===1){var u=v(t.Names);y(n.Children,u);i(n,n.Children);n.Children=null;n.IsExpanded=!0;n.Body.toggle(!0);r(n)}})}}function v(n){var r,t,u,i;if(n!=null&&n.length!==0){for(r=[],u=n.length,i=0;i<u;i++)t=n[i],r[t[0]]=[t[1],t[2]];return r}}function y(n,t){var i,u,f,r;if(t!=null)for(f=n.length,r=0;r<f;r++)i=n[r],u=t[i[0]],i[1]=u[0],i[2]=u[1]}function p(n){var i,r,t;if(n==null||n.length===0)return null;for(i=[],r=n.length,t=0;t<r;t++)i.push(n[t][0]);return i}function r(n){n.exp&&(n.exp.src="/res/"+e(n))}function e(n){return n.HasChildren?n.IsExpanded?n.IsChecked?"facc3t.png":"faccn3.png":n.IsChecked?"face3t.png":"face3.png":"trans16.png"}function u(n,t){return(n&t)>0}function w(t,i,r,u){var f=n.HandlerUrl+"?Cmd="+t;AjaxForm(f,i,r,u)}n=OptEx({TreeId:null,BaseUrl:null,FilterTitle:null,IsLocked:!1,Data:null,HandlerUrl:"/handler/facet.ashx"},n);var t=this[0];t&&o()}}(jQuery),function(n){n.fn.filteredfacet=function(t){function b(){ft(i);i.Body=i.appendElem("div");i.Name="ROOT";f(i,t.Data)}function f(n,t){var e,r,i,u;if(t)for(r=0;r<t.length;r++)i=t[r],u=d(n,i[0]),u||(u=k(n,i[0],i[1],i[2],i[3],i[4],i[5])),e=i[6],e!=null&&f(u,e)}function k(n,i,r,u,f,e,s){var b=o(e,2),k=o(e,1),v=o(e,4),l,a,p,w;return IsNullOrEmpty(t.BaseUrl)||s==null||(s=t.BaseUrl+s),l=CE("div",{cls:"FacN"}),l.NodeId=i,l.IsExpanded=k,l.IsChecked=v,l.HasChildren=b,l.ParentFacetNode=n,l.exp=l.appendElem("img",{cls:"FacE L"+y(l),src:"/res/"+c(l),onclick:h}),a=IsNullOrEmpty(u)?r:u,IsNullOrZero(f)||(a+=" ("+f+")"),IsNullOrEmpty(s)?(p=l.appendElem("span",{cls:v?"FacT2":"FacT",txt:r,onclick:h}),t.IsLocked||p.attr("title",a)):(w=l.appendElem("a",{cls:v?"FacT2":"FacT",txt:r,href:s}),t.IsLocked||w.attr("title",a)),IsNullOrZero(f)||l.appendElem("span",{cls:"FacC",txt:"("+f+")"}),g(n,l),l}function d(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.NodeId===t)return u;return null}function g(n,t){var i=nt(n);i.appendElem(t);e(n)}function s(n){return n.Body&&n.Body.hasChildren()}function nt(n){return n.Body||(n.Body=n.afterElem("div",{cls:"FacB",style:{display:n.IsExpanded?"":"none"}})),n.Body}function h(){var n=this.parentNode,t;if(n.HasChildren)if(s(n))n.IsExpanded=!n.IsExpanded,n.Body.toggle(n.IsExpanded),e(n);else{if(t=rt(n.Children),t==null||t.length===0)return;ut("Group",{Ids:t.join(",")},function(t){if(t.Status===1){var i=tt(t.Names);it(n.Children,i);f(n,n.Children);n.Children=null;n.IsExpanded=!0;n.Body.toggle(!0);e(n)}})}}function tt(n){var r,t,u,i;if(n!=null&&n.length!==0){for(r=[],u=n.length,i=0;i<u;i++)t=n[i],r[t[0]]=[t[1],t[2]];return r}}function it(n,t){var i,u,f,r;if(t!=null)for(f=n.length,r=0;r<f;r++)i=n[r],u=t[i[0]],i[1]=u[0],i[2]=u[1]}function rt(n){var i,r,t;if(n==null||n.length===0)return null;for(i=[],r=n.length,t=0;t<r;t++)i.push(n[t][0]);return i}function e(n){n.exp&&(n.exp.src="/res/"+c(n))}function c(n){return n.HasChildren?n.IsExpanded?n.IsChecked?"facc3t.png":"faccn3.png":n.IsChecked?"face3t.png":"face3.png":"trans16.png"}function o(n,t){return(n&t)>0}function ut(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function ft(i){var f=i.appendElem("div",{cls:"Filter"});r=f.appendElem("input",{type:"search",title:t.FilterTitle,attr:{placeholder:t.FilterTitle}});n(r).bind({focus:et,keydown:st,input:ot});u=f.appendElem("span",{cls:"Counter"})}function et(){this.select()}function ot(n){l();EventKill(n)}function st(n){if(n.keyCode==13)return EventKill(n),!1}function l(){var t,f,e;if(!i.Body)return null;if(t=n.trim(r.value),IsNullOrEmpty(t)){u.innerText="";p(i);return}f=w.PrepareRx(t);e=a(i,f);u.innerText=e.toString()}function a(n,t){var r=0,f,e,u,i,o;if(!n||!n.Body)return r;for(f=n.Body.children,e=f.length,u=0;u<e;u++)(i=f[u],i.NodeId)&&(o=i.textContent,t==null||t.test(o)?(v(i),i.show(),r++):i.hide(),r+=a(i,t));return r}function v(n,t){t===void 0&&(t=!0);var i=n.ParentFacetNode;i&&(i.show(),i.Body&&i.Body.show(),v(i))}function y(n){var t=0,i=n.ParentFacetNode;return i&&(t=1+y(i)),t}function p(n){var r,u,i,t;if(n&&n.Body)for(r=n.Body.children,u=r.length,i=0;i<u;i++)(t=r[i],t.NodeId)&&(t.show(),s(t)&&(t.Body.toggle(t.IsExpanded),p(t)))}t=OptEx({TreeId:null,FilterTitle:rs("Zpl.DefaultFacetFilterPh"),IsLocked:!1,BaseUrl:null,Data:null,HandlerUrl:"/handler/facet.ashx"},t);var w=new Formater,r=null,u=null,i=this[0];i&&b()}}(jQuery),function(n){n.fn.toolbar=function(){}}(jQuery),function(n){n.fn.docctn=function(t){function o(n){var i=n.Elem1,u=n.Elem2,t,r;if(s(),!i){l(n.Id1,n.Id2);return}t=frape.closestFrag(i);t!=null&&(r=frape.closestFrag(u),c(t,r))}function s(){frape.clean();r!=null&&(r.remove(),r=null)}function h(){frape.clean();r!=null&&(r.remove(),r=null,window.location.hash="_")}function c(n,t){frape.highlight(n,t);n!=null&&(r=n.prependElem("b",{cls:"eraser"}),r.appendElem("u",{onclick:h}))}function l(n,r){if(i){if(i.empty(),i.show("block"),e.test(n)){i.appendElem("strong",{html:rs("Zpl.CommentMissing")});frape.scrollTo(i,200);return}i.appendElem("strong",{html:rs("Zpl.WasEarlierMissing")});var u=i.appendElem("div",{cls:"wait"});u.appendElem("img",{src:"/res/loading.gif",alt:""});u.appendElem("span",{txt:rs("Zpl.WasEarlierWorking")});frape.scrollTo(i,200);a("WasEarlier",{ItemId:t.DocId,SliceId:t.SliceId1,Id1:n,Id2:r},function(n){var t,f,e,o,r,s;if(u.remove(),n.Status==1)if(n.Items&&n.Items.length>0)for(i.appendElem("p",{txt:rs("Zpl.WasEarlier1")}),o=i.appendElem("div",{cls:"Items"}),r=0,s=n.Items.length;r<s;r++)t=n.Items[r],f=o.appendElem("a",{href:t[4]}),f.appendElem("i",{txt:t[1]+"."}),e=t[2],t[3]!=null&&t[1]!=0&&(e+=" - "+t[3]),f.appendElem("span",{txt:e});else i.appendElem("p",{txt:rs("Zpl.WasEarlier0")});else i.appendElem("p",{txt:rs("Zpl.ServerError")})})}}function a(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var f,i;if(t=OptEx({DocId:null,SliceId1:null,IsFull:!1,HandlerUrl:"/handler/rule.ashx"},t),f=this[0],f){frape.init();var v=n(window),u=null,r=null,e=/^c\d+$/g;frape.bind("click",function(n){var e=n.target,t=frape.closestAnchor(e),i,r,f;if(t)if(t.className=="linknote")u=t;else if(t.className=="linkppc"){if(i=frape.closestID(t),!i)return;if(r=u!=null&&u.attr("href")=="#f"+i?u:FE("a.linknote[href='#f"+i+"']",frape.root),!r)return;if(f=frape.closestID(r),!f)return;window.location.hash="#f"+f}});i=t.IsFull?null:FE(".was-earlier",f);eman.Hash.Change(o)}}}(jQuery),function(n){var t,i;(function(n){n[n.none=0]="none";n[n.zoom=1]="zoom";n[n.transform=2]="transform"})(t||(t={}));i=function(){function n(n){var t=this;(this._TableW=null,this._ParentW=null,this._Ratio=null,this._Root=n,this._Root!=null)&&(this.browser=null,this._IE8=null,this._$table=null,this._$xtable=null,this._$parent=null,this._TableW=null,this._ParentW=null,this._Ratio=null,this._Style=document.body.style,this.ZoomTables(),this._Root.ZoomTables=function(){t.ZoomTables()})}return n.prototype.ZoomTables=function(){var n=this;this.browser==null&&(this.browser=this.GetBrowser());$("table",this._Root).each(function(i,r){if(r.parentNode.closestElem("table")==null&&(n._$table=$(r),n._$xtable=n._$table.parent(),n._$parent=n._$xtable.parent(),n._$xtable.attr("style",null),n._$parent.attr("style",null),n._TableW=n._$table.outerWidth(),n._ParentW=n._$parent.width(),!(n._TableW<=n._ParentW))){n._Ratio=Math.round(n._ParentW/n._TableW*1e3)/1e3;switch(n.browser){case t.transform:n._$xtable.css({transform:"scale("+n._Ratio+")","transform-origin":"0 0"});n._$parent.css("max-height",Math.round(n._$parent.height()*n._Ratio)+10);break;case t.zoom:n._$xtable.css({zoom:n._Ratio});n.IsIE8()&&n._$parent.css("max-height",Math.round(n._$parent.height()*n._Ratio)+10)}}})},n.prototype.GetBrowser=function(){return typeof this._Style.zoom!="undefined"?t.zoom:typeof this._Style.transform!="undefined"||typeof this._Style.WebkitTransform!="undefined"||typeof this._Style.MozTransform!="undefined"||typeof this._Style.msTransform!="undefined"||typeof this._Style.OTransform!="undefined"?t.transform:t.none},n.prototype.IsIE8=function(){return this._IE8==null&&(this._IE8=document.documentElement.hasClass("ie8")),this._IE8},n}();n.Worker=i}(XTable||(XTable={}));AddJQueryPlugin("xtable",function(){this.each(function(n,t){new XTable.Worker(t)})});LinkPreview=function(){function n(n,t){(this._Opt=null,this._Root=null,this._Frape=null,this._Popup=null,this._$Popup=null,this._Ctn=null,this._Arrow=null,this._Active=null,this._$Active=null,this._Tm1=null,this._Tm2=null,this._Wg=null,this._$Win=null,this.Parent=null,this.Child=null,this.PopupLeft=0,n!=null)&&(this._Opt=OptEx({DocId:null,SliceId1:null,SliceId2:null,IsFull:!1,HandlerUrl:"/handler/tooltip.ashx",Delay1:500,Delay2:400,ArrowOffset:12,WidgetLevel:1,Width:650,Page:860,PopStep:15,Perm:!1,InsideCookie:"PV",InsideBtn:!1,IsSlave:!1,StandAlone:!1},t),this._Root=n,this._Tm1=new Timer(this._Opt.Delay1),this._Tm2=new Timer(this._Opt.Delay2),this._$Win=$(window),this.Init())}return Object.defineProperty(n.prototype,"InsideIsActive",{get:function(){return $.cookieB(this._Opt.InsideCookie)},set:function(n){$.cookie(this._Opt.InsideCookie,n,{expires:3650})},enumerable:!1,configurable:!0}),n.prototype.StopClose=function(){this._Tm2.clear();this.Parent!=null&&this.Parent.StopClose()},n.prototype.StartClose=function(){var n=this;this._Tm2.run(function(){return n.Close()});this.Parent!=null&&this.Parent.StartClose()},n.prototype.Init=function(){var n=this;$(this._Opt.Perm?"a[href]":"a.linknote[href]",this._Root).on({mouseenter:function(t){return n.LinkMouseenter(t)},mouseleave:function(t){return n.LinkMouseleave(t)},mousedown:function(t){return n.LinkMousedown(t)}});this._Wg=Wgm.Add({Code:"LNK"+Date.now(),Close:function(){n._Tm1.clear();n._Tm2.clear();n.DestroyChild();n.Hide()},Level:this._Opt.WidgetLevel})},n.prototype.Create=function(){var n=this;this._Popup=document.body.appendElem("div",{cls:"Pop NA",style:{display:"none",width:px(this._Opt.Width)}});this._Ctn=this._Popup.appendElem("div",{cls:"Ctn"});this._Arrow=this._Popup.appendElem("div",{cls:"Bulvar"});this._Popup.appendElem("a",{cls:"Close",onclick:function(){return n.Close()}});this._$Popup=$(this._Popup);this._$Popup.on({mouseenter:function(t){return n.PopupMouseenter(t)},mouseleave:function(t){return n.PopupMouseleave(t)}})},n.prototype.LinkMouseenter=function(n){var t=this;this.SetActive(n.currentTarget);this._Tm1.run(function(){return t.Start()});this._Tm2.clear()},n.prototype.LinkMouseleave=function(){var n=this;this.SetActive(null);this._Tm1.clear();this._Tm2.run(function(){return n.Close()})},n.prototype.LinkMousedown=function(){this.SetActive(null);this._Tm1.clear();this._Tm2.clear();this.Close()},n.prototype.PopupMouseenter=function(){this.SetActive(null);this.Parent!=null&&this.Parent.StopClose();this._Tm1.clear();this._Tm2.clear()},n.prototype.PopupMouseleave=function(){var n=this;this.SetActive(null);this.Parent!=null&&this.Parent.StartClose();this._Tm1.clear();this._Tm2.run(function(){return n.Close()})},n.prototype.Start=function(){var n=this;(!this._Opt.IsSlave||this.InsideIsActive)&&this._Active!=null&&(this._Popup==null&&this.Create(),this._AjaxForm("hrefctx",this.GetData(),function(t){n._Active!=null&&t.Status===1&&n.Open(t)}))},n.prototype.GetData=function(){var n,t,i;return this._Active==null?null:(n={},n.Href=this._Active.attr("href"),this._Opt.DocId!=null&&(n.DocId=this._Opt.DocId),this._Opt.StandAlone?this._Opt.SliceId1!=null&&(n.SliceId=this._Opt.SliceId1):(this._Frape==null&&(this._Frape=new Frape(null),this._Frape.attach(this._Root)),t=this._Frape.closestFrag(this._Active),t!=null&&(n.SliceId=this._Frape.isOtherSlice(t)?this._Opt.SliceId2:this._Opt.SliceId1,i=this._Frape.getFID(t),i!=null&&(n.FID=i))),n)},n.prototype.Open=function(n){this._Popup!=null&&(this._Wg.CloseOthers(),this._Wg.Enable(),this._Ctn.innerHTML=n.Html,this._Popup.show("block"),this.Move(n))},n.prototype.Hide=function(){this._Popup!=null&&(this._Popup.hide(),this._Ctn.empty())},n.prototype.Close=function(){this.DestroyChild();this.Hide();this._Wg.Disable()},n.prototype.IsTarget=function(n){return this._Popup==null||n==null?!1:this._Popup.contains(n)?!0:this.Child!=null?this.Child.IsTarget(n):!1},n.prototype.DestroyChild=function(){this.Child!=null&&(this.Child.Destroy(),this.Child=null)},n.prototype.Destroy=function(){this.DestroyChild();this._Ctn!=null&&(this._Ctn.remove(),this._Ctn=null);this._Popup!=null&&(this._Popup.remove(),this._Popup=null);this._$Popup!=null&&(this._$Popup.off(),this._$Popup=null);Wgm.Remove(this._Wg.Code)},n.prototype.Move=function(t){var r=this,l,o,u;if(this._Popup!=null&&this._Active!=null){var f=this._$Active.offset(),a=f.top-this._$Popup.outerHeight()-this._Opt.ArrowOffset,i=0;if(this.Parent==null){var s=this._$Win.width(),h=this._$Popup.outerWidth(),e=(s-this._Opt.Page)/2,c=s-e-h;i=f.left+this._$Active.outerWidth()/2-h/2;i<e&&(i=e);i>c&&(i=c)}else i=this.Parent.PopupLeft+this._Opt.PopStep;this.PopupLeft=i;this._Popup.css({top:px(a),left:px(i)});l=f.left+this._$Active.outerWidth()/2-i;this._Arrow.style.left=px(l);FE(".Go",this._Ctn,{href:this._Active.attr("href")});o=$(".Pv",this._Ctn);this._Opt.InsideBtn?this._Opt.Perm&&o.click(function(n){var i=n.currentTarget.toggleClass("on"),t=FE("i",n.currentTarget);t!=null&&(t.className="ai",t.addClass(i?"ai-link-preview1":"ai-link-preview0"),r.InsideIsActive=i)}):o.hide();u=FE(".Frags",this._Ctn);u!=null&&($(u).wheelnobubble(),setTimeout(function(){var i=FE(".HL",u);i!=null&&$(u).scrollTop($(i).position().top+$(u).scrollTop()-50);r.DestroyChild();r.Child=new n(u,{WidgetLevel:r._Opt.WidgetLevel-.01,DocId:t.DocId,SliceId1:t.SliceId,Width:r._Opt.Width,Perm:r._Opt.Perm,IsSlave:!0});r.Child.Parent=r},0))}},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n.prototype.SetActive=function(n){this._Active=n;this._$Active=n!=null?$(n):null},n}();AddJQueryPlugin("linkpreview",function(n){new LinkPreview(this[0],n)}),function(n){n.fn.toolsum=function(t){function o(){if(t.DocId!=null&&a(t.Cmd,{DocId:t.DocId,SliceId1:t.SliceId1,SliceId2:t.SliceId2,TypeId:t.TypeId}),i!=null&&r!=null)u.scrollTop(r);else if(e.hash===t.AnSum){var f=n(t.AnSum);u.scrollTop(f.offset().top+f.outerHeight()-100)}else e.hash=t.AnSum;s()}function l(n){if(n.keyCode===8){var t=n.target;t.closestElem("input,textarea",document.body)||s()}}function s(){if(n("div.Last",f).removeClass("Last"),i!=null&&r!=null){var t=FE("div.Node[data-f="+i.attrI("data-f",0)+"]",f);t!=null&&t.addClass("Last");i==null}}function a(n,i,r){var u=t.HandlerUrl+"?Cmd="+n;return AjaxForm(u,i,function(){r&&r()})}t=OptExtend({Sum:".doc-sum",AnSum:"#Sum",DocId:null,SliceId1:null,SliceId2:null,TypeId:null,Cmd:"EventEx",HandlerUrl:"/handler/meter.ashx"},t);var h=this[0],f=FE(t.Sum),c=FE(".Switch",h),i=null,r=null,u=n(window),e=window.location;n(c).click(o);n(document).keyup(l);eman.Shortcuts.Add({which:115},function(){o()});eman.NavSum.Add(function(n){i=n;r=u.scrollTop()})}}(jQuery),function(n){n.fn.toolup=function(n){function i(){n.DocId!=null&&r(n.Cmd,{DocId:n.DocId,SliceId1:n.SliceId1,SliceId2:n.SliceId2,TypeId:n.TypeId});window.location.href="#Top"}function r(t,i,r){var u=n.HandlerUrl+"?Cmd="+t;return AjaxForm(u,i,function(){r&&r()})}n=OptExtend({DocId:null,SliceId1:null,SliceId2:null,TypeId:null,Cmd:"EventEx",HandlerUrl:"/handler/meter.ashx"},n);var t=this[0],u=FE(".Switch",t,{onclick:i})}}(jQuery),function(n){n.fn.toolanchor=function(t){function w(){if(eman.Shortcuts.Add({which:113},function(){l()}),f=Wgm.Add({Close:s,Level:1}),u.hasClass("ON"))n(p).on("click",b)}function b(n){var i,t;(s(),i=n.target,frape.contains(i))&&(frape.isAnchor(i)||(t=frape.closestFrag(i),t==null||t.hasClass("SIL"))||frape.colCtn(n)&&(a(t),frape.pick(t)))}function k(){h&&(r=!r,this.toggleClass("Active",r),a(h))}function l(){var n,t;(s(),frape.alertCm())||(n=!u.hasClass("ON"),ShowSplash(),t=tt(n),it(t))}function d(){i=document.body.appendElem("div",{cls:"Pop NA",style:{display:"none",width:"700px"}});var r=i.appendElem("div",{cls:"Hd"});r.appendElem("a",{cls:"Close",onclick:s});r.appendElem("div",{cls:"AnchorBar",txt:rs("Zpl.ToolAnchor")});i.float=r.appendElem("a",{cls:"FloatSw",onclick:k,style:{display:"none"}});i.float.appendElem("i");i.float.appendElem("span",{html:rs("Zpl.FloatedVersion"),title:rs("Zpl.FloatedVersionT")});i.header=r.appendElem("ul");i.body=i.appendElem("div",{cls:"Bd"});i.appendElem("div",{cls:"Bulvar"});e=n(i);c=new PopupTabs({Popup:i,Header:i.header,Body:i.body,Key:t.TabKey})}function a(n){var u,f;i||d();u="CacheAnchor";n[u]==null||n[u].IsFloating!=r?(f=g(n),f.OnlyFID=t.OnlyFID,nt("Anchor"+t.Mod,f,function(t){t.Status==1?(n[u]=t,v(n,t)):n[u]={}})):v(n,n[u])}function g(n){switch(t.Mod){case"Slice":return{FID:frape.getFID(n),SliceId:t.SliceId1,IsFloating:r};case"Diff":return{FID:frape.getFID(n),SliceId1:t.SliceId1,SliceId2:t.SliceId2,IsOtherSlice:frape.isOtherSlice(n)};case"Full":return{FID:frape.getFID(n),Version:frape.getVer(n)};default:throw"ToolAnchor unknown mod!";}}function v(r,u){i&&(f.CloseOthers(),f.Enable(),h=r,i.body.innerHTML=u.Html||"",i.float.toggle(u.AllowFloating),c.Init(),new ClipboardJS(".ZC"),setTimeout(function(){var o=n(r),u=o.offset(),f;i.style.top=px(u.top-e.outerHeight()-t.AroH);i.style.left=px(u.left+(o.outerWidth()-e.outerWidth())/2);i.show("block");f=u.top-e.outerHeight()-t.AroH-100;f<n(window).scrollTop()&&AnimateTo(f)},100))}function s(){i&&(f.Disable(),i.hide(),i.body.empty(),frape.pick())}function nt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function tt(n){return o.load(window.location.href),o.param(ToolMan.Anchor,n?1:null),n&&o.param(ToolMan.CommentEdit,null),o.render()}function it(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Ver:t.Ver,Shift:t.Shift})}var u,y;t=OptEx({Param:null,HandlerUrl:"/handler/rule.ashx",Mod:"Slice",SliceId1:null,SliceId2:null,Key:"anchor",TabKey:"anchor_tab",AroH:12,OnlyFID:!1},t);u=this[0];y=FE(".Switch",u,{onclick:l});frape.init();var p=FE("form#Main",document.body),f=null,i=null,e=null,c=null,r=!1,h=null,o=new Loc(window.location.href);w()}}(jQuery),function(n){n.fn.tooleffect=function(n){function f(){eman.Shortcuts.Add({which:101},function(){r()})}function r(){var n,t;frape.alertCm()||(n=!i.hasClass("ON"),Wgm.Close(),ShowSplash(),t=e(n),o(t))}function e(n){return t.load(window.location.href),t.param(ToolMan.Effect,n?1:null),t.render()}function o(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Shift:t.Shift})}var i,u,t;n=OptExtend({},n);i=this[0];u=FE(".Switch",i,{onclick:r});frape.init();t=new Loc(window.location.href);f()}}(jQuery),function(n){n.fn.toolnovel=function(t){function c(n){r();EventKill(n)}function l(){eman.Shortcuts.Add({which:97},function(){h()});u=Wgm.Add({Close:r,Level:t.WidgetLevel});frape.hasClass("NOVEL")&&(frape.bind("click",a),n(document.body).click(v))}function a(n){r();var i=n.target,t=frape.closestFrag(i);t&&frape.colNovel(i)&&(p(t),frape.pick(t))}function v(n){i&&!i.contains(n.target)&&i.isVisible()&&r()}function y(){i=document.body.appendElem("div",{cls:"Pop NA",style:{display:"none",width:px(600)}});var t=i.appendElem("div",{cls:"Hd"});t.appendElem("a",{cls:"Close",onclick:c});i.caption=t.appendElem("div",{cls:"NovelBar",txt:rs("Zpl.ToolNovel00")});i.link=t.appendElem("a",{cls:"NovelLink",target:"_blank",style:{display:"none"}});i.body=i.appendElem("div",{cls:"Bz"});i.appendElem("div",{cls:"Bulvar",style:{left:"42px"}});e=n(i)}function p(n){var r;if(i||y(),r="CacheNovel",n[r]==null){var u=n.hasClass("SIL"),f=u?"Silver":"Novel",e=u?{FragId:n.attrI("data-f"),SliceId:t.SliceId1}:{FID:frape.getFID(n),SliceId:n.hasClass("OS")?t.SliceId2:t.SliceId1,IsFull:t.IsFull};w(f,e,function(t){t.Status===1?(n[r]=t,s(n,t)):n[r]={}})}else s(n,n[r])}function s(r,f){i&&(u.CloseOthers(),u.Enable(),f.LinkHref!=null?(i.link.innerHTML=f.LinkText,i.link.title=f.LinkTitle,i.link.href=f.LinkHref,i.link.show()):i.link.hide(),i.body.innerHTML=f.Html,f.Caption!=null&&(i.caption.textContent=f.Caption),setTimeout(function(){var s=n(r),u=s.offset(),o=u.left-t.AroL+40,f;o+=frape.hasClass("EFFECT")?105:20;i.style.top=px(u.top-e.outerHeight()-t.AroH);i.style.left=px(o);i.show("block");f=u.top-e.outerHeight()-t.AroH-100;f<n(window).scrollTop()&&AnimateTo(f);n(".NovelPB",i).wheelnobubble();new LinkPreview(i.body,{WidgetLevel:t.WidgetLevel-.01,Perm:t.Perm,InsideBtn:!0})},150))}function r(){i&&(u.Disable(),i.hide(),i.body.empty(),frape.pick())}function h(){var n,t;(r(),frape.alertCm())||(n=!f.hasClass("ON"),n||Wgm.Close(0),frape.zoomTables(),ShowSplash(),t=b(n),k(t))}function w(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function b(n){return o.load(window.location.href),o.param(ToolMan.Novel,n?1:null),o.render()}function k(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Ver:t.Ver,Shift:t.Shift})}var f;t=OptEx({HandlerUrl:"/handler/rule.ashx",SliceId1:null,SliceId2:null,IsFull:!1,AroH:12,AroL:40,WidgetLevel:1,Perm:!1},t);f=this[0];FE(".Switch",f,{onclick:h});frape.init();var u=null,i=null,e=null,o=new Loc(window.location.href);l()}}(jQuery),function(n){n.fn.tooljudik=function(t){function tt(n){f();EventKill(n)}function it(){eman.Shortcuts.Add({which:114},function(){nt()});o=Wgm.Add({Close:f,Level:t.WidgetLevel});frape.hasClass("RICIN")&&(frape.bind("click",rt),n(document.body).click(ut))}function rt(n){f();var i=n.target,t=frape.closestFrag(i);t&&frape.colJudik(i)&&(k(t),frape.pick(t))}function ut(n){i&&!i.contains(n.target)&&i.isVisible()&&f()}function ft(){var t,s,o,c,f,e;i=document.body.appendElem("div",{cls:"juble",style:{display:"none"}});t=i.appendElem("div",{cls:"hd"});t.appendElem("a",{cls:"close",onclick:tt});t.appendElem("div",{cls:"caption",txt:rs("Zpl.ToolJudik")});l=t.appendElem("div",{cls:"link-container"});u=t.appendElem("ul");ct();s=t.appendElem("div",{cls:"bar"});o=s.appendElem("div",{cls:"filter"});o.appendElem("span",{txt:rs("Zpl.JudFilters")});et(o);ot(o);st(o);c=s.appendElem("div",{cls:"count"});c.appendElem("span",{txt:rs("Zpl.JudCount"),title:rs("Zpl.JudCountT")});v=c.appendElem("var");r=i.appendElem("div",{cls:"bd"});h=n(i);f=document.createElementNS(b,"svg");f.setAttributeNS(null,"class","svg-arrow");f.setAttributeNS(null,"height","60");f.setAttributeNS(null,"width","85");e=document.createElementNS(b,"polyline");e.setAttributeNS(null,"points","0 0 85 60 0 15");e.setAttributeNS(null,"stroke","#BECBD1");e.setAttributeNS(null,"fill","white");e.setAttributeNS(null,"stroke-width","1");f.appendChild(e);i.appendChild(f)}function et(n){var t=n.appendElem("dl"),r=t.appendElem("dd"),i;y=r.appendElem("input",{id:"mag",type:"checkbox",onclick:yt});i=t.appendElem("dt");i.appendElem("label",{attr:{"for":"mag"},txt:rs("Zpl.JudGold"),title:rs("Zpl.JudGoldT")})}function ot(n){var t=n.appendElem("dl"),r=t.appendElem("dd"),i;p=r.appendElem("input",{id:"legsen",type:"checkbox",onclick:pt});i=t.appendElem("dt");i.appendElem("label",{attr:{"for":"legsen"},txt:rs("Zpl.JudLegsen"),title:rs("Zpl.JudLegsenT")})}function st(n){var t=n.appendElem("dl"),r=t.appendElem("dd"),i;w=r.appendElem("input",{id:"precise",type:"checkbox",onclick:wt});i=t.appendElem("dt");i.appendElem("label",{attr:{"for":"precise"},txt:rs("Zpl.JudPrecise"),title:rs("Zpl.JudPreciseT")})}function k(n){i||ft();var r=d();r.FID=frape.getFID(n);r.SliceId=n.hasClass("OS")?t.SliceId2:t.SliceId1;r.IsFull=t.IsFull;gt("Judik",r,function(t){t.Status===1&&ht(n,t)})}function c(){s&&k(s)}function d(){var n=FE(".selected",u);return{ClassId:n!==null?n.attrI("data-classid"):null,Mag:y.checked,Legsen:p.checked,Precise:w.checked}}function ht(u,f){i&&(o.CloseOthers(),o.Enable(),l.innerHTML=f.Link,r.innerHTML=f.Html,v.textContent=f.Num,setTimeout(function(){var o=n(u),f=o.offset(),e;i.style.top=px(f.top-h.outerHeight()-t.AroH);i.style.left=px(f.left+(o.outerWidth()-h.outerWidth())/2);i.show("block");e=f.top-h.outerHeight()-t.AroH-100;e<n(window).scrollTop()&&AnimateTo(e);n(".JudikPB",i).wheelnobubble();new LinkPreview(r,{WidgetLevel:t.WidgetLevel-.01,Perm:t.PermPreview});kt();vt();s=u},150))}function ct(){(lt(),u.hasChildren())&&g(u.firstElementChild)}function lt(){var n=t.Classes.length,f=(99-1*n)/n,i;for(u.empty(),i=0;i<n;i++){var r=t.Classes[i],e=u.appendElem("li",{onclick:bt,style:{minWidth:at(n,f),maxWidth:f+"%"},attr:{"data-classid":r[0]}}),o=e.appendElem("a");o.appendElem("span",{title:r[1],txt:TextLeft2(r[1],25)})}}function at(n,t){return n<5?"20%":t*.7+"%"}function g(n){for(var i,t=0,r=u.children.length;t<r;t++)i=u.children[t],i.toggleClass("selected",i===n)}function vt(){var i=dt(r.style.minHeight)||0,t=n(r).outerHeight();t>i&&(r.style.minHeight=px(t))}function yt(){c()}function pt(){c()}function wt(){c()}function bt(){var n=this;g(n);c()}function kt(){var r=d(),u=FE("a",l),n,i;u==null||u.hasClass("no-perm")||(n=[],r.Mag&&t.MagGroupId!=null&&n.push(t.MagGroupId),r.Legsen&&t.LegsenGroupId!=null&&n.push(t.LegsenGroupId),i=new Loc(u.attr("href")),i.param("c",r.ClassId),i.param("g",n!=null&&n.length>0?n.join(","):null),i.param("precise",r.Precise?1:null),u.attr("href",i.render()))}function dt(n){if(n===null||n.length===0)return null;var t=n.match(/^([0-9\.]+)px$/);return t?ToFloat(t[1]):null}function f(){i&&(o.Disable(),i.hide(),r.empty(),r.style.minHeight="",frape.pick(),s=null)}function nt(){var n,t;(f(),frape.alertCm())||(n=!e.hasClass("ON"),n||Wgm.Close(0),frape.zoomTables(),ShowSplash(),t=ni(n),ti(t))}function gt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function ni(n){return a.load(window.location.href),a.param(ToolMan.Judik,n?1:null),a.render()}function ti(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Ver:t.Ver,Shift:t.Shift})}var e;if(t=OptEx({Classes:null,HandlerUrl:"/handler/rule.ashx",SliceId1:null,SliceId2:null,IsFull:!1,AroH:12,AroL:40,MagGroupId:null,LegsenGroupId:null,WidgetLevel:1,PermPreview:!1},t),e=this[0],e){FE(".Switch",e,{onclick:nt});frape.init();var o=null,s=null,i=null,l=null,v=null,y=null,p=null,w=null,r=null,u=null,h=null,b="http://www.w3.org/2000/svg",a=new Loc(window.location.href);it()}}}(jQuery),function(n){n.fn.tooldiff=function(t){function b(){eman.Shortcuts.Add({which:100},function(){y()});eman.Shortcuts.Add({shiftKey:!0,which:68},function(){r.toggleClass("MINI")});s=Wgm.Add({Close:e,Level:1});v.resize(function(){i&&i.isVisible()&&w(u)})}function h(){var n=null,t=null;this.hasClass("first")?n=frape.firstDiff():this.hasClass("prev")?(t=frape.visibleDiff(),t!=null&&(n=frape.prevDiff(t.Row)),n==null&&(n=frape.lastDiff())):this.hasClass("next")?WinStb()?n=frape.firstDiff():(t=frape.visibleDiff(),t!=null&&(n=t.Shift<200?frape.nextDiff(t.Row):t.Row),n==null&&(n=frape.firstDiff())):this.hasClass("last")&&(n=frape.lastDiff());n!=null&&frape.animateTo(n)}function y(){var n,i;frape.alertCm()||(n=t.Diff!=null,Wgm.Close(),ShowSplash(),frape.zoomTables(),i=n?l({Diff:null}):ut(),a(i))}function k(){var t=!r.hasClass("MINI"),n;ShowSplash();n=l({DiffMin:t});a(n)}function d(n){t.SlicesCount!=1&&(i!=null&&i.isVisible()?e():it(n))}function g(i){var s,f,r,c,o,h,v;if((i=EventFix(i),s=i.target,f=s.closestElem("tbody",this),f)&&(r=s.closestElem("tr",f),r)){if(r.hasClass(t.DC)||r.hasClass(t.OC))return;if(r.hasClass(t.AC)){e();return}for(c=f.children.length,o=0;o<c;o++)h=f.children[o],h.toggleClass(t.AC,h==r);u.prop({html:FE("td",r).innerHTML,attr:{"data-version":r.attr("data-version"),"data-code":r.attr("data-code"),"data-id":r.attr("data-id")}});n("var",u).remove();nt();e();v=l({Diff:u.attr("data-code")});a(v)}}function nt(){var n="red",t="green",f=FE("label",o),e=FE("label",u),i,r;(f.removeClass(n),f.removeClass(t),e.removeClass(n),e.removeClass(t),i=o.attrI("data-version"),r=u.attrI("data-version"),i!=null&&r!=null)&&(f.addClass(i<r?n:t),e.addClass(r>i?t:n))}function tt(){i=document.body.appendElem("div",{cls:"Pop W",style:{display:"none",width:"300px",position:"fixed"}});i.appendElem("div",{cls:"Aro"});var t=i.appendElem("div",{cls:"Hz"});t.appendElem("a",{cls:"Close",onclick:e});i.cap=t.appendElem("div",{cls:"DslCap"});i.body=i.appendElem("div",{cls:"DslGrid",onclick:g});c=n(i);n(i.body).wheelnobubble()}function it(n){i||tt();n.cache==null?rt("DiffSlices",{DocId:t.DocId,SliceId:u.attr("data-id"),OccupiedId:o.attr("data-id")},function(t){t.Status==1?(n.cache=t.Html,p(n,t.Html)):n.cache=""}):p(n,n.cache)}function p(r,f){i&&(s.CloseOthers(),s.Enable(),i.body.innerHTML=f,setTimeout(function(){var f;if(i.cap.textContent=rs("Zpl.DiffSlice2"),w(r),i.show("block"),f=FE("tr."+t.AC,i.body),f!=null){var e=n(f),o=n(i.body),s=e.position().top-e.height()+o.scrollTop();o.scrollTop(s)}u.toggleClass(t.AC)},100))}function w(r){if(i){var u=n(r),f=u.offset();i.style.top=px(f.top+u.outerHeight()/2-c.outerHeight()/2-v.scrollTop());i.style.left=px(f.left-c.outerWidth()-t.AroW)}}function e(){i&&(s.Disable(),i.hide(),i.body.empty(),u.removeClass(t.AC))}function rt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxHtml(f,i,r,u)}function ut(){f.load(window.location.href);var n=new Loc(t.StartUrl);return n.param(f.params),n.hash(f.hash()),n.render()}function l(n){return f.load(window.location.href),n!=null&&(typeof n.Diff!="undefined"&&(f.param(ToolMan.Diff,n.Diff),n.Diff||f.param("diff",null)),typeof n.DiffMin!="undefined"&&f.param(ToolMan.DiffMin,n.DiffMin?1:null)),f.render()}function a(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Shift:t.Shift})}var r,o,u;t=OptEx({DocId:null,SlicesCount:null,Diff:null,StartUrl:null,AC:"active",DC:"disabled",OC:"occupied",HandlerUrl:"/handler/rule.ashx",AroW:12,MnT:56},t);r=this[0];FE(".Head .Switch",r,{onclick:y});FE(".Head .Exp",r,{onclick:k});FE("a.first",r,{onclick:h});FE("a.prev",r,{onclick:h});FE("a.next",r,{onclick:h});FE("a.last",r,{onclick:h});o=FE(".Slice1",r);u=FE(".Slice2",r,{onclick:function(){d(this)}});frape.init();var s=null,i=null,c=null,v=n(window),f=new Loc(window.location.href);t.SlicesCount==null&&(t.SlicesCount=1);b()}}(jQuery),function(n){n.fn.toolsilver=function(t){function r(){var t=n.cookieB("silver",!0);n.cookie("silver",!t,{path:"/",expires:730});u(window.location.href)}function u(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Shift:t.Shift})}t=OptExtend({},t);var i=this[0],f=FE(".Switch",i,{onclick:r});frape.init()}}(jQuery),function(n){n.fn.toolcomment=function(t){function y(){s.Init();n(u).wheelnobubble();n(u).bind({scroll:function(){c.CloseOwn(u)}});n(window).bind({resize:c.Move});eman.Shortcuts.Add({which:99},function(){l()});eman.Shortcuts.Add({shiftKey:!0,which:67},function(){var t=i.toggleClass("MINI"),n;ShowSplash();n=f({CommentMin:t});e(n)});o==null||o.disabled||eman.Shortcuts.Add({which:119},function(){o.click()});i.hasClass("ON")&&(b(!0),s.Attach(!0),n(document).ready(function(){var t=FE(".packs tr.active",u),i;t!=null&&t.rowIndex>4&&(i=n(t).position().top,i+=n(u).scrollTop(),n(u).scrollTop(i));typeof tinymce!="undefined"&&setTimeout(function(){var n=document.body.appendElem("div",{style:{position:"fixed",top:"-500px",left:"0",display:"none"}});n.appendElem("textarea",{id:"test"});tinymce.init({selector:"#test",skin:"zpl"});setTimeout(function(){tinymce.remove("#test");n.remove()},2e3)},100)}))}function h(){var n=null,t=null;this.hasClass("first")?n=frape.firstComment():this.hasClass("prev")?(t=frape.visibleComment(),t!=null&&(n=frape.prevComment(t.Row)),n==null&&(n=frape.lastComment())):this.hasClass("next")?WinStb()?n=frape.firstComment():(t=frape.visibleComment(),t!=null&&(n=t.Shift<200?frape.nextComment(t.Row):t.Row),n==null&&(n=frape.firstComment())):this.hasClass("last")&&(n=frape.lastComment());n!=null&&frape.animateTo(n)}function l(){var u,r;frape.alertCm()||(u=!i.hasClass("ON"),ShowSplash(),r=null,u?t.PackId==null?nt("PackOpen",{DocId:t.DocId,PackId:n.cookieI("pack")},function(n){n.Status==1&&(r=f({Comment:n.PackId,CommentEdit:n.CommentEdit}),e(r))}):(r=f({Comment:t.PackId}),e(r)):(r=f({Comment:null}),e(r)))}function p(){ShowSplash();var n=!i.hasClass("MINI"),t=f({CommentMin:n});e(t)}function w(n){var l=EventFix(n),s=l.target,i=s.closestElem("a[data-packid]",this),h,t,r,o;if(i!=null&&!i.hasClass("noread")){ShowSplash();h=f({Comment:i.attrI("data-packid"),CommentEdit:!1});e(h);return}if(t=s.closestElem(".pack-super",u),t!==null){if(r=t.closestElem("tr",u),r===null)return;if(o=FE("[data-packid]",r),o===null)return;c.Run("SuperPack",{PackId:o.attrI("data-packid"),View:1},t);return}}function b(n){frape.togglebind("click",d,n)}function k(n){var h=frape.getID(n),i=n.beforeElem("figure",{cls:t.EM+" baby",attr:{"data-for":h}}),r,u,f,e,o;i.addClass("L"+frape.getLevel(n));n.hasClass("HL")&&i.addClass("HL");r=i.appendElem("div",{cls:"body",style:{borderColor:"#"+t.Color,backgroundColor:"#"+t.Color}});r.appendElem("div",{cls:"value xc"});u=r.appendElem("div",{cls:"edit-bar"});f=u.appendElem("a",{cls:"edit",title:rs("Zpl.FragCommentEditT")});f.appendElem("i");e=u.appendElem("a",{cls:"delete",title:rs("Zpl.FragCommentDelT")});e.appendElem("i");o=u.appendElem("a",{cls:"pack-super",title:rs("Zpl.FragCommentSuperT")});o.appendElem("i");r.appendElem("div",{cls:"cm-down",style:{borderTopColor:"#"+t.Color}});s.ModeEdit(i)}function d(n){var u=n.target,i,f,r;if(frape.hasClass("BUZZ")&&(i=frape.closestFrag(u),i!=null&&i.hasClass("CC")&&frape.colCtn(n))){if(!t.CanWrite||!frape.canWriteCm()||frape.isAnchor(u))return;f=frape.getFID(i);r=frape.commentByFID(f);r!==null?r.hasClass(t.EM)?s.Focus(r):s.ModeEdit(r):k(i);return}}function g(n){return"ta"+n.attr("data-for")}function nt(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}function f(n){if(r.load(window.location.href),n!=null){if(typeof n.Comment!="undefined"){r.param(ToolMan.Comment,n.Comment);var t=r.hash();t!=null&&v.test(t)&&r.hash(null);r.param("p",null);n.Comment==null&&(r.param(ToolMan.CommentMin,null),r.param(ToolMan.CommentEdit,null))}typeof n.CommentEdit!="undefined"&&(r.param(ToolMan.CommentEdit,n.CommentEdit?1:null),n.CommentEdit&&r.param(ToolMan.Anchor,null));typeof n.CommentMin!="undefined"&&r.param(ToolMan.CommentMin,n.CommentMin?1:null)}return r.render()}function e(n){var t=frape.visibleFrag();FirePost(n,{FID:t.FID,Shift:t.Shift})}var i,u,s;if(t=OptEx({HandlerUrl:"/handler/comment.ashx",DocId:null,SliceId1:null,SliceId2:null,PackId:null,Color:null,Dark:!1,ColorLight:null,CanWrite:!1,EM:"edit-mode"},t),i=this[0],i!=null){FE(".Head .Switch",i,{onclick:l});FE(".Head .Exp",i,{onclick:p});u=FE(".Items",i,{onclick:w});FE("a.first",i,{onclick:h});FE("a.prev",i,{onclick:h});FE("a.next",i,{onclick:h});FE("a.last",i,{onclick:h});frape.init();var a=window.location,r=new Loc(a.href),v=/^#?c\d+$/g,c=new Super,o=FE(".cradle input",i);o==null||o.disabled||n(o).change(function(){if(!frape.alertCm()){ShowSplash();var n=f({CommentEdit:this.checked});e(n)}});s=new commentator({Frags:frape.root,SliceId:t.SliceId1,IsFull:!1,View:1,CanRead:!0,CanWrite:t.CanWrite,Color:t.Color,ColorLight:t.ColorLight,Dark:t.Dark,SaveData:function(n){var r=n.attrI("data-c"),i=n.attr("data-for"),u=frape.fragByID(i);return{CommentId:r,FID:frape.parseFID(i),SliceId:u.hasClass("OS")?t.SliceId2:t.SliceId1,TargetId:0,DocId:t.DocId,PackId:t.PackId}},AfterSave:function(n,r){r.attr("data-c",n.CommentId);FE("#c"+n.CommentId,r)==null&&r.prependElem("a",{id:"c"+n.CommentId});t.PackId==null&&(t.PackId=n.PackId);n.CanAdd||i.removeClass("CanAdd");var f=r.attr("data-for"),u=frape.fragByID(f);frape.hasOscar(u)||frape.addOscar(u)},AfterDel:null,AfterFocus:null,EditorId:g});y()}}}(jQuery),function(n){n.fn.oscar=function(t){function w(){n(window).on({scroll:s.Move,resize:s.Move});o=Wgm.Add({Close:h,Level:1});frape.hasClass("RICIN")&&(frape.bind("click",b),n(document.body).click(k))}function b(n){h();var i=n.target,t=frape.closestFrag(i);t!==null&&frape.colOscar(i)&&(g(t),frape.pick(t))}function k(n){i&&!i.contains(n.target)&&i.isVisible()&&h()}function d(){var t,u;i=document.body.appendElem("div",{cls:"poscar",style:{display:"none"}});t=i.appendElem("div",{cls:"hd"});t.appendElem("a",{cls:"close",onclick:ft});t.appendElem("div",{cls:"bar",txt:rs("Zpl.ToolCommentPopup")});f=t.appendElem("ul");r=i.appendElem("div",{cls:"bd"});u=i.appendElem("div",{cls:"arrow"});l=u.appendElem("i");e=n(i)}function g(n){i||d();var r={SliceId:t.SliceId1,IsFull:t.IsFull,View:t.View};t.View==2?r.FragId=n.attrI("data-f"):(r.FID=frape.getFID(n),r.Ver=frape.getVer(n));et("CommentOscar",r,function(t){t.Status===1&&nt(n,t)})}function nt(u,f){i&&(o.CloseOthers(),o.Enable(),r.style.minHeight="",r.innerHTML=f.Html,tt(),setTimeout(function(){var h=n(u),f=h.offset(),o;i.style.top=px(f.top-e.outerHeight()-t.AroH);i.style.left=px(f.left+h.outerWidth()-e.outerWidth()-7);i.show("block");o=f.top-e.outerHeight()-t.AroH-100;o<n(window).scrollTop()&&AnimateTo(o);n("figure",r).wheelnobubble();n(".pack-super",r).click(function(n){var i=n.currentTarget,r=i.closest(".cm");r!=null&&s.Run("SuperOscar",{CommentId:r.attrI("data-c"),IsFull:t.IsFull,SliceId:t.SliceId1,View:t.View},i)})},100))}function tt(){(it(),f.hasChildren())&&a(f.firstElementChild)}function it(){var t=r.children.length,e=(99-1*t)/t,i,n,u,o;for(f.empty(),i=0;i<t;i++)n=r.children[i],u=f.appendElem("li",{onclick:ut,style:{minWidth:rt(t,e),maxWidth:e+"%",backgroundColor:"#"+n.attr("data-color")}}),u.body=n,o=u.appendElem("a"),o.appendElem("span",{title:n.attr("data-name"),txt:TextLeft2(n.attr("data-name"),20)}),n.attrB("data-dark",!1)&&u.addClass("white")}function rt(n,t){return n<5?"20%":t*.7+"%"}function a(n){for(var e,o,t=0,u=f.children.length;t<u;t++)e=f.children[t],e.toggleClass("selected",e===n);for(t=0,u=r.children.length;t<u;t++)o=r.children[t],o.toggle(o===n.body);i.style.backgroundColor="#"+n.body.attr("data-colorlight");r.style.backgroundColor="#"+n.body.attr("data-color");l.style.borderTopColor="#"+n.body.attr("data-color")}function ut(){var u=e.outerHeight(),f=v(i.style.top),o=this,s=v(r.style.minHeight)||0,t=n(r).outerHeight();t>s&&(r.style.minHeight=px(t));a(o);setTimeout(function(){var n=u-e.outerHeight();i.style.top=px(f+n)},0)}function v(n){if(n==null||n.length===0)return null;var t=n.match(/^([0-9\.]+)px$/);return t?ToFloat(t[1]):null}function h(){i&&(o.Disable(),s.CloseOwn(i),i.hide(),r.empty(),frape.pick())}function ft(n){h();EventKill(n)}function et(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var c;if(t=OptExtend({HandlerUrl:"/handler/comment.ashx",SliceId1:null,IsFull:null,View:1,AroH:7},t),c=this[0],c!=null){frape.attach(c);var o=null,y=window.location,u=new Loc(y.href),i=null,f=null,r=null,l=null,e=null,p=/^#?c\d+$/g,s=new Super;n("dfn",frape.root).on({mouseenter:function(){this.hasChildren()&&FE("i",this,{title:rs("Zpl.OscarT")})},mouseleave:function(){var t,n;if(this.hasChildren())for(t=this.children.length,n=0;n<t;n++)this.children[n].attr("title",null)}});w()}}}(jQuery);Super=function(){function n(n){var t=this;this._Opt=null;this.bubble=null;this.Move=null;this.Close=null;this.CloseOwn=null;this._Opt=OptEx({HandlerUrl:"/handler/comment.ashx"},n);window.superBubble==null&&(window.superBubble=new SuperBubble);this.bubble=window.superBubble;this.Move=function(){return t.bubble.Move()};this.Close=function(){t.bubble.Close()};this.CloseOwn=function(n){return t.bubble.CloseOwn(n)}}return n.prototype.Run=function(n,t,i){var r=this,u=!this.bubble.SameBtn(i);this.bubble.Close();u&&this._AjaxForm(n,t,function(n){n.Status==1&&(r.bubble.Open(i,n),r.bubble.Move())})},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n}();SuperBubble=function(){function n(){var n=this;this.$win=null;this.$bubble=null;this.$shadow=null;this.$btn=null;this.wg=null;this.$win=$(window);this.$bubble=null;this.$shadow=null;this.$btn=null;this.wg=Wgm.Add({Close:function(){n.Close()},Level:0})}return n.prototype.SameBtn=function(n){return this.$btn!=null&&n==this.$btn[0]},n.prototype.Open=function(n,t){n!=null&&t!=null&&(this.$bubble==null&&(this.$bubble=$(document.body.appendElem("div",{cls:"super-bubble",style:{display:"none"}})),this.$bubble.wheelnobubble(),this.$shadow=$(document.body.appendElem("div",{cls:"zero-tmp"}))),this.$btn=$(n),this.ToggleBtn(!0),this.$bubble.html(t.Menu),this.$shadow.html(t.Shadow),new ClipboardJS(".ZC"),this.$bubble.show(),this.wg.CloseOthers(),this.wg.Enable())},n.prototype.Move=function(){if(this.$btn!=null){var n=this.$btn.offset();this.$bubble.css({top:n.top+this.$btn.outerHeight()-this.$win.scrollTop(),left:n.left-this.$bubble.outerWidth()+this.$btn.outerWidth()})}},n.prototype.Close=function(){this.wg.Disable();this.ToggleBtn(!1);this.HideBubble()},n.prototype.CloseOwn=function(n){this.$btn!=null&&n.contains(this.$btn[0])&&(this.wg.Disable(),this.ToggleBtn(!1),this.HideBubble())},n.prototype.ToggleBtn=function(n){this.$btn!=null&&(this.$btn.toggleClass("hover",n),this.$btn.closest(".edit-bar").toggleClass("hold",n),n||(this.$btn=null))},n.prototype.HideBubble=function(){this.$bubble!=null&&(this.$bubble.empty(),this.$bubble.hide())},n}(),function(n){n.fn.docsum=function(t){function o(){e("SumAll",{DocId:t.DocId,SliceId:t.SliceId,Text:t.Text,OnlyFID:t.OnlyFID},function(t){var o,f,e;if(t.Status==1&&t.Data!=null){for(o=t.Data.length,f=0,f=0;f<o;f++){var s=t.Data[f],l=s[0],h=s[10],c=FE(".Node[data-f='"+l+"']",i);c&&h!=null&&u(c,h)}for(e=n.find(".Node[data-f]",i),f=0;f<e.length;f++)r(e[f],!0)}})}function s(){for(var u=n.find(".Node[data-f]",i),t=0;t<u.length;t++)r(u[t],!1)}function h(n){var f=n.target,h=f.closestElem("h4",i),e,u,o,s;if(h!=null){i.toggleClass(t.Exp);return}if(e=f.closestElem("a.Icon",i),e){if(u=e.parentNode,!u.attrB("data-dbchild"))return;u.IsLoaded?a(u)&&r(u,!u.IsExpanded):c(u);return}if(o=f.closestElem("a.Name",i),o){s=o.closestElem("div.Node",i);eman.NavSum.Fire(s);return}}function c(n){e("Sum",{DocId:n.attrI("data-docid",t.DocId),SliceId:n.attrI("data-sliceid",t.SliceId),FragId:n.attrI("data-f"),Text:t.Text,OnlyFID:t.OnlyFID},function(t){t.Status==1&&(u(n,t.Data),r(n,!0))})}function u(n,t){for(var i,r,f=0;f<t.length;f++)i=t[f],r=v(n,i[0]),r||(r=l(n,i)),i[10]&&(u(r,i[10]),r.IsLoaded=!0);n.IsLoaded=!0}function l(n,i){var r=CE("div",{cls:"Node",attr:{"data-f":i[0]}});return t.DocId==null&&r.attr("data-docid",i[1]),t.SliceId==null&&r.attr("data-sliceid",i[2]),r.Url=i[3],r.Name=i[4],r.Note=i[5],r.attr("data-dbchild",i[6]),r.IsExpanded=!1,r.IsLoaded=!1,r.SearchRank=i[9],typeof n.Level=="undefined"&&(n.Level=0),r.Level=n.Level+1,r.style.paddingLeft=px(r.Level*t.LevelW),n.attr("data-dbchild",!0),r.exp=r.appendElem("a",{cls:"Icon"}),r.exp.appendElem("img"),r.expname=r.appendElem("span",{cls:"NameNote"}),r.expname.appendElem("a",{cls:"Name",title:r.Name,href:r.Url,html:r.Name}),r.Note!=null&&r.expname.appendElem("span",{cls:"Note",html:"("+r.Note+")"}),f(r),n.Body||(n.Body=n.afterElem("div",{cls:"Body",style:{display:n.IsExpanded?"":"none"}})),r.SearchRank>0&&r.addClass("Hit"),n.Body.appendChild(r),r}function a(n){return n.Body&&n.Body.hasChildren()}function v(n,t){var r,i,u;if(!n.Body)return null;for(r=n.Body.children,i=0;i<r.length;i++)if(u=r[i],u.attrI("data-f")==t)return u;return null}function r(n,t){n.Body&&(n.IsExpanded=t,n.Body.toggle(t),f(n))}function f(n){var t=n.attrB("data-dbchild")?n.IsLoaded?n.IsExpanded?-1:1:1:0;y(n,t)}function y(n,t){var r=p(n),i;if(r){i=n.exp.firstElementChild;switch(t){case-1:i.src="/res/tree-minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/tree-none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/tree-plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}}function p(n){return n.exp||(n.exp=FE("a.Icon",n)),n.exp}function e(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptEx({DocId:null,SliceId:null,LevelW:20,HandlerUrl:"/handler/rule.ashx",ExpandAll:".ExpandAll",CollapseAll:".CollapseAll",Exp:"Exp",Text:null,HasGrandchild:!0,OnlyFID:!1},t);var i=this[0];i&&(t.HasGrandchild&&(FE(t.ExpandAll,i,{onclick:o}),FE(t.CollapseAll,i,{onclick:s})),n(i).click(h))}}(jQuery),function(n){var t=function(){function n(n,t){var i=this;(this._Opt=OptEx({ExpandAll:".ExpandAll",CollapseAll:".CollapseAll",Exp:"Exp",HasGrandchild:!0},t),this._Root=n,this._Root)&&(this._Opt.HasGrandchild&&(FE(this._Opt.ExpandAll,n,{onclick:function(n){return i.ExpandAll_Click(n)}}),FE(this._Opt.CollapseAll,n,{onclick:function(n){return i.CollapseAll_Click(n)}})),$(this._Root).click(function(n){return i.RootClick(n)}))}return n.prototype.ExpandAll_Click=function(){for(var t=$.find(".Node",this._Root),n=0;n<t.length;n++)this.ToggleBody(t[n],!0)},n.prototype.CollapseAll_Click=function(){for(var t=$.find(".Node",this._Root),n=0;n<t.length;n++)this.ToggleBody(t[n],!1)},n.prototype.RootClick=function(n){var i=n.target,o=i.closestElem("h4",this._Root),r,t,f,u,e;if(o!=null){this._Root.toggleClass(this._Opt.Exp);return}if(r=i.closestElem("a.Icon",this._Root),r!=null){if(t=r.parentNode,!t.attrB("data-haschildren"))return;this.HasBodyChildren(t)&&(f=this.FindBody(t),this.ToggleBody(t,!f.isVisible()));return}if(u=i.closestElem("a.Name",this._Root),u!=null){e=u.closestElem("div.Node",this._Root);eman.NavSum.Fire(e);return}},n.prototype.HasBodyChildren=function(n){var t=this.FindBody(n);return t!=null&&t.hasChildren()},n.prototype.ToggleBody=function(n,t){var i=this.FindBody(n);i!=null&&(i.toggle(t),this.RebuildExp(n))},n.prototype.RebuildExp=function(n){var t=this.FindBody(n),i;t!=null&&(i=n.attrB("data-haschildren")?t.isVisible()?-1:1:0,this.SetIcon(n,i))},n.prototype.SetIcon=function(n,t){var r=this.FindExp(n),i;if(r){i=n.exp.firstElementChild;switch(t){case-1:i.src="/res/tree-minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/tree-none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/tree-plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}},n.prototype.FindExp=function(n){return n.exp||(n.exp=FE("a.Icon",n)),n.exp},n.prototype.FindBody=function(n){if(n.body==null){var t=n.attr("data-node");if(IsNullOrEmpty(t))return null;n.body=FE("[data-body="+t+"]",this._Root)}return n.body},n}();n.Worker=t}(EurSum||(EurSum={}));AddJQueryPlugin("eursum",function(n){this.each(function(t,i){new EurSum.Worker(i,n)})}),function(n){var t=function(){function n(n,t){var i=this;(this._Eraser=null,this._Opt=OptEx({},t),this._Root=n,this._Root)&&eman.Hash.Change(function(n){return i.Highlight(n)})}return n.prototype.Highlight=function(n){var r=this,i=n.Elem1,t;this.CleanRows();i!=null&&(t=i.parentNode,t.tagName==="A"&&(t=t.parentNode),t.addClass("HL"),this._Eraser=t.prependElem("b",{cls:"eraser"}),this._Eraser.appendElem("u",{onclick:function(){r.CleanRows();window.location.hash="_"}}))},n.prototype.CleanRows=function(){$(".HL",this._Root).removeClass("HL");this._Eraser!=null&&(this._Eraser.remove(),this._Eraser=null)},n}();n.Worker=t}(EurCtn||(EurCtn={}));AddJQueryPlugin("eurctn",function(n){this.each(function(t,i){new EurCtn.Worker(i,n)})}),function(n){n.fn.doclinks=function(t){function u(){n("h5").addClass(t.AC);var u=[];n("table[data-linktypeid]",i).each(function(){this.show();var n=this.attrI("data-linktypeid");u.push(n)});r(u)}function f(){n("h5").removeClass(t.AC);n("table[data-linktypeid]",i).hide();r(null)}function e(){var u=this,e=u.attrI("data-linktypeid"),o=u.toggleClass(t.AC),f=[];n("table[data-linktypeid]",i).each(function(){var n=this.attrI("data-linktypeid");n==e&&this.toggle(o);this.isVisible()&&f.push(n)});r(f)}function r(i){var r=i!=null&&i.length>0?i.join():null;n.cookie(t.CookieName,r,{path:t.CookiePath,raw:!0})}t=OptExtend({ExpandAll:".ExpandAll",CollapseAll:".CollapseAll",AC:"act",CookieName:"doc-links",CookiePath:null},t);var i=this[0];i&&(FE(t.ExpandAll,i,{onclick:u}),FE(t.CollapseAll,i,{onclick:f}),n("h5",i).click(e))}}(jQuery),function(n){n.fn.branch=function(t){function f(n){var f=n.target,u=f.closestElem("a.Icon",i),t;u&&(t=u.parentNode,t.exp=u,t.exp.img=FE("img",t.exp),t.IsLoaded?t.Body&&t.Body.hasChildren()&&(t.IsExpanded=!t.IsExpanded,t.Body.toggle(t.IsExpanded),r(t)):e(t))}function e(n){c("Branch",{TreeId:t.TreeId,GroupId:n.attrI("data-groupid")},function(t){t.Status==1&&(n.IsLoaded=!0,n.IsExpanded=!0,u(n,t.Data))})}function u(n,t){for(var i,e,f=0,h=t.length;f<h;f++)i=t[f],e=s(n,i[0]),e||(e=o(n,i)),i[5]&&u(e,i[5]);r(n)}function o(n,t){var i=CE("div",{cls:"Node1",attr:{"data-groupid":t[0]}});return i.Url=t[1],i.Name=t[2],i.Note=t[3],i.HasChild=t[4],i.IsExpanded=!1,i.IsLoaded=!1,n.HasChild=!0,i.exp=i.appendElem("a",{cls:"Icon"}),i.exp.img=i.exp.appendElem("img"),i.Url!=null?i.appendElem("a",{cls:"Link",href:i.Url,html:i.Name}):i.appendElem("span",{cls:"Name",title:i.Name,html:i.Name}),i.Note!=null&&i.appendElem("span",{cls:"Note",html:"("+i.Note+")"}),r(i),n.Body||(n.Body=n.afterElem("div",{cls:"Bd",style:{display:n.IsExpanded?"":"none"}})),n.Body.appendElem(i),i}function s(n,t){var i=n.Body,r,f,u;if(!i||i.children.length==0)return null;for(r=0,f=i.children.length;r<f;r++)if(u=i.children[r],u.attrI("data-groupid")==t)return u;return null}function r(n){var t=n.exp,i;t&&t.img&&(i=n.HasChild?n.IsLoaded?n.IsExpanded?-1:1:1:0,h(n,i))}function h(n,t){if(n.exp&&n.exp.img){var r=n.exp,i=n.exp.img;switch(t){case-1:i.src="/res/tree-minus0.png";r.title=i.alt=rs("Zpl.Pack");break;case 0:i.src="/res/tree-none.png";r.title=i.alt=rs("Zpl.Nochildren");break;case 1:i.src="/res/tree-plus0.png";r.title=i.alt=rs("Zpl.Unpack")}}}function c(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptExtend({TreeId:null,HandlerUrl:"/handler/rule.ashx"},t);var i=this[0];i&&n(i).click(f)}}(jQuery),function(n){n.fn.captcha=function(t){function s(){o(t.ValidationGroup)}function h(n){var i=EventFix(n);i.keyCode==13&&(EventKill(i),SubmitForm(t.EventTarget,"",t.ValidationGroup))}function c(n){var t=EventFix(n);EventKill(t);l()}function l(){var n=f.src,t=n.indexOf("?"),i;t>=0&&(n=n.substr(0,t),i=new Date,f.src=n+"?_"+i.getTime())}function o(r){if(t.ValidationGroup!=r&&r)return!0;var f=n.trim(u.value);return f!=null&&f.length>0?(i.empty(),i.hide(),!0):(i.innerHTML=t.MsgEmpty,i.show("block"),!1)}var r,u;if(t=OptEx({Focus:!1,EventTarget:null,ValidationGroup:null,MsgEmpty:null,MsgFail:null,CSSImg:"Image",CSSInput:"Input",CSSReload:"Reload",CSSValid:"Valid"},t),ExtendValidation(),r=this[0],r){u=FE("."+t.CSSInput+" input",r,{onkeypress:h,onchange:s});FE("."+t.CSSReload+" a",r,{onclick:c});var f=FE("."+t.CSSImg+" img",r),i=null,e=FE("."+t.CSSValid);e!=null&&(i=FE("span, p",e,{style:{display:"none"}}));IsNullOrEmpty(t.MsgFail)||(i.innerHTML=t.MsgFail,i.show("block"));t.Focus&&u.focus();r.Validate=o}}}(jQuery),function(n){n.fn.slidebranches=function(t){function e(){r.isVisible()?f.slideUp(t.Duration,function(){u.textContent=rs("Zpl.BranchMore");i.removeClass(t.Exp)}):f.slideDown(t.Duration,function(){u.textContent=rs("Zpl.BranchLess");i.addClass(t.Exp)})}var i,r,u,f;(t=OptExtend({Body:".body-extra",Btn:".more",Exp:"exp",Duration:500},t),i=this[0],i)&&(r=FE(t.Body,i),u=FE(t.Btn,i,{onclick:e}),u&&r)&&(f=n(r))}}(jQuery),function(n){n.fn.expander=function(n){function t(n){return n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth}n=OptExtend({ExpandCss:"exp",CollapseCss:"collapse",AddExpander:!1,ExpanderCss:"expander",ExpandText:"Rozbalit",CollapseText:"Zabalit"},n);this.each(function(){var r=this,i=null,u;t(r)&&(r.addClass(n.ExpandCss),u=r,n.AddExpander&&(i=r.afterElem("a",{cls:n.ExpanderCss,txt:n.ExpandText}),i.addClass(n.ExpandCss),u=i),u.onclick=function(){r.toggleClass(n.ExpandCss);r.toggleClass(n.CollapseCss);i!=null&&(i.toggleClass(n.ExpandCss),i.toggleClass(n.CollapseCss),i.textContent=i.textContent==n.ExpandText?n.CollapseText:n.ExpandText)})})}}(jQuery);Modal=function(){function n(n){this._Opt=null;this._Bg=null;this._Root=null;this._Label=null;this._Body=null;this._BtnOk=null;this._BtnCancel=null;this._Callback=null;this._Opt=OptEx({DefaultOK:"OK",DefaultCancel:"Cancel",DefaultMaxWidth:650,DefaultMaxHeight:500,MinFrame:100},n)}return n.prototype.Alert=function(n,t){t===void 0&&(t=null);this._Root==null&&this.Create();this.Position(n.MaxWidth,n.MaxHeight);this.Show();this.SetTxt(n);this._BtnOk.textContent=n.OK||this._Opt.DefaultOK;this._BtnOk.hide();this._BtnCancel.textContent=n.Cancel||this._Opt.DefaultCancel;this._BtnCancel.show();this._Callback=t},n.prototype.Confirm=function(n,t){t===void 0&&(t=null);this._Root==null&&this.Create();this.Position(n.MaxWidth,n.MaxHeight);this.Show();this.SetTxt(n);this._BtnOk.textContent=n.OK||this._Opt.DefaultOK;this._BtnOk.show();this._BtnCancel.textContent=n.Cancel||this._Opt.DefaultCancel;this._BtnCancel.show();this._Callback=t},n.prototype.Create=function(){var n=this,t,r,i;this._Bg=document.body.appendElem("div",{cls:"modal-bg"});$(this._Bg).click(function(){return n.RunCallback(!1)});this._Root=document.body.appendElem("div",{cls:"modal-win"});t=this._Root.appendElem("div",{cls:"hd"});this._Label=t.appendElem("span",{cls:"label"});r=t.appendElem("a",{cls:"close"});$(r).click(function(){return n.RunCallback(!1)});this._Body=this._Root.appendElem("div",{cls:"bd"});i=this._Root.appendElem("div",{cls:"ft"});this._BtnOk=i.appendElem("button",{cls:"ok",txt:this._Opt.DefaultOK});$(this._BtnOk).click(function(){return n.RunCallback(!0)});this._BtnCancel=i.appendElem("button",{cls:"close",txt:this._Opt.DefaultCancel});$(this._BtnCancel).click(function(){return n.RunCallback(!1)})},n.prototype.SetTxt=function(n){this._Label.textContent=n.Header;this._Body.innerHTML=n.Body},n.prototype.RunCallback=function(n){this._Callback!=null&&this._Callback(n);this.Hide()},n.prototype.Position=function(n,t){var i=$(window),r=i.width(),u=i.height(),f=this.FixDim(n||this._Opt.DefaultMaxWidth,this._Opt.MinFrame,r),e=this.FixFrame(n||this._Opt.DefaultMaxWidth,this._Opt.MinFrame,r),o=this.FixDim(t||this._Opt.DefaultMaxHeight,this._Opt.MinFrame,u),s=this.FixFrame(t||this._Opt.DefaultMaxHeight,this._Opt.MinFrame,u);this._Root.css({top:px(s),left:px(e),width:px(f),height:px(o)})},n.prototype.FixDim=function(n,t,i){return n+t*2>i?i-t*2:n},n.prototype.FixFrame=function(n,t,i){return n+t*2>i?t:(i-n)/2},n.prototype.Show=function(){this._Bg.show();this._Root.show()},n.prototype.Hide=function(){this._Bg.hide();this._Root.hide()},n}();FavLogic=function(){function n(n){this._Opt=null;this._BtnRoot=null;this._BtnLabel=null;this._ResumeRoot=null;this._ResumeNote=null;this._Modal=null;this._Opt=OptEx({ItemId:null,TypeId:null,HandlerUrl:"/handler/rule.ashx",BtnAC:"Active",BtnMsg0:"Přidej k oblíbeným",BtnMsg1:"Oblíbený",BtnSelector:null,ResumeSelector:null,ResumePerm:!1},n);this._BtnRoot=FE(this._Opt.BtnSelector);this._BtnLabel=FE("span",this._BtnRoot);this._ResumeRoot=FE(this._Opt.ResumeSelector);this._Modal=new Modal({DefaultOK:"Souhlasím",DefaultCancel:"Zrušit"});this.Init()}return n.prototype.Init=function(){var n=this;this._BtnRoot.onclick=function(){n._BtnRoot.hasClass(n._Opt.BtnAC)?n._AjaxForm("FavResume_S",{ItemId:n._Opt.ItemId,TypeId:n._Opt.TypeId},function(t){t.Status===1&&(IsNullOrEmpty(t.Resume)?n.DoDelete(function(){return n.ClearResume()}):n._Modal.Confirm({Header:"Popisek bude odstraněn!",Body:"Odebráním z oblíbených odstraníte i popisek!<br />Chcete přesto odebrat z oblíbených?",OK:"Odebrat",MaxHeight:170,MaxWidth:400},function(t){t&&n.DoDelete(function(){return n.ClearResume()})}))}):n.DoInsertOrUpdate()};this._Opt.ResumePerm&&(this._ResumeNote=new notator({Id:"ta"+this._Opt.ItemId,Root:FE(".resume",this._ResumeRoot),Save:function(t,i){n.DoInsertOrUpdate(t,i)},After:function(){},EmptyMsg:rs("Zpl.ResumeEmpty")}),this._ResumeNote.Attach())},n.prototype.DoDelete=function(n){var t=this;n===void 0&&(n=null);this._AjaxForm("Fav_D",{ItemId:this._Opt.ItemId,TypeId:this._Opt.TypeId},function(i){i.Status===1&&(t._BtnLabel!=null&&(t._BtnLabel.innerHTML='<i class="ai"><\/i>'+t._Opt.BtnMsg0),t._BtnRoot.toggleClass(t._Opt.BtnAC,!1),n!=null&&n(i))})},n.prototype.ClearResume=function(){if(this._Opt.ResumePerm)this._ResumeNote.CancelValue(),this._ResumeNote.SetValue();else{var n=FE(".value",this._ResumeRoot);n!=null&&(n.empty(),n.appendElem("span",{cls:"empty",txt:rs("Zpl.ResumeEmpty")}))}},n.prototype.DoInsertOrUpdate=function(n,t){var i=this;n===void 0&&(n=null);t===void 0&&(t=null);this._AjaxForm("Fav_IU",{ItemId:this._Opt.ItemId,TypeId:this._Opt.TypeId,Resume:n},function(n){n.Status===1&&(i._BtnLabel!=null&&(i._BtnLabel.innerHTML='<i class="ai"><\/i>'+i._Opt.BtnMsg1),i._BtnRoot.toggleClass(i._Opt.BtnAC,!0),t!=null&&t(n))})},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;AjaxForm(u,t,i,r)},n}(),function(n){n.fn.favman=function(t){function u(u){var e=u.target,f=e.closestElem(".Item",i);f&&r("Fav_D",{ItemId:f.attrI("data-itemid"),TypeId:t.TypeId},function(r){r.Status===1&&(n(f).remove(),n(".Item",i).length===0&&(n(".Item",i).hide(),i.appendElem("div",{html:t.Empty})))})}function r(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptEx({TypeId:null,Empty:null,HandlerUrl:"/handler/rule.ashx"},t);var i=this[0];n("img.Del",i).click(u);n(i).sort({Item:".Item[data-itemid]",Grip:".ColRight .Sort",Callback:function(n,i){var u=n.attrI("data-itemid");u!=null&&i!=null&&r("FavSort_U",{ItemId:u,TypeId:t.TypeId,Sort:i+1},function(){})}})}}(jQuery),function(n){n.fn.paypal=function(n){function t(){var t=document.body.appendElem("form",{action:n.action,method:n.method,target:n.target});t.appendElem("input",{type:"hidden",name:"cmd",value:n.cmd});t.appendElem("input",{type:"hidden",name:"hosted_button_id",value:n.hosted_button_id});t.submit()}n=OptExtend({action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_top",cmd:"_s-xclick",hosted_button_id:null},n);this.click(t)}}(jQuery),function(n){n.fn.tar=function(t){function s(){if(document.documentElement.hasClass("ie8"))r.on({keyup:u,keydown:u,focus:e,change:u});else r.bind({input:u,focus:e});n(window).resize(h);i.css({boxSizing:"border-box",display:"block",overflow:"hidden",resize:"none"});i.delta=r.outerHeight()-r.innerHeight();t.ResizeOnInit&&(i.prevValue=i.value,f())}function u(){o()}function e(){o()}function h(){f()}function o(){i.prevValue!==i.value&&(i.prevValue=i.value,f())}function f(){i.parentNode.style.height=px(r.outerHeight(!0));i.style.height="";i.style.height=px(i.scrollHeight+i.delta);i.parentNode.style.height=""}t=OptExtend({ResizeOnInit:!0},t);var i=this[0],r=n(i);i.Resize=f;s()}}(jQuery),function(n){n.fn.shield=function(n){function u(){switch(n.Status){case 0:t.empty();i(function(){return r()});break;case-1:setTimeout(function(){t.empty();i(function(){return f()})},(n.Delay||0)*1e3);break;default:t.empty();t.appendElem("span",{cls:"msg",txt:rs("Zpl.ShieldError")})}}function i(n){var i=t.appendElem("a",{cls:"continue btn btn-primary btn-md btn-wide",onclick:n});i.appendElem("span",{txt:rs("Zpl.ShieldContinue")})}function f(){o("go",{SliceId:n.SliceId,Code:n.Code},function(n){n.Status===1&&r()})}function r(){var n=window.location,t=e(n.pathname)+n.search+n.hash;window.location.href=t}function e(n){return IsNullOrEmpty(n)?"":n.replace("/nabidka","")}function o(t,i,r,u){var f=n.HandlerUrl+"?Cmd="+t;AjaxForm(f,i,r,u)}n=OptEx({HandlerUrl:"/handler/shield.ashx",SliceId:null,Code:null,Delay:null,Status:null,Cookie:"shield"},n);var t=this[0];t&&u()}}(jQuery),function(n){n.fn.sliceselect=function(){function s(){r()}function h(i){var h=EventFix(i),c=h.target,u=c.closestElem("a",t),s;u!=null&&(n("a",t).removeClass("selected"),u.addClass("selected"),s=u.attrI("data-s"),f.attr("data-s",s),f.innerHTML=u.innerHTML,o.param("s",s),e.href=o.render());r(!1)}function c(n){var t=n.target;i.contains(t)||r(!1)}function l(n){if(t.isVisible())switch(n.which){case 27:r(!1);EventKill(n)}}function r(n){typeof n=="undefined"&&(n=!t.isVisible());t.toggle(n);u.toggleClass("active",n)}var i=this[0];if(i){var u=FE(".grip",i,{onclick:s}),f=FE("a",u),t=FE(".list",i,{onclick:h}),e=window.location,o=new Loc(e.href);n(document).on({mousedown:c,keydown:l})}}}(jQuery),function(n){n.fn.packcomments=function(t){function rr(){var o,s;frape.init();ft();v.Init();v.Attach(!0);tr.on("click",cr);br();n("figure",r).on({mouseenter:ci,mouseleave:li});if(e.mouseover(function(){l!=1&&vt()}),f.mouseover(function(){l!=2&&fr()}),n(window).resize(function(){g=e.outerHeight();ct=f.outerHeight();u();at.Move()}),i.hasClass("AddCm"))ot.on("click",yr);vt();o=r.firstElementChild;o!=null&&(s=o.attrI("data-f"),p(s,t.Pad1));u();eman.Hash.Change(u)}function ci(){var u=n(this),t,r;u.hasClass("OS")||(t=this.attr("data-f"),r=h(t),n(".HL",i).removeClass("HL"),frape.highlight(r))}function li(){n(".HL",i).removeClass("HL")}function ur(){yt(0)}function vt(){yt(1)}function fr(){yt(2)}function yt(n){if(typeof n!="undefined"&&(l=n),l==1){e.on("scroll",pt);f.off("scroll",wt)}else if(l==2){e.off("scroll",pt);f.on("scroll",wt)}else l==0&&(e.off("scroll",pt),f.off("scroll",wt))}function rt(n,t){n.toggleClass("Used",t)}function pt(){var t;if(at.CloseOwn(this),!y&&(t=bt(),t!=null)){var e=t.row,c=n(e),r=e.attrI("data-f"),o=t.shift<0?0:t.shift,f=h(r),s=i.children.length;if(f!=null&&s>90&&f.attrI("data-i",0)/s<2/3){ti(f,o);u();return}ni(r,function(){p(r,o);u()});return}u()}function wt(){var c,e,h,o,l,r,t;if(hu(f))y||(c=i.firstElementChild,e=c.attrI("data-f"),e!=i.attrI("data-first")&&kr(e,function(){p(e,0);u()}));else if(cu(f,ot))y||(h=i.lastElementChild,o=h.attrI("data-f"),o!=i.attrI("data-last")&&(l=s(h,f.scrollTop()),dr(o,function(){p(o,l.shift);u()})));else if(r=er(),r!=null&&r.row!=null&&(t=or(r.index),t==null&&(t=sr(r.index)),t!=null&&t.row!=null)){var a=t.row,b=n(a),w=a.attrI("data-c"),v=ri(w);v!=null&&gr(v,t.shift)}Wgm.CloseAll(1);u();at.CloseOwn(this)}function bt(){var i=e.scrollTop(),n,r=null,t,u=bi(i);return dt(function(u,f){return u.hasClass("OS")?!0:(n=ru(u,i),t=wi(n.shift,n.height),t<-1||-1<=t&&t<0&&n.height+n.shift<g/2)?(k=f,!0):(r={shift:n.shift,height:n.height,index:f,row:u},!1)},u),r}function er(){var t=f.scrollTop(),n,i=null,r,u=ki(t);return ut(function(u,f){return(n=uu(u,t),r=et(n.shift,n.height),r<0)?(d=f,!0):(i={shift:n.shift,height:n.height,index:f,row:u},!1)},u),i}function or(n){var r=f.scrollTop(),i=null,t=null;return lr(function(n,u){t=s(n,r);var f=et(t.shift,t.height);return f<0?!1:n.hasClass("Used")?(i={shift:t.shift,height:t.height,index:u,row:n},!1):!0},n),i}function sr(n){var u=f.scrollTop(),i=null,t,r;return ut(function(n,f){return(t=s(n,u),r=et(t.shift,t.height),r>0)?!1:n.hasClass("Used")?(i={shift:t.shift,height:t.height,index:f,row:n},!1):!0},n),i}function hr(){var i=e.scrollTop(),r=f.scrollTop(),u=c.a1-i,o=c.a2-r,n,s,t;if(c.a1=i,c.a2=r,u!==0||o!==0)for(s=b.childNodes.length,t=0;t<s;t++)n=b.childNodes[t],n.pos.y1=n.pos.y1+u,n.pos.y2=n.pos.y2+o,n.attr("points",vi(n.pos))}function kt(){var i,t,r,u,o;lt||(lt=!0,oi=n(document).width()*.06,b.empty(),i=e.scrollTop(),t=f.scrollTop(),c.a1=i,c.a2=t,r={},u=bi(i),dt(function(n,u){if(n.hasClass("OS"))return!0;var c=n.attrI("data-f"),e=h(c),o=s(n,i),l=e!=null?s(e,t):ou(n.attrI("data-sort"),ot.outerHeight(),t),f=wi(o.shift,o.height);if(f<-1)k=u;else if(-1<=f&&f<=1)ai(o,l,e),r[c]=!0;else if(f>1)return!1;return!0},u),o=ki(t),ut(function(n,u){var h=n.attrI("data-c"),c,e;if(h==null||(c=n.attrI("data-f"),r[c]===!0)||(e=ri(h),e==null))return!0;var l=s(e,i),o=s(n,t),f=et(o.shift,o.height);if(f<-1)d=u;else if(-1<=f&&f<=1)ai(l,o,n);else if(f>1)return!1;return!0},o),lt=!1)}function ai(n,i,r){var u=document.createElementNS("http://www.w3.org/2000/svg","polyline"),f=frape.getLevel(r);u.pos={x1:0,x2:oi+f*t.Level,y1:n.shift+n.height/2+11,y2:i.shift+i.height/2};u.attr("points",vi(u.pos));u.attr("marker-end","url(#arrow)");b.appendElem(u)}function vi(n){var t=n.x1+","+n.y1;return t+=" "+(n.x1+18)+","+n.y1,t+=" "+(n.x2-38)+","+n.y2,t+(" "+(n.x2-20)+","+n.y2)}function cr(n){var i=n.target,t;i.closestElem("a",r)==null&&(t=i.closestElem("figure",r),t!=null&&pi(t),Wgm.CloseAll(1))}function dt(n,t){yi(r,n,t)}function ut(n,t){yi(i,n,t)}function yi(n,t,i){var u,r;if(n.hasChildren()&&(u=n.children.length,typeof i=="undefined"&&(i=0),!(i<0)&&!(i>=u)))for(r=i;r<u;r++)if(t(n.children[r],r)===!1)return}function lr(n,t){gt(i,n,t)}function gt(n,t,i){var u,r;if(n.hasChildren()&&(u=n.children.length,typeof i=="undefined"&&(i=u-1),!(i<0)&&!(i>=u)))for(r=i;r>=0;r--)if(t(n.children[r],r)===!1)return}function ar(n){typeof n=="undefined"&&(n=100);for(var t=i.children.length-n;t>0;)i.removeChild(i.firstElementChild),t--}function vr(n){typeof n=="undefined"&&(n=100);for(var t=i.children.length-n;t>0;)i.removeChild(i.lastElementChild),t--}function yr(n){var f=n.target,r=frape.closestFrag(f),e,i;if(r!=null&&frape.colCtn(n)&&r.hasClass("CC")){if(!t.CanWrite||frape.isAnchor(f))return;e=r.attrI("data-f");i=iu(e);i!=null?i.hasClass(t.EM)?v.Focus(i):v.ModeEdit(i):pr(r);u();return}}function pr(i){var s=i.attrI("data-f"),r=wr(i,{cls:t.EM+" baby",attr:{"data-f":s,"data-sort":i.attrI("data-sort")},style:{backgroundColor:"#"+t.Color}}),f=r.appendElem("div",{cls:"body"}),u=f.appendElem("div",{cls:"edit-bar"}),h=u.appendElem("a",{cls:"edit",title:rs("Zpl.FragCommentEditT")}),e,o;h.appendElem("i");e=u.appendElem("a",{cls:"delete",title:rs("Zpl.FragCommentDelT")});e.appendElem("i");o=u.appendElem("a",{cls:"pack-super",title:rs("Zpl.FragCommentSuperT")});o.appendElem("i");f.appendElem("div",{cls:"value xc"});tt.hide();rt(i,!0);n(r).on({mouseenter:ci,mouseleave:li});v.ModeEdit(r)}function wr(n,t){var i=null;return dt(function(r){return r.attrI("data-sort")>n.attrI("data-sort")?(i=r.beforeElem("figure",t),!1):!0}),i==null&&(i=r.appendElem("figure",t)),i}function br(){n(".ctrl a",o).click(function(t){var o=t.currentTarget,i=null,f=null,s,c;o.hasClass("first")?i=r.firstElementChild:o.hasClass("prev")?(f=bt(),f!=null&&(i=f.row.previousElementSibling),i==null&&(i=r.lastElementChild)):o.hasClass("next")?ElemStb(w,r.closest(".ComArea"))?i=r.firstElementChild:(f=bt(),f!=null&&(i=f.shift<60?f.row.nextElementSibling:f.row),i==null&&(i=r.firstElementChild)):o.hasClass("last")&&(i=r.lastElementChild);i!=null&&(s=i.attrI("data-f"),c=n(i),ni(s,function(){var n=h(s);ur();u();nu(i,undefined,{progress:function(){ti(n,c.position().top-e.scrollTop());hr()},complete:function(){u();setTimeout(vt,100)}})}))})}function pi(i){var r,o;if(!i.hasClass("OS")&&(r=i.attrI("data-c"),r!=null)){var f=i.attrI("data-f"),l=ri(r),s=n(l),c=h(f);if(c!=null){o=s.position().top-e.scrollTop()+t.Pad1;ti(c,o<0?0:o);u();return}ni(f,function(){var n=s.position().top-e.scrollTop()+t.Pad1;p(f,n<0?0:n);u()})}}function ni(n,r){ei("CommentContext",{PackId:t.PackId,FragId:n,SliceId:t.SliceId},function(t){t.Status==1&&(i.innerHTML=t.Html,ft(),hi.href=t.DocUrl,hi.textContent=t.DocQuote+" "+t.SliceLabel,typeof r=="function"&&r(n))})}function kr(n,r){ei("FragPrev",{PackId:t.PackId,FragId:n,SliceId:t.SliceId},function(t){t.Status==1&&(i.insertAdjacentHTML("afterbegin",t.Html),vr(),ft(),typeof r=="function"&&r(n))})}function dr(n,r){ei("FragNext",{PackId:t.PackId,FragId:n,SliceId:t.SliceId},function(t){t.Status==1&&(i.insertAdjacentHTML("beforeend",t.Html),ar(),ft(),typeof r=="function"&&r(n))})}function gr(n,t){ii(e,n,t)}function ti(n,t){ii(f,n,t)}function p(n,t){var i=h(n);return ii(f,i,t),i}function ii(t,i,r){i!=null&&(typeof r=="undefined"&&(r=0),t.scrollTop(n(i).position().top-r))}function nu(n,t,i){tu(e,n,t,i)}function tu(t,i,r,u){i!=null&&(typeof r=="undefined"&&(r=0),typeof u=="undefined"&&(u={}),t.animate({scrollTop:n(i).position().top-r},u))}function ft(){eu();ht={};d=null;ut(function(n,t){return n.attr("data-i",t),!0})}function h(n){var t=ht[n];return t==null&&(t=FE("[data-f="+n+"]",i),ht[n]=t),t}function ri(n){var t=st[n];return t==null&&(t=FE("#c"+n,r),st[n]=t),t}function iu(n){return FE("[data-f="+n+"]",r)}function ru(n,i){return s(n,i,t.Pad1)}function uu(n,i){return s(n,i,t.Pad2)}function s(t,i,r){var u=n(t);return fu(u,i,r)}function fu(n,t,i){return typeof i=="undefined"&&(i=0),{shift:n.position().top-t+i,height:n.outerHeight()}}function et(n,t){return ui(n,t,ct)}function wi(n,t){return ui(n,t,g)}function ui(n,t,i){return n<0?n/t:n+t>i?(n+t-i)/t:0}function bi(n){return di(n,k,r,g,t.Pad1)}function ki(n){return di(n,d,i,ct,t.Pad2)}function di(n,t,i,r,u){if(t==null)return 0;typeof u=="undefined"&&(u=0);var e=0,f,o;return gt(i,function(t,i){return(f=s(t,n,u),o=ui(f.shift,f.height,r),o<-1)?(e=i+1,!1):!0},t),e}function eu(){var n=i.firstElementChild,t=i.lastElementChild;n!=null&&(i.toggleClass("Prev",n.attrI("data-f")!=i.attrI("data-first")),i.attr("data-sort1",n.attrI("data-sort")));t!=null&&(i.toggleClass("Next",t.attrI("data-f")!=i.attrI("data-last")),i.attr("data-sort2",t.attrI("data-sort")))}function ou(n,t,r){return n<i.attrI("data-sort1")?{shift:-r-100,height:0}:n>i.attrI("data-sort2")?{shift:t-r+100,height:0}:void 0}function fi(n){return n!=null&&(typeof n.Expanded!="undefined"&&a.param(ToolMan.CommentExp,n.Expanded?1:null),typeof n.Edit!="undefined"&&a.param(ToolMan.CommentEdit,n.Edit?1:null),typeof n.PackId!="undefined"&&(a.param(ToolMan.Comment,n.PackId),a.param(ToolMan.CommentEdit,null),a.param(ToolMan.CommentExp,null))),a.render()}function su(n){return"ta"+n.attrI("data-f")}function ei(n,i,r,u){y=!0;var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,function(n,t){y=!1;r(n,t)},u)}function hu(n){return n.scrollTop()<10}function cu(n,t){return n.scrollTop()+n.height()>t.outerHeight()-10}var o,v,u;if(t=OptEx({HandlerUrl:"/handler/comment.ashx",DocId:null,SliceId:null,PackId:null,Color:null,ColorLight:null,Dark:!1,CanRead:!1,CanWrite:!1,EM:"edit-mode",Pad1:10,Pad2:10,Level:18},t),o=this[0],o!=null){var l=1,lu=n(window),au=n(document),w=FE(".a1",o),e=n(w),gi=FE(".a0",o),c=FE("svg",gi),b=FE("g",c),oi=0,si=FE(".a2",o),f=n(si),vu=FE(".b1",o),nr=FE(".b2",o),hi=FE(".lk",nr),r=FE(".Comments",w),tr=n(r),i=FE(".Frags",si),ot=n(i),st={},k=null,ht={},d=null,g=e.outerHeight(),ct=f.outerHeight(),lt=!1,nt=window.location,a=new Loc(nt.href),tt=FE(".empty-result",w),y=!1,ir=document.documentElement.hasClass("ie"),at=new Super,it=FE(".cradle input",o);it==null||it.disabled||n(it).change(function(){var n=it.checked;nt.href=fi({Edit:n})});v=new commentator({Frags:r,SliceId:t.SliceId,IsFull:!1,View:2,CanRead:t.CanRead,CanWrite:t.CanWrite,Color:t.Color,ColorLight:t.ColorLight,Dark:t.Dark,SaveData:function(n){return{CommentId:n.attrI("data-c"),FragId:n.attrI("data-f"),TargetId:0,DocId:t.DocId,PackId:t.PackId}},AfterSave:function(n,t){t.attrI("data-c")==null&&(t.attr("data-c",n.CommentId),t.id="c"+n.CommentId);var f=t.attrI("data-f"),i=h(f);i.attrI("data-c")==null&&(i.attr("data-c",n.CommentId),rt(i,!0));tt.toggle(!r.hasChildren(),"block");u()},AfterLoad:function(){setTimeout(kt,100)},AfterDel:function(n){var t=h(n.FragId);t.attr("data-c",null);rt(t,!1);tt.toggle(!r.hasChildren(),"block");u()},AfterFocus:function(n){return pi(n)},AfterCancel:function(n){if(tt.toggle(!r.hasChildren(),"block"),u(),n.CommentId==null){var t=h(n.FragId);rt(t,!1)}},EditorId:su});FE(".ExpandAll",o,{onclick:function(){ShowSplash();nt.href=fi({Expanded:1})}});FE(".CollapseAll",o,{onclick:function(){ShowSplash();nt.href=fi({Expanded:null})}});u=ir?function(){setTimeout(kt,0)}:kt;rr()}}}(jQuery),function(n){n.fn.packheader=function(t){function e(n){return n!=null&&typeof n.PackId!="undefined"&&(r.param(ToolMan.Comment,n.PackId),r.param(ToolMan.CommentEdit,null),r.param(ToolMan.CommentExp,null)),r.render()}var i;if(t=OptExtend({HandlerUrl:"/handler/comment.ashx",PackId:null,View:2},t),i=this[0],i!=null){var f=new Super,u=window.location,r=new Loc(u.href);n(".pack-super",i).click(function(n){var i=n.currentTarget;f.Run("SuperPack",{PackId:t.PackId,View:t.View},i)});n(".pack-change select",i).change(function(n){var t=n.currentTarget,i=ToInt(t.value);u.href=e({PackId:i})})}}}(jQuery),function(n){n.fn.packname=function(t){function o(){t.CanName&&s()}function s(){n(i).on({click:h,dblclick:c});n(document).on({keyup:a,keydown:l})}function h(n){var t=n.target;if(t.closestElem(".edit",i)){u();return}if(t.closestElem(".save",i)){f();return}if(t.closestElem(".cancel",i)){e();return}}function c(n){var r=n.target;i.hasClass(t.EM)||(u(),EventKill(n))}function l(n){!(n.ctrlKey||n.metaKey)||n.shiftKey||n.altKey||(n.keyCode==83||n.keyCode==115)&&(i.hasClass(t.EM)&&f(),EventKill(n))}function a(n){n.keyCode==27&&i.hasClass(t.EM)&&e()}function r(r,u){var e=FE(".value",i),f,o;e&&(f=FE("input",i),f||(o=e.beforeElem("div",{cls:"editor"}),f=o.appendElem("input",{type:"text"})),i.toggleClass(t.EM,u),u?(r&&n(f).val(n(e).text()),clearDocumentSelection(),f.focus()):r&&n(e).text(n(f).val()))}function u(){r(!0,!0)}function f(){var f=FE("input",i),u;f&&(u=n.trim(n(f).val()),u?v("PackNameSave",{PackId:t.PackId,Value:u},function(n){n.Status==1&&r(!0,!1)}):alert(rs("Zpl.PackCantBeEmpty")))}function e(){r(!1,!1)}function v(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}t=OptExtend({HandlerUrl:"/handler/comment.ashx",PackId:null,CanName:!1,EM:"edit-mode"},t);var i=this[0];i!=null&&o()}}(jQuery),function(n){n.fn.packnote=function(n){function r(t,i){u("PackNoteSave",{PackId:n.PackId,Value:t},i)}function u(t,i,r,u){var f=n.HandlerUrl+"?Cmd="+t;AjaxForm(f,i,r,u)}var t,i;(n=OptExtend({HandlerUrl:"/handler/comment.ashx",PackId:null},n),t=this[0],t!==null)&&(i=new notator({Id:"ta"+n.PackId,Root:t,Save:r,EmptyMsg:rs("Zpl.NoteEmpty")}),i.Attach())}}(jQuery),function(n){n.fn.packcolor=function(t){function e(){o();n(r).colorpicker({OnSave:function(n){f(n,!0)}})}function o(){n(i).click(s)}function s(n){var u=n.target,t=u.closestElem("li",i),r;t&&(r=t.attr("data-c"),f(r,!1))}function f(f,e){h("PackColorSave",{PackId:t.PackId,Color:f},function(o){if(o.Status!=1){alert("Chyba při ukládání barvy!");return}if(n("."+t.AC,i).removeClass(t.AC),e)r.addClass("active");else{var s=FE("li[data-c="+f+"]",u);s!=null&&s.addClass(t.AC)}})}function h(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;AjaxForm(f,i,r,u)}var i,u,r;(t=OptExtend({HandlerUrl:"/handler/comment.ashx",PackId:null,AC:"active"},t),i=this[0],i!=null)&&(u=FE("ul",i),r=FE("a.custom",i),e())}}(jQuery),function(n){n.fn.colorpicker=function(t){function ti(){p.on("click",ci)}function a(n){var t=dt(n);nt.value=t.r;tt.value=t.g;it.value=t.b}function rt(n){h.value=Math.round(n.h);c.value=Math.round(n.s);l.value=Math.round(n.b)}function v(n){ct.value=f(n)}function ii(n){ot(b,f({h:n.h,s:100,b:100}));g.css({left:px(Math.floor(t.height*n.s/100)),top:px(Math.floor(t.height*(100-n.b)/100))})}function ri(n){w.css({top:px(Math.floor(t.height-t.height*n.h/360))})}function lt(n){ot(st,f(n))}function ui(n){ot(ht,f(n))}function fi(){i=ft(vi(this.value));a(i);rt(i);y(i);t.OnChange(f(i))}function o(){i=li({h:ToInt(h.value),s:ToInt(c.value),b:ToInt(l.value)});a(i);v(i);y(i);t.OnChange(f(i))}function ut(){i=kt(ai({r:ToInt(nt.value),g:ToInt(tt.value),b:ToInt(it.value)}));rt(i);v(i);y(i);t.OnChange(f(i))}function ei(n){a(n);rt(n);v(n);y(n)}function y(n){ii(n);ri(n);ui(n)}function at(){gt(this,!1)}function vt(){n(".field.foc",e).removeClass(".foc");gt(this,!0);SelectMe(this)}function oi(i){var r,u;EventKill(i);r={y:n(this).offset().top};n(document).on("mouseup touchend",r,pt);n(document).on("mousemove touchmove",r,yt);return u=i.type=="touchstart"?i.originalEvent.changedTouches[0].pageY:i.pageY,h.value=Math.floor(360*(t.height-(u-r.y))/t.height),o(),!1}function yt(n){var i=n.type=="touchmove"?n.originalEvent.changedTouches[0].pageY:n.pageY;return h.value=Math.floor(360*(t.height-u(i-n.data.y,t.height))/t.height),o(),!1}function pt(){return a(i),v(i),n(document).off("mouseup touchend",pt),n(document).off("mousemove touchmove",yt),!1}function si(i){var r,u,f;EventKill(i);r={pos:n(this).offset()};n(document).on("mouseup touchend",r,bt);n(document).on("mousemove touchmove",r,wt);return i.type=="touchstart"?(u=i.originalEvent.changedTouches[0].pageX,f=i.originalEvent.changedTouches[0].pageY):(u=i.pageX,f=i.pageY),c.value=Math.floor(100*(u-r.pos.left)/t.height),l.value=Math.floor(100*(t.height-(f-r.pos.top))/t.height),o(),!1}function wt(n){var i,r;return n.type=="touchmove"?(i=n.originalEvent.changedTouches[0].pageX,r=n.originalEvent.changedTouches[0].pageY):(i=n.pageX,r=n.pageY),c.value=Math.floor(100*u(i-n.data.pos.left,t.height)/t.height),l.value=Math.floor(100*(t.height-u(r-n.data.pos.top,t.height))/t.height),o(),!1}function bt(){return a(i),v(i),n(document).off("mouseup touchend",bt),n(document).off("mousemove touchmove",wt),!1}function hi(){lt(i);var n=f(i);di(n);k();t.OnSave(n)}function ci(t){r==null&&pi();i=ft(ni());ei(i);lt(i);var u=p.offset();r.css({top:px(u.top-d.outerHeight()/2+p.outerHeight()/2),left:px(u.left+p.outerWidth()+10)});r.show("block");n("html").mousedown(k);d.mousedown(function(n){n.stopPropagation()});EventKill(t)}function k(){r.hide();n("html").off("mousedown",k)}function li(n){return{h:u(n.h,360),s:u(n.s,100),b:u(n.b,100)}}function ai(n){return{r:u(n.r),g:u(n.g),b:u(n.b)}}function vi(n){var i=6-n.length,r,t,u,f;if(i==3){for(r=[],t=0;t<i;t++)r.push(n[t]),r.push(n[t]);n=r.join("")}else if(i>0){for(u=[],f=0;f<i;f++)u.push("0");u.push(n);n=u.join("")}return n}function yi(){i=ft(ni());y(i)}function pi(){var e,p,rt,f,u,t,ft,i,a,v,y,et;r=document.body.appendElem("div",{cls:"color_picker"});e=r.appendElem("div",{cls:"head"});e.appendElem("div",{cls:"close",onclick:k});e.appendElem("div",{cls:"caption",txt:rs("Zpl.CpCaption")});b=r.appendElem("div",{cls:"color"});p=b.appendElem("div",{cls:"color_overlay1"});rt=p.appendElem("div",{cls:"color_overlay2"});g=rt.appendElem("div",{cls:"selector_outer"});g.appendElem("div",{cls:"selector_inner"});n(b).on("mousedown touchstart",si);f=r.appendElem("div",{cls:"hue_bar"});w=f.appendElem("div",{cls:"hue"});w.appendElem("div",{cls:"larr"});w.appendElem("div",{cls:"rarr"});n(f).on("mousedown touchstart",oi);if(u=["#ff0000","#ff0080","#ff00ff","#8000ff","#0000ff","#0080ff","#00ffff","#00ff80","#00ff00","#80ff00","#ffff00","#ff8000","#ff0000"],wi())for(t=0;t<=11;t++)ft=n("<div><\/div>").attr("style","height:8.333333%; filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr="+u[t]+", endColorstr="+u[t+1]+'); -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='+u[t]+", endColorstr="+u[t+1]+')";'),f.appendElem(ft);else i=u.join(","),f.attr("style","background:-webkit-linear-gradient(top,"+i+"); background: -o-linear-gradient(top,"+i+"); background: -ms-linear-gradient(top,"+i+"); background:-moz-linear-gradient(top,"+i+"); -webkit-linear-gradient(top,"+i+"); background:linear-gradient(to bottom,"+i+"); ");a=r.appendElem("div",{cls:"preview new"});a.appendElem("label",{txt:rs("Zpl.CpNewColor")});ht=a.appendElem("span");v=r.appendElem("div",{cls:"preview old",onclick:yi});v.appendElem("label",{txt:rs("Zpl.CpOldColor")});st=v.appendElem("span");y=r.appendElem("div",{cls:"field hex"});y.appendElem("div",{cls:"letter",txt:"#"});ct=y.appendElem("input",{type:"text",maxlength:"6",size:"6",onchange:fi,onblur:at,onfocus:vt});nt=s(r,"rgb0","R",ut,255);tt=s(r,"rgb1","G",ut,255);it=s(r,"rgb2","B",ut,255);h=s(r,"hsb0","H",o,360);c=s(r,"hsb1","S",o,100);l=s(r,"hsb2","V",o,100);et=r.appendElem("div",{cls:"submit",onclick:hi});et.appendElem("span",{txt:rs("Zpl.CpSubmit")});d=n(r)}function s(n,t,i,r,u){var f=n.appendElem("div",{cls:t+" field"});return f.appendElem("div",{cls:"letter",txt:i}),f.appendElem("input",{type:"number",min:0,step:1,max:u,maxlength:"3",size:"3",onchange:r,onblur:at,onfocus:vt})}function wi(){var t=navigator.userAgent.toLowerCase(),n=navigator.appName==="Microsoft Internet Explorer",i=n?ToFloat(t.match(/msie ([0-9]*[\.0-9]+)/)[1]):0;return n&&i<10}function bi(n){return n=parseInt(n.indexOf("#")>-1?n.substring(1):n,16),{r:n>>16,g:(n&65280)>>8,b:n&255}}function ft(n){return kt(bi(n))}function kt(n){var t={h:0,s:0,b:0},u=Math.min(n.r,n.g,n.b),i=Math.max(n.r,n.g,n.b),r=i-u;return t.b=i,t.s=i!=0?255*r/i:0,t.h=t.s!=0?n.r==i?(n.g-n.b)/r:n.g==i?2+(n.b-n.r)/r:4+(n.r-n.g)/r:-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}function dt(n){var t={},u=n.h,o=n.s*255/100,e=n.b*255/100;if(o==0)t.r=t.g=t.b=e;else{var i=e,r=(255-o)*e/255,f=(i-r)*(u%60)/60;u==360&&(u=0);u<60?(t.r=i,t.b=r,t.g=r+f):u<120?(t.g=i,t.b=r,t.r=i-f):u<180?(t.g=i,t.r=r,t.b=r+f):u<240?(t.b=i,t.r=r,t.g=i-f):u<300?(t.b=i,t.g=r,t.r=r+f):u<360?(t.r=i,t.g=r,t.b=i-f):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function ki(n){return(""+et(n.r)+et(n.g)+et(n.b)).toUpperCase()}function f(n){return ki(dt(n))}function et(n){var t=n.toString(16);return t.length==1?"0"+t:t}function u(n,t){return typeof t=="undefined"&&(t=255),n<0&&(n=0),n>t&&(n=t),n}function ot(n,t){n.style.backgroundColor=t?"#"+t:""}function gt(n,t){var i=n.closest(".field");i!=null&&i.toggleClass("foc",t)}function ni(){return e!=null?e.attr("data-c"):null}function di(n){e!=null&&(e.attr("data-c",n),FE("span",e,{style:{backgroundColor:"#"+n}}))}t=OptExtend({OnSave:function(){},OnChange:function(){},height:156},t);var e=this[0],p=n(e),r=null,d=null,st=null,ht=null,w=null,b=null,g=null,ct=null,nt=null,tt=null,it=null,h=null,c=null,l=null,i=null;ti()}}(jQuery),function(n){n.fn.sharelinks=function(t){function f(){n(".link-table button",i).click(e);n("input",i).focus(r);new ClipboardJS(".ZC")}function r(){SelectMe(this)}function e(){var n=this.closestElem("table.link-table",i),e,f;if(n)if(e=n.attr("data-t"),f=n.attrI("data-p"),e)u("LinkDelete",{PackId:t.PackId,Perm:f},function(r){var u,e,o;r.Status==1&&(n.attr("data-t",null),u=FE(".c1",n),u.empty(),u.appendElem("span",{txt:f==1?rs("Zpl.LinkForReadText"):rs("Zpl.LinkForWriteText")}),e=FE("button",n,{txt:rs("Zpl.LinkAdd")}),e==null||i.hasClass(t.Spread)||e.attr("disabled","disabled"),o=FE(".ZC",n),o!=null&&o.hide())});else{if(!i.hasClass(t.Spread))return;u("LinkAdd",{PackId:t.PackId,Perm:f},function(u){var f,e,o;u.Status==1&&u.Result==0&&(n.attr("data-t",u.Ticket),f=FE(".c1",n),f.empty(),f.appendElem("input",{type:"text",attr:{readonly:"readonly"},value:u.Url,onfocus:r}),e=FE("button",n,{txt:rs("Zpl.LinkDelete")}),e==null||i.hasClass(t.Spread)||e.attr("disabled","disabled"),o=FE(".ZC",n),o!=null&&o.show())})}}function u(n,i,r,u){var f=t.HandlerUrl+"?Cmd="+n;return AjaxForm(f,i,r,u)}t=OptExtend({HandlerUrl:"/handler/comment.ashx",PackId:null,Spread:"CanSpread"},t);var i=this[0];i!=null&&f()}}(jQuery),function(n){n.fn.sharepeople=function(t){function p(){u.on({keypress:w,keydown:b,focus:k,blur:d,paste:g});n(r).click(function(){o.focus()})}function w(n){switch(n.which){case 13:f();u.focus();EventKill(n);break;default:setTimeout(function(){f(1);u.focus()},50)}}function b(n){if(n.which==8){var t=e();setTimeout(function(){if(t.length==0||t==e()){var n=o.previousElementSibling;n!=null&&h(n)}},50)}}function k(){r.addClass("focus")}function d(){r.removeClass("focus");f()}function g(){setTimeout(f,100);u.focus()}function nt(){f();var n=ft();n!=null&&n.length!=0&&(l.value=n,__doPostBack(t.Target,"SHARE"))}function f(n){var u=e(),t,f,r,i;if(u&&(typeof n=="undefined"&&(n=0),t=u.split(v),t!=null&&!(t.length<n+1)))for(f=t.length-n,r=0;r<f;r++)i=t[r],i!=null&&i.length>0&&(tt(i),rt(i)),ut(),s()}function tt(n){var t=o.beforeElem("a",{cls:a.test(n)?"valid":"bad",onclick:it});t.appendElem("i");t.appendElem("span",{txt:n});t.appendElem("s")}function h(n){n.remove();s()}function it(){h(this)}function rt(n){var t=e();t.indexOf(n)==0&&(t=t.substr(n.length),c(t))}function ut(){var n=e();n=n.replace(y,"");c(n)}function s(){}function ft(){var u=n.find("a",r),f,t,e,i;if(u!=null){for(t="",e=u.length,i=0;i<e;i++)f=u[i],t.length>0&&(t+=";"),t+=f.textContent;return t}}function e(){return u.val()}function c(n){u.val(n)}var i;if(t=OptExtend({Target:null,PackId:null},t),i=this[0],i!=null){var r=FE(".box",i),o=FE("textarea",r),u=n(o),et=n(".msg textarea",i),ot=n("select",i),l=FE("input[name='data']",i);FE("button",i,{onclick:nt});var a=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,v=/[;,\s]+/,y=/^[;,\s]+/;p()}}}(jQuery),function(n){n.fn.shareadopted=function(t){function f(){u!=null&&(r.each(function(){this.oldValue=n(this).val()}),r.change(function(){u.toggle(e())}))}function e(){var t=!1;return r.each(function(){if(this.oldValue!=n(this).val()){t=!0;return}}),t}var i,u,r;(t=OptExtend({PackId:null},t),i=this[0],i!=null)&&(u=FE(".info",i),r=n("select",i),f())}}(jQuery);var TinyWrapper=function(){function n(n){this.opt=null;this.badStyles=null;this.opt=OptEx({save:null,cancel:null,focus:null,load:null,saveall:null,cancelall:null},n);this.badStyles=["lineHeight","fontSize"]}return n.prototype.append=function(n,t){var i=this,r=new tinymce.Editor(n.id,{language:"cs",content_css:"/css/tinymce.css",content_style:"body { background-color: #"+(n.color||"fff")+"; }",body_class:n.dark?"white":"",menubar:!1,toolbar_items_size:"medium",skin:"zpl",table_toolbar:!1,plugins:"advlist link autoresize atom_html colorpicker textcolor",toolbar:"bold italic underline strikethrough | bullist numlist outdent indent | subscript superscript | forecolor backcolor | link unlink | my_save my_cancel",resize:!1,autoresize_min_height:50,autoresize_max_height:400,autoresize_bottom_margin:0,entity_encoding:"named",relative_urls:!1,entities:"160,nbsp,38,amp,60,lt,62,gt,34,quot",paste_webkit_styles:"text-decoration,line-through,list-style-type",inline:!1,paste_data_images:!1,paste_convert_word_fake_lists:!1,statusbar:!1,auto_focus:!0,default_link_target:"_blank",valid_elements:"a[href|target|style|title],strong/b,em/i,ul[style],ol[style],li,u,s,sub,sup,p[style],span[style],br",valid_styles:{span:"text-decoration,line-through,color,background-color",ol:"list-style-type",ul:"list-style-type",p:"padding-left"},advlist_number_styles:"default,lower-alpha,upper-alpha,lower-roman,upper-roman,lower-greek",cache_suffix:"v="+document.body.attr("data-v"),init_instance_callback:function(r){var u,f;i.opt.load!=null&&i.opt.load(t,r);u=r.getContainer();n.colorLight!=null&&u!=null&&(f=FE("> .mce-container-body > .mce-toolbar-grp.mce-panel",u),f!=null&&(f.style.backgroundColor="#"+n.colorLight))},setup:function(n){i.opt.save!=null&&n.addButton("my_save",{text:rs("Zpl.FragCommentSave"),title:rs("Zpl.FragCommentSaveT"),subtype:"primary",icon:"save",onclick:function(){i.opt.save(t,n)}});i.opt.cancel!=null&&n.addButton("my_cancel",{text:rs("Zpl.FragCommentCancel"),title:rs("Zpl.FragCommentCancelT"),icon:!1,onclick:function(){i.opt.cancel(t,n)}});n.addShortcut("ctrl+shift+k","Remove link","unlink");n.on("keydown",function(t){if((t.keyCode==189||t.keyCode==173)&&(t.ctrlKey||t.metaKey)){n.execCommand("Strikethrough",!1,null);EventKill(t);return}if(t.keyCode==115&&!(t.ctrlKey||t.metaKey)&&!t.altKey&&!t.shiftKey){n.execCommand("atom_html",!1,null);EventKill(t);return}if(t.keyCode==187&&(t.ctrlKey||t.metaKey)&&!t.altKey&&!t.shiftKey){n.execCommand("Subscript",!1,null);EventKill(t);return}if(t.keyCode==187&&(t.ctrlKey||t.metaKey)&&!t.altKey&&t.shiftKey){n.execCommand("Superscript",!1,null);EventKill(t);return}if(i.opt.saveall!=null&&(t.keyCode==83||t.keyCode==115)&&(t.ctrlKey||t.metaKey)){i.opt.saveall();EventKill(t);return}if(i.opt.cancelall!=null&&t.keyCode==27){i.opt.cancelall();EventKill(t);return}});if(i.opt.focus!=null)n.on("focus",function(){i.opt.focus(t)});n.on("change",function(){i.fixRedundandSpans(n)});n.on("ExecCommand",function(t){switch(t.command){case"InsertUnorderedList":case"InsertOrderedList":tinymce.Env.webkit&&i.fixRedundandSpans(n)}})}},tinymce.EditorManager);r.render()},n.prototype.remove=function(n){tinymce.remove("#"+n)},n.prototype.save=function(){tinymce.triggerSave()},n.prototype.fixRedundandSpans=function(n){var t=n.getBody();t&&this.fixSizeSpans(t)},n.prototype.fixSizeSpans=function(n){for(var t,i=0;i<n.children.length;){if(t=n.children[i],t.tagName=="SPAN"&&this.isEmpty(t.className)&&this.isEmpty(t.title)&&this.isEmpty(t.id)&&(this.isEmpty(t.getAttribute("style"))||this.containsStyle(t,this.badStyles)==t.style.length)){this.unwrapInner(t);continue}this.containsStyle(t,this.badStyles)>0&&this.cleanStyles(t,this.badStyles);this.fixSizeSpans(t);i++}},n.prototype.containsStyle=function(n,t){for(var u,r=0,f=t.length,i=0;i<f;i++)u=t[i],(n.style[u]||"").length>0&&r++;return r},n.prototype.cleanStyles=function(n,t){for(var r,u=t.length,i=0;i<u;i++)r=t[i],n.style[r]=""},n.prototype.unwrapInner=function(n){while(n.hasChildNodes())n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)},n.prototype.isEmpty=function(n){return!n},n}(),commentator=function(){function n(n){this._Opt=null;this._Frags=null;this._TW=null;this._Sman=null;this._Opt=OptEx({HandlerUrl:"/handler/comment.ashx",Frags:null,IsFull:!1,SliceId:null,View:1,CanRead:!1,CanWrite:!1,Color:null,ColorLight:null,Dark:!1,CM:"figure",EM:"edit-mode",VAL:".value",SaveData:null,AfterSave:null,AfterLoad:null,AfterDel:null,AfterFocus:null,AfterCancel:null,EditorId:null},n);this._Frags=n.Frags;this._TW=null;this._Sman=new Super}return n.prototype.Init=function(){var n=this;this._Frags!=null&&(this._TW=new TinyWrapper({save:function(t){return n.Save(t)},saveall:function(){return n.SaveAll()},cancel:function(t){return n.Cancel(t)},cancelall:function(){return n.CancelAll()},focus:function(t){n._Opt.AfterFocus&&n._Opt.AfterFocus(t)},load:function(t,i){return n.LoadWithEditor(t,i)}}))},n.prototype.Attach=function(n){var i=this,t,r;if(this._Frags!=null)if(t=$(this._Frags),r=$(document),n){t.on("click",function(n){return i.Click(n)});if(this._Opt.CanWrite){t.on("dblclick",function(n){return i.DblClick(n)});r.on({keyup:function(n){return i.Document_KeyUp(n)},keydown:function(n){return i.Document_KeyDown(n)}})}}else t.off("click"),this._Opt.CanWrite&&(t.off("dblclick"),r.off("keyup"),r.off("keydown"))},n.prototype.Click=function(n){var i=n.target,t=i.closestElem(this._Opt.CM,this._Frags),r;if(t){if(this._Opt.CanRead){if(i.closestElem(".more",t)){this.Load(t,!1);EventKill(n);return}if(i.closestElem(".less",t)){this.Load(t,!0);EventKill(n);return}}if(this._Opt.CanWrite){if(i.closestElem(".edit",t)){this.ModeEdit(t);return}if(i.closestElem(".delete",t)){this.Delete(t);return}}if(r=i.closestElem(".pack-super",t),r!=null){this._Sman.Run("SuperComment",{CommentId:t.attrI("data-c"),IsFull:this._Opt.IsFull,SliceId:this._Opt.SliceId,View:this._Opt.View},r);return}}},n.prototype.DblClick=function(n){var i=n.target,t=i.closestElem(this._Opt.CM,this._Frags);if(t){if(i.closestElem("a",t)!=null){EventKill(n);return}t.hasClass(this._Opt.EM)||(this.ModeEdit(t),EventKill(n))}},n.prototype.Document_KeyUp=function(n){n.keyCode==27&&this.CancelAll()},n.prototype.Document_KeyDown=function(n){!(n.ctrlKey||n.metaKey)||n.shiftKey||n.altKey||(n.keyCode==83||n.keyCode==115)&&(this.SaveAll(),EventKill(n))},n.prototype.Focus=function(n,t){if(t==null){var i=this._Opt.EditorId(n);t=tinymce.get(i)}t!=null&&t.focus()},n.prototype.Load=function(n,t){this.LoadValue(n,t,function(i){var r=FE(".value",n);r!=null&&(r.innerHTML=i.Html||"",t?r.appendElem("a",{cls:"more",txt:rs("Zpl.BuzzMore")}):r.appendElem("a",{cls:"less",txt:rs("Zpl.BuzzLess")}))})},n.prototype.LoadWithEditor=function(n,t){n.hasClass("baby")&&setTimeout(function(){n.removeClass("baby")},100);this.LoadValue(n,!1,function(n){t.setContent(n.Html||"")})},n.prototype.LoadValue=function(n,t,i){var r=this,u=n.attrI("data-c");u!=null?this._AjaxForm("CommentLoad",{CommentId:u,Cut:t},function(t){t.Status==1&&(i(t),typeof r._Opt.AfterLoad=="function"&&r._Opt.AfterLoad(t,n))}):typeof this._Opt.AfterLoad=="function"&&this._Opt.AfterLoad({},n)},n.prototype.SaveAll=function(){var n=$.find(this._Opt.CM+"."+this._Opt.EM,this._Frags),i,t;if(n!=null&&n.length!=0)for(i=n.length,t=0;t<i;t++)this.Save(n[t])},n.prototype.Save=function(n){var t=this,r=FE("textarea",n),i;r&&(this._TW.save(),i=this._Opt.SaveData(n)||{CommentId:null,FragId:null},i.Value=$.trim($(r).val()),this._AjaxForm("CommentSave",i,function(i){i.Status==1&&(t.ModeView(n,i.Html),typeof t._Opt.AfterSave=="function"&&t._Opt.AfterSave(i,n))}))},n.prototype.CancelAll=function(){var n=$.find(this._Opt.CM+"."+this._Opt.EM,this._Frags),i,t;if(n!=null&&n.length!=0)for(i=n.length,t=0;t<i;t++)this.Cancel(n[t])},n.prototype.Cancel=function(n){var i=n.attrI("data-f"),t=n.attrI("data-c");t==null?n.remove():this.ModeView(n);typeof this._Opt.AfterCancel=="function"&&this._Opt.AfterCancel({FragId:i,CommentId:t})},n.prototype.Delete=function(n){var i=this,r=FE(this._Opt.VAL,n),u=rs("Zpl.DelCommentConfirm")+"\n"+TextLeft2(r.textContent,20),t;confirm(u)&&(t=n.attrI("data-c"),t==null?this.DelResult(n):this._AjaxForm("CommentDelete",{CommentId:t},function(t){t.Status==1&&i.DelResult(n)}))},n.prototype.DelResult=function(n){var t={CommentId:n.attrI("data-c"),FragId:n.attrI("data-f")};n.remove();typeof this._Opt.AfterDel=="function"&&this._Opt.AfterDel(t)},n.prototype.ModeEdit=function(n){var r=FE(this._Opt.VAL,n),t,i,u;r&&(n.addClass(this._Opt.EM),clearDocumentSelection(),t=this._Opt.EditorId(n),i=FE("textarea",n),i||(u=r.beforeElem("div",{cls:"editor"}),i=u.appendElem("textarea",{id:t})),this._TW.append({id:t,color:this._Opt.Color,dark:this._Opt.Dark,colorLight:this._Opt.ColorLight},n))},n.prototype.ModeView=function(n,t){var i=FE(this._Opt.VAL,n),r;i&&(n.removeClass(this._Opt.EM),r=this._Opt.EditorId(n),this._TW.remove(r),typeof t!="undefined"&&(i.innerHTML=t))},n.prototype._AjaxForm=function(n,t,i,r){var u=this._Opt.HandlerUrl+"?Cmd="+n;return AjaxForm(u,t,i,r)},n}(),notator=function(){function n(n){var t=this;this.opt=null;this.tw=null;this.root=null;this.opt=OptEx({Id:null,Root:null,EM:"edit-mode",Save:null,After:null,EmptyMsg:null},n);this.tw=new TinyWrapper({save:function(){return t.SaveValue()},saveall:function(){return t.SaveValue()},cancel:function(){return t.CancelValue()},cancelall:function(){return t.CancelValue()},focus:null,load:null});this.root=this.opt.Root}return n.prototype.Attach=function(){var n=this;$(this.root).on({click:function(t){return n.Root_Click(t)},dblclick:function(t){return n.Root_DblClick(t)}});$(document.body).on({keyup:function(t){return n.Document_KeyUp(t)},keydown:function(t){return n.Document_KeyDown(t)}})},n.prototype.Root_Click=function(n){var t=n.target;if(t.closestElem(".edit",this.root)){this.EditValue();return}},n.prototype.Root_DblClick=function(n){this.root.hasClass(this.opt.EM)||(this.EditValue(),EventKill(n))},n.prototype.Document_KeyDown=function(n){!(n.ctrlKey||n.metaKey)||n.shiftKey||n.altKey||(n.keyCode===83||n.keyCode===115)&&(this.root.hasClass(this.opt.EM)&&this.SaveValue(),EventKill(n))},n.prototype.Document_KeyUp=function(n){n.keyCode===27&&this.root.hasClass(this.opt.EM)&&this.CancelValue()},n.prototype.ModeValue=function(n,t){var i=FE(".value",this.root),r,u,f;i&&(clearDocumentSelection(),r=FE("textarea",this.root),r||(u=i.beforeElem("div",{cls:"editor"}),r=u.appendElem("textarea",{id:this.opt.Id})),this.root.toggleClass(this.opt.EM,t),t?(n&&(this.RemoveEmptyText(i),$(r).val($(i).html())),this.tw.append({id:this.opt.Id},null)):(n&&(f=this.GetTextareaValue(r),$(i).html(f)),this.AddEmptyText(i),this.tw.remove(this.opt.Id),this.After()))},n.prototype.EditValue=function(){this.ModeValue(!0,!0)},n.prototype.SaveValue=function(){var i=this,n=FE("textarea",this.root),t;n&&(this.tw.save(),t=this.GetTextareaValue(n),this.opt.Save!==null&&this.opt.Save(t,function(n){n.Status===1&&i.ModeValue(!0,!1)}))},n.prototype.CancelValue=function(){this.ModeValue(!1,!1)},n.prototype.SetValue=function(n){n===void 0&&(n=null);var t=FE(".value",this.root);t&&($(t).html(n),this.AddEmptyText(t))},n.prototype.GetTextareaValue=function(n){return $.trim($(n).val())},n.prototype.RemoveEmptyText=function(n){$("span.empty",n).remove()},n.prototype.AddEmptyText=function(n){n.childNodes.length===0&&n.appendElem("span",{cls:"empty",txt:this.opt.EmptyMsg})},n.prototype.After=function(){var n,t;this.opt.After!=null&&(n=FE(".value",this.root),n!==null&&(t=n.cloneNode(!0),this.RemoveEmptyText(t),this.opt.After(t.innerHTML)))},n}();(function(n){n.fn.popularhome=function(t){var i,r;(t=OptExtend({HC:"Off",ResOn:"Zpl.PopularOn",ResOff:"Zpl.PopularOff",CookieName:null},t),i=this[0],i)&&(r=FE(".Handle a",i),r!=null&&n(r).click(function(){var u=!i.toggleClass(t.HC);r.textContent=rs(u?t.ResOn:t.ResOff);n.cookie(t.CookieName,u)}))}})(jQuery);Banner=function(){function n(n,t){t===void 0&&(t=null);this.data=null;this.handler=null;this.$win=null;this.tm=null;this.dim=null;this.pw=null;this.data=n;this.handler="/handler/banner2.ashx";this.$win=$(window);this.tm=new Timer(1e3);this.dim=30;this.pw=970;t==null&&(t=100);this.Init(t)}return n.prototype.Init=function(n){var t=this;setTimeout(function(){t.Load()},n)},n.prototype.Load=function(){var n=this;this._AjaxForm("Load",this.data,function(t){if(t.Status==1)switch(t.Cls){case"Bubble":n.CreateBubble(t);break;case"GuideBottom":n.CreateGuide(t);break;case"GuideRight":n.CreateGuide(t);break;case"GuideLeft":n.CreateGuide(t)}})},n.prototype.CreateBubble=function(n){var i=this,r=$(n.Element),t;if(r.length!=0){t=document.body.appendElem("div",{cls:"Banner2",style:{backgroundColor:n.Bg}});t.addClass(n.Cls);n.White&&t.addClass("White");n.Width>0&&(t.style.width=px(n.Width));t.appendElem("a",{cls:"Close",onclick:function(){i._AjaxForm("Close",{BannerId:n.BannerId,ItemId:i.data.ItemId});t.remove()}});t.appendElem("div",{cls:"Body",html:n.Content});t.arrow=t.appendElem("div",{cls:"arrow"});this.InjectItemId(t,this.data.ItemId);t.BannerId=n.BannerId;t.Readed=!1;t.Shake=!1;t.Bg=n.Bg;this.$win.on({scroll:function(){i.PosBubble(r,t)},resize:function(){i.PosBubble(r,t)}});this.PosBubble(r,t)}},n.prototype.PosBubble=function(n,t){var h=this,f=n.offset(),e=$(t),r=f.left-this.$win.width()/2+this.pw/2+n.width()/2>this.pw*.66,o,i,s,u,c;t.toggleClass("W",r);t.toggleClass("E",!r);o=["transparent",t.Bg,t.Bg,"transparent"];r||this.TurnCircle(o,2);t.arrow.style.borderColor=o.join(" ");i=f.top-this.$win.scrollTop()+n.outerHeight()/2;s=e.outerHeight();s<150?i-=s/2:i<60?(i-=30,t.arrow.style.top=px(30)):(i-=50,t.arrow.style.top=px(50));u=f.left;r?u-=e.outerWidth()+this.dim:u+=n.width()+this.dim;t.css({top:px(i),left:px(u)});this.tm.clear();c=FE(".pg-top")!=null?15:0;c<i&&i<this.$win.height()-100&&(t.Shake||(this.BubbleAnim(r,e),t.Shake=!0),t.Readed||this.tm.run(function(){h._AjaxForm("Read",{BannerId:t.BannerId,ItemId:h.data.ItemId});t.Readed=!0}))},n.prototype.BubbleAnim=function(n,t){var i=["-","+","-","+","-","+"],r,u;n||this.TurnCircle(i);r="=20px";u=100;t.animate({left:i[0]+r},u).animate({left:i[1]+r},u).animate({left:i[2]+r},u).animate({left:i[3]+r},u).animate({left:i[4]+r},u).animate({left:i[5]+r},u)},n.prototype.CreateGuide=function(n){var i=this,t=document.body.appendElem("div",{cls:"Banner2"});t.addClass(n.Cls);n.Cls==="GuideBottom"&&(t.style.bottom=px(-100));n.White&&t.addClass("White");t.appendElem("a",{cls:"Close",onclick:function(){i._AjaxForm("Close",{BannerId:n.BannerId,ItemId:i.data.ItemId});t.remove()}});t.appendElem("div",{cls:"Body",html:n.Content});t.style.backgroundColor=n.Bg;this.InjectItemId(t,this.data.ItemId);$(t).animate(n.Cls==="GuideBottom"?{bottom:0}:n.Cls==="GuideRight"?{right:0}:{left:0},1e3,function(){i.tm.run(function(){i._AjaxForm("Read",{BannerId:n.BannerId,ItemId:i.data.ItemId})})})},n.prototype.CreateGuideRight=function(n){var i=this,t=document.body.appendElem("div",{cls:"Banner2"});t.addClass(n.Cls);n.White&&t.addClass("White");t.appendElem("a",{cls:"Close",onclick:function(){i._AjaxForm("Close",{BannerId:n.BannerId,ItemId:i.data.ItemId});t.remove()}});t.appendElem("div",{cls:"Body",html:n.Content});t.style.backgroundColor=n.Bg;this.InjectItemId(t,this.data.ItemId);$(t).animate({right:0},1500,function(){i.tm.run(function(){i._AjaxForm("Read",{BannerId:n.BannerId,ItemId:i.data.ItemId})})})},n.prototype.CreateGuideLeft=function(n){var i=this,t=document.body.appendElem("div",{cls:"Banner2"});t.addClass(n.Cls);n.White&&t.addClass("White");t.appendElem("a",{cls:"Close",onclick:function(){i._AjaxForm("Close",{BannerId:n.BannerId,ItemId:i.data.ItemId});t.remove()}});t.appendElem("div",{cls:"Body",html:n.Content});t.style.backgroundColor=n.Bg;this.InjectItemId(t,this.data.ItemId);$(t).animate({left:0},1e3,function(){i.tm.run(function(){i._AjaxForm("Read",{BannerId:n.BannerId,ItemId:i.data.ItemId})})})},n.prototype.InjectItemId=function(n,t){$(".Body a",n).each(function(n,i){var r=new Loc(i.attr("href"));r.param("ItemId",t);i.attr("href",r.render())})},n.prototype.TurnCircle=function(n,t){var r,i;for(typeof t=="undefined"&&(t=1),i=0;i<t;i++)r=n.shift(),n.push(r)},n.prototype._AjaxForm=function(n,t,i){return AjaxForm(this.handler+"?Cmd="+n,t,i)},n}();MtrStay=function(){function n(n,t){var i=this;if(t===void 0&&(t=1e4),this._LastTime=null,this._StayId=null,n==null){console.error("MtrStay: StayId neexistuje!");return}this._LastTime=new Date;this._StayId=n;document.addEventListener("visibilitychange",function(){i._LastTime=document.visibilityState==="visible"?new Date:null});setInterval(function(){if(document.visibilityState==="visible"){var n=new Date,t=i.DiffMiliSeconds(i._LastTime,n);i.AddTime(t);i._LastTime=n}else i._LastTime=null},t)}return n.prototype.AddTime=function(n){n==null||n<=0||AjaxForm("/handler/meter.ashx?Cmd=Stay",{StayId:this._StayId,Increment:n})},n.prototype.DiffMiliSeconds=function(n,t){return n==null||t==null?0:Math.abs(n.getTime()-t.getTime())},n}(),function(n){n.fn.monitortabs=function(t){function u(){n(i).click(function(n){var i=n.target.closest("li[data-ctn]"),t;i!==null&&(t=i.attr("data-ctn"),f(t),e(t),EventKill(n))})}function f(n){for(var u=i.children.length,t,r=0;r<u;r++)t=i.children[r],t.toggleClass("active",t.attr("data-ctn")===n)}function e(n){for(var u=r.children.length,t,i=0;i<u;i++)t=r.children[i],t.toggle(t.attr("data-ctn")===n)}var i,r;(t=OptExtend({Ctn:null},t),i=this[0],i!==null)&&(r=FE(t.Ctn),r!==null)&&u()}}(jQuery);var Eshop=function(){function n(n,t){var i=this;this._Root=null;this._Opt=null;this._Offset=null;this._Fortnight="50465";this._RepeatedPayment="50458";this._2years="50466";this._twoyears="50467";this._threeyears="50468";this.priceyear=null;this._Opt=OptEx({},t);this._Root=n;this.priceyear=1490;this._Offset=90;this.init();this.IsNullOrEmpty($.cookie("ProductTime"))||this.IsNullOrEmpty($.cookie("ProductRecurrentPayment"))||this.IsNullOrEmpty($.cookie("ProductPaymentMethod"))||this.completchoose();$("#idSettingAddress table a.pickaddress").click(function(n){var t=n.currentTarget,r=t.attrI("data-privatenumber");i.showformaddress(r,2)})}return n.prototype.init=function(){var n=this;$("input[name^='CheckTerm']").click(function(t){var i=t.currentTarget;$(n._Opt.ProductTime).val(i.attr("data-zpl"));$(n._Opt.ProductTimeDesc).val(i.attr("data-desc"));$("#idProductTimeDesc").text($(n._Opt.ProductTimeDesc).val());$.cookie("ProductTime",$(n._Opt.ProductTime).val());$.cookie("ProductTimeDesc",$(n._Opt.ProductTimeDesc).val());$("input[name^='CheckTerm']").prop("checked",!1);$(i).prop("checked",!0);$("#idRecurrenceNumber").removeClass("hidelayer");$("#idRecurrence").removeClass("hidelayer");$("#idRecurrence").children().removeClass("hidelayer");$("input[name^='CheckRecurrence']").prop("disabled",!1);$(n._Opt.ProductTime).val()==n._Fortnight&&($("#idRecurrence50458").addClass("hidelayer"),$("#idCheckRecurrence50458").prop("disabled",!0));$(n._Opt.ProductTime).val()==n._2years&&($("#idRecurrence50458").addClass("hidelayer"),$("#idCheckRecurrence50458").prop("disabled",!0));$(n._Opt.ProductTime).val()==n._twoyears&&($("#idRecurrence50458").addClass("hidelayer"),$("#idCheckRecurrence50458").prop("disabled",!0));$(n._Opt.ProductTime).val()==n._threeyears&&($("#idRecurrence50458").addClass("hidelayer"),$("#idCheckRecurrence50458").prop("disabled",!0))});$("input[name^='CheckRecurrence']").click(function(t){var i=t.currentTarget;$(n._Opt.RecurrentPayment).val(i.attr("data-zpl"));$(n._Opt.RecurrentPaymentDesc).val(i.attr("data-desc"));$("#idRecurrentPaymentDesc").text($(n._Opt.RecurrentPaymentDesc).val());$.cookie("ProductRecurrentPayment",$(n._Opt.RecurrentPayment).val());$.cookie("ProductRecurrentPaymentDesc",$(n._Opt.RecurrentPaymentDesc).val());$("input[name^='CheckRecurrence']").prop("checked",!1);$(i).prop("checked",!0);$("#idTermNumber").addClass("hidelayer");$("#idTerm").addClass("hidelayer");$("input[name^='CheckTerm']").prop("disabled",!0);$("#idPayMethodNumber").removeClass("hidelayer");$("#idPayMethod").removeClass("hidelayer");$("#idPayMethod").children().removeClass("hidelayer");$("input[name^='CheckPayMethod']").prop("disabled",!1);$(n._Opt.ProductTime).val()==n._Fortnight?($("#idPayMethod").children().addClass("hidelayer"),$("input[name^='CheckPayMethod']").prop("disabled",!0),$("#idPayMethod12000405").removeClass("hidelayer"),$("#idCheckPayMethod12000405").prop("disabled",!1)):$(n._Opt.RecurrentPayment).val()==n._RepeatedPayment?($("#idPayMethod").children().addClass("hidelayer"),$("input[name^='CheckPayMethod']").prop("disabled",!0),$("#idPayMethod12000219").removeClass("hidelayer"),$("#idCheckPayMethod12000219").prop("disabled",!1)):($("#idPayMethod12000405").addClass("hidelayer"),$("#idCheckPayMethod12000405").prop("disabled",!0))});$("input[name^='CheckPayMethod']").click(function(t){var i=t.currentTarget;$(n._Opt.PaymentMethod).val(i.attr("data-zpl"));$(n._Opt.PaymentMethodDesc).val(i.attr("data-desc"));$("#idPaymentMethodDesc").text($(n._Opt.PaymentMethodDesc).val());$.cookie("ProductPaymentMethod",$(n._Opt.PaymentMethod).val());$.cookie("ProductPaymentMethodDesc",$(n._Opt.PaymentMethodDesc).val());$("input[name^='CheckPayMethod']").prop("checked",!1);$(i).prop("checked",!0);$("#idRecurrenceNumber").addClass("hidelayer");$("#idRecurrence").addClass("hidelayer");$("input[name^='CheckRecurrence']").prop("disabled",!0);$("#idSubmitAll").prop("disabled",!1);$("#idSubmitAll").removeClass("hidelayer")});$("#idNewSelection").click(function(){$.cookie("Product",null);$.cookie("ProductTime",null);$.cookie("ProductRecurrentPayment",null);$.cookie("ProductPaymentMethod",null);$.cookie("ProductTimeDesc",null);$.cookie("ProductRecurrentPaymentDesc",null);$.cookie("ProductPaymentMethodDesc",null);$.cookie("Quantity",null);$.cookie("Address",null);$(n._Opt.Quantity).val(1);$(n._Opt.ProductTime).val(null);$(n._Opt.ProductTimeDesc).val(null);$(n._Opt.RecurrentPayment).val(null);$(n._Opt.RecurrentPaymentDesc).val(null);$(n._Opt.PaymentMethod).val(null);$(n._Opt.PaymentMethodDesc).val(null);$("#idProductTimeDesc").text("nevybráno");$("#idPaymentMethodDesc").text("nevybráno");$("#idRecurrentPaymentDesc").text("nevybráno");$("input[name^='CheckTerm']").prop("checked",!1);$("#idTermNumber").removeClass("hidelayer");$("#idTerm").removeClass("hidelayer");$("input[name^='CheckTerm']").prop("disabled",!1);$("input[name^='CheckRecurrence']").prop("checked",!1);$("#idRecurrenceNumber").addClass("hidelayer");$("#idRecurrence").addClass("hidelayer");$("input[name^='CheckRecurrence']").prop("disabled",!0);$("input[name^='CheckPayMethod']").prop("checked",!1);$("#idPayMethodNumber").addClass("hidelayer");$("#idPayMethod").addClass("hidelayer");$("input[name^='CheckPayMethod']").prop("disabled",!0);$("#idSubmitAll").prop("disabled",!0);$("#idSubmitAll").addClass("hidelayer");$("html, body").animate({scrollTop:$("#idSelectTop").first().offset().top-50},500)});$("#idButtonSetAddressPack").click(function(){$("#idButtonSetAddressPack").addClass("noshow");$("#idButtonUnsetAddressPack").addClass("showline");$("#idSettingAddress").addClass("show");$(n._Opt.AddressSave).val("true")});$("#idButtonUnsetAddressPack").click(function(){$("#idButtonUnsetAddressPack").removeClass("showline");$("#idButtonSetAddressPack").removeClass("noshow");$("#idSettingAddress").removeClass("show");$(n._Opt.AddressSave).val("false")});$("#idButtonSetNewAddress").click(function(){$(n._Opt.FirstName).val("");$(n._Opt.LastName).val("");$(n._Opt.Street).val("");$(n._Opt.City).val("");$(n._Opt.ZIP).val("");$(n._Opt.State).val("");$(n._Opt.Company).val("");$(n._Opt.IN).val("");$(n._Opt.TIN).val("");$(n._Opt.AddressOrder).val("0")})},n.prototype.completchoose=function(){var t=$.cookie("ProductTime"),i=$.cookie("ProductRecurrentPayment"),r=$.cookie("ProductPaymentMethod"),u=$.cookie("ProductTimeDesc"),f=$.cookie("ProductRecurrentPaymentDesc"),e=$.cookie("ProductPaymentMethodDesc"),n=$.cookie("Quantity");n||(n="1");$(this._Opt.ProductTime).val(t);$(this._Opt.RecurrentPayment).val(i);$(this._Opt.PaymentMethod).val(r);$(this._Opt.ProductTimeDesc).val(u);$(this._Opt.RecurrentPaymentDesc).val(f);$(this._Opt.PaymentMethodDesc).val(e);$(this._Opt.Quantity).val(n);$(this._Opt.ProductTime).val().length>0&&$(this._Opt.ProductTimeDesc).val().length>0&&($("input[name^='CheckTerm']").prop("checked",!1),$("#idCheckTerm"+$(this._Opt.ProductTime).val()).prop("checked",!0),$("#idProductTimeDesc").text($(this._Opt.ProductTimeDesc).val()),$("#idRecurrenceNumber").removeClass("hidelayer"),$("#idRecurrence").removeClass("hidelayer"),$("#idRecurrence").children().removeClass("hidelayer"),$("input[name^='CheckRecurrence']").prop("disabled",!1),$(this._Opt.ProductTime).val()==this._Fortnight&&($("#idRecurrence50458").addClass("hidelayer"),$("#idCheckRecurrence50458").prop("disabled",!0)),$(this._Opt.RecurrentPayment).val().length>0&&$(this._Opt.RecurrentPaymentDesc).val().length>0&&($("input[name^='CheckRecurrence']").prop("checked",!1),$("#idCheckRecurrence"+$(this._Opt.RecurrentPayment).val()).prop("checked",!0),$("#idRecurrentPaymentDesc").text($(this._Opt.RecurrentPaymentDesc).val()),$("#idTermNumber").addClass("hidelayer"),$("#idTerm").addClass("hidelayer"),$("input[name^='CheckTerm']").prop("disabled",!0),$("#idPayMethodNumber").removeClass("hidelayer"),$("#idPayMethod").removeClass("hidelayer"),$("#idPayMethod").children().removeClass("hidelayer"),$("input[name^='CheckPayMethod']").prop("disabled",!1),$(this._Opt.ProductTime).val()==this._Fortnight?($("#idPayMethod").children().addClass("hidelayer"),$("input[name^='CheckPayMethod']").prop("disabled",!0),$("#idPayMethod12000405").removeClass("hidelayer"),$("#idCheckPayMethod12000405").prop("disabled",!1)):$(this._Opt.RecurrentPayment).val()==this._RepeatedPayment?($("#idPayMethod").children().addClass("hidelayer"),$("input[name^='CheckPayMethod']").prop("disabled",!0),$("#idPayMethod12000219").removeClass("hidelayer"),$("#idCheckPayMethod12000219").prop("disabled",!1)):($("#idPayMethod12000405").addClass("hidelayer"),$("#idCheckPayMethod12000405").prop("disabled",!0)),$(this._Opt.PaymentMethod).val().length>0&&$(this._Opt.PaymentMethodDesc).val().length>0&&($("input[name^='CheckPayMethod']").prop("checked",!1),$("#idCheckPayMethod"+$(this._Opt.PaymentMethod).val()).prop("checked",!0),$("#idPaymentMethodDesc").text($(this._Opt.PaymentMethodDesc).val()),$("#idRecurrenceNumber").addClass("hidelayer"),$("#idRecurrence").addClass("hidelayer"),$("input[name^='CheckRecurrence']").prop("disabled",!0),$("#idSubmitAll").prop("disabled",!1),$("#idSubmitAll").removeClass("hidelayer"),$("html, body").animate({scrollTop:$("#idGridUser").first().offset().top-this._Offset},500))))},n.prototype.showformaddress=function(n,t){$("#idSettingAddress").addClass("show");$(this._Opt.AddressSave).val("true");$(this._Opt.AddressNumber).val(n);$(this._Opt.AddressType).val(t);n!=0?($(this._Opt.FirstName).val($("#idFirstName"+(t==2?"I":"D")+n).val()),$(this._Opt.LastName).val($("#idLastName"+(t==2?"I":"D")+n).val()),$(this._Opt.Street).val($("#idStreet"+(t==2?"I":"D")+n).val()),$(this._Opt.City).val($("#idCity"+(t==2?"I":"D")+n).val()),$(this._Opt.ZIP).val($("#idZIP"+(t==2?"I":"D")+n).val()),$(this._Opt.State).val($("#idState"+(t==2?"I":"D")+n).val()),$(this._Opt.Company).val($("#idCompany"+(t==2?"I":"D")+n).val()),$(this._Opt.IN).val($("#idIN"+(t==2?"I":"D")+n).val()),$(this._Opt.TIN).val($("#idTIN"+(t==2?"I":"D")+n).val()),$(this._Opt.AddressOrder).val(n)):($(this._Opt.FirstName).val(null),$(this._Opt.LastName).val(null),$(this._Opt.Street).val(null),$(this._Opt.City).val(null),$(this._Opt.ZIP).val(null),$(this._Opt.State).val(null),$(this._Opt.Company).val(null),$(this._Opt.IN).val(null),$(this._Opt.TIN).val(null),$(this._Opt.AddressOrder).val("0"))},n.prototype.newselect=function(){},n.prototype.setnewaddress=function(){},n.prototype.showsettingaddress=function(){},n.prototype.hidesettingaddress=function(){},n.prototype.IsNullOrEmpty=function(n){return n==null||n.length===0},n.prototype.currencyF=function(n){return n.toFixed(0).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1 ")},n}(),Order=function(){function n(n,t){this._Root=null;this._Opt=null;this._Root=n;this._Opt=t;this.Init()}return n.prototype.Init=function(){var n=this;$("#payment-invoke-checkout01").click(function(t){t.preventDefault();var i={ordernumber:$(n._Opt.OrderNumber).val(),paymentmethodcode:$(n._Opt.PaymentMethodCode).val()};$.ajax({url:"/gopaypayment",type:"POST",contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(i)}).done(function(n){_gopay.checkout({gatewayUrl:n.gw_url,inline:!1})}).fail(function(){alert("Chyba při volání platební brány GoPay!")})});$("#idBackSelection").click(function(){SubmitForm("BACK")})},n}(),Everest=function(){function n(n,t){this._Root=null;this._Opt=null;this._Root=FE(n);this._Opt=OptEx({Cookie:null},t);this.Init()}return n.prototype.Init=function(){var n=this;$(this._Root).click(function(t){var i=t.currentTarget.toggleClass("active");$.cookie(n._Opt.Cookie,i,{expires:3650});window.location=window.location})},n}();(function(n){n.fn.externallinks=function(t){function f(r){n("h5",i).each(function(){var n=this.attrI("data-linktypeid");n==r&&this.addClass(t.AC)});n("div[data-linktypeid]",i).each(function(){var n=this.attrI("data-linktypeid");n==r&&this.show()})}function e(){n("h5").addClass(t.AC);var r=[];n("div[data-linktypeid]",i).each(function(){this.show();var n=this.attrI("data-linktypeid");r.push(n)});u(r)}function o(){n("h5").removeClass(t.AC);n("div[data-linktypeid]",i).hide();u(null)}function s(){var r=this,e=r.attrI("data-linktypeid"),o=r.toggleClass(t.AC),f=[];n("div[data-linktypeid]",i).each(function(){var n=this.attrI("data-linktypeid");n==e&&this.toggle(o);this.isVisible()&&f.push(n)});u(f)}function u(i){var r=i!=null&&i.length>0?i.join():null;n.cookie(t.CookieName,r,{path:t.CookiePath,raw:!0})}var i,r;(t=OptExtend({ExpandAll:".ExpandAll",CollapseAll:".CollapseAll",AC:"act",CookieName:"ext-links",CookiePath:null,Separator:","},t),i=this[0],i)&&(r=n.cookie(t.CookieName)!=null&&n.cookie(t.CookieName).length>0?n.cookie(t.CookieName).split(t.Separator):null,r!=null&&r.forEach(f),FE(t.ExpandAll,i,{onclick:e}),FE(t.CollapseAll,i,{onclick:o}),n("h5",i).click(s))}})(jQuery),function(n){n.fn.consent=function(n){function r(){var i=n.HandlerUrl;AjaxForm(i,{CookieName:n.CookieName,CookieValue:n.CookieValue});t.hide()}function i(){t.hide()}n=OptExtend({HandlerUrl:null,CookieName:"cns",CookieValue:1},n);var t=this[0];t!=null&&(FE("a.btn",t,{onclick:r}),FE("a.close",t,{onclick:i}),FE("a.btnclose",t,{onclick:i}))}}(jQuery)