vendor: 4,677 bytes, lines 1-4
1 2; /* Start:"a:4:{s:4:"full";s:66:"/local/templates/voenchast/js/jquery-1.11.1.min.js?178893535595786";s:6:"source";s:50:"/local/templates/voenchast/js/jquery-1.11.1.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 4!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s
vendor: 12,883 bytes, line 4
4=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)}
vendor: 78,440 bytes, lines 4-7
4,input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; 5if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px") 6},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m}); 7
8/* End */ 9; 10; /* Start:"a:4:{s:4:"full";s:73:"/local/templates/voenchast/js/scrol/jquery.jscrollpane.js?166624702442660";s:6:"source";s:57:"/local/templates/voenchast/js/scrol/jquery.jscrollpane.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 11/*! 12 * jScrollPane - v2.0.0beta11 - 2011-06-11 13 * http://jscrollpane.kelvinluck.com/ 14 * 15 * Copyright (c) 2010 Kelvin Luck 16 * Dual licensed under the MIT and GPL licenses. 17 */ 18 19// Script: jScrollPane - cross browser customisable scrollbars 20// 21// *Version: 2.0.0beta11, Last updated: 2011-06-11* 22// 23// Project Home - http://jscrollpane.kelvinluck.com/ 24// GitHub - http://github.com/vitch/jScrollPane 25// Source - http://github.com/vitch/jScrollPane/raw/master/script/jquery.jscrollpane.js 26// (Minified) - http://github.com/vitch/jScrollPane/raw/master/script/jquery.jscrollpane.min.js 27// 28// About: License 29// 30// Copyright (c) 2011 Kelvin Luck 31// Dual licensed under the MIT or GPL Version 2 licenses. 32(function($,window,undefined){ 33 34 $.fn.jScrollPane = function(settings) 35 { 36 // JScrollPane "class" - public methods are available through $('selector').data('jsp') 37 function JScrollPane(elem, s) 38 { 39 var settings, jsp = this, pane, paneWidth, paneHeight, container, contentWidth, contentHeight, 40 percentInViewH, percentInViewV, isScrollableV, isScrollableH, verticalDrag, dragMaxY, 41 verticalDragPosition, horizontalDrag, dragMaxX, horizontalDragPosition, 42 verticalBar, verticalTrack, scrollbarWidth, verticalTrackHeight, verticalDragHeight, arrowUp, arrowDown, 43 horizontalBar, horizontalTrack, horizontalTrackWidth, horizontalDragWidth, arrowLeft, arrowRight, 44 reinitialiseInterval, originalPadding, originalPaddingTotalWidth, previousContentWidth, 45 wasAtTop = true, wasAtLeft = true, wasAtBottom = false, wasAtRight = false, 46 originalElement = elem.clone(false, false).empty(), 47 mwEvent = $.fn.mwheelIntent ? 'mwheelIntent.jsp' : 'mousewheel.jsp'; 48 49 originalPadding = elem.css('paddingTop') + ' ' + 50 elem.css('paddingRight') + ' ' + 51 elem.css('paddingBottom') + ' ' + 52 elem.css('paddingLeft'); 53 originalPaddingTotalWidth = (parseInt(elem.css('paddingLeft'), 10) || 0) + 54 (parseInt(elem.css('paddingRight'), 10) || 0); 55 56 function initialise(s) 57 { 58 59 var /*firstChild, lastChild, */isMaintainingPositon, lastContentX, lastContentY, 60 hasContainingSpaceChanged, originalScrollTop, originalScrollLeft, 61 maintainAtBottom = false, maintainAtRight = false; 62 63 settings = s; 64 65 if (pane === undefined) { 66 originalScrollTop = elem.scrollTop(); 67 originalScrollLeft = elem.scrollLeft(); 68 69 elem.css( 70 { 71 overflow: 'hidden', 72 padding: 0 73 } 74 ); 75 // TODO: Deal with where width/ height is 0 as it probably means the element is hidden and we should 76 // come back to it later and check once it is unhidden... 77 paneWidth = elem.innerWidth() + originalPaddingTotalWidth;
78 paneHeight = elem.innerHeight(); 79 80 elem.width(paneWidth); 81 82 pane = $('<div class="jspPane" style="width:658px;" />').css('padding', originalPadding).append(elem.children()); 83 container = $('<div class="jspContainer" />') 84 .css({ 85 'width': paneWidth + 'px', 86 'height': paneHeight + 'px' 87 } 88 ).append(pane).appendTo(elem); 89 90 /* 91 // Move any margins from the first and last children up to the container so they can still 92 // collapse with neighbouring elements as they would before jScrollPane 93 firstChild = pane.find(':first-child'); 94 lastChild = pane.find(':last-child'); 95 elem.css( 96 { 97 'margin-top': firstChild.css('margin-top'), 98 'margin-bottom': lastChild.css('margin-bottom') 99 } 100 ); 101 firstChild.css('margin-top', 0); 102 lastChild.css('margin-bottom', 0); 103 */ 104 } else { 105 elem.css('width', ''); 106 107 maintainAtBottom = settings.stickToBottom && isCloseToBottom(); 108 maintainAtRight = settings.stickToRight && isCloseToRight(); 109 110 hasContainingSpaceChanged = elem.innerWidth() + originalPaddingTotalWidth != paneWidth || elem.outerHeight() != paneHeight; 111 112 if (hasContainingSpaceChanged) { 113 paneWidth = elem.innerWidth() + originalPaddingTotalWidth;
114 paneHeight = elem.innerHeight(); 115 container.css({ 116 width: paneWidth + 'px', 117 height: paneHeight + 'px' 118 }); 119 } 120 121 // If nothing changed since last check... 122 if (!hasContainingSpaceChanged && previousContentWidth == contentWidth && pane.outerHeight() == contentHeight) { 123 elem.width(paneWidth); 124 return; 125 } 126 previousContentWidth = contentWidth; 127 128 pane.css('width', ''); 129 elem.width(paneWidth); 130 131 container.find('>.jspVerticalBar,>.jspHorizontalBar').remove().end(); 132 } 133 134 pane.css('overflow', 'auto'); 135 if (s.contentWidth) { 136 contentWidth = s.contentWidth; 137 } else { 138 contentWidth = pane[0].scrollWidth; 139 } 140 contentHeight = pane[0].scrollHeight; 141 pane.css('overflow', ''); 142 143 percentInViewH = contentWidth / paneWidth; 144 percentInViewV = contentHeight / paneHeight; 145 isScrollableV = percentInViewV > 1; 146 147 isScrollableH = percentInViewH > 1; 148 149 //console.log(paneWidth, paneHeight, contentWidth, contentHeight, percentInViewH, percentInViewV, isScrollableH, isScrollableV); 150 151 if (!(isScrollableH || isScrollableV)) { 152 elem.removeClass('jspScrollable'); 153 pane.css({ 154 top: 0, 155 width: container.width() - originalPaddingTotalWidth 156 }); 157 removeMousewheel(); 158 removeFocusHandler(); 159 removeKeyboardNav(); 160 removeClickOnTrack(); 161 unhijackInternalLinks(); 162 } else { 163 elem.addClass('jspScrollable'); 164 165 isMaintainingPositon = settings.maintainPosition && (verticalDragPosition || horizontalDragPosition); 166 if (isMaintainingPositon) { 167 lastContentX = contentPositionX(); 168 lastContentY = contentPositionY(); 169 } 170 171 initialiseVerticalScroll(); 172 initialiseHorizontalScroll(); 173 resizeScrollbars(); 174 175 if (isMaintainingPositon) { 176 scrollToX(maintainAtRight ? (contentWidth - paneWidth ) : lastContentX, false); 177 scrollToY(maintainAtBottom ? (contentHeight - paneHeight) : lastContentY, false); 178 } 179 180 initFocusHandler(); 181 initMousewheel(); 182 initTouch(); 183 184 if (settings.enableKeyboardNavigation) { 185 initKeyboardNav(); 186 } 187 if (settings.clickOnTrack) { 188 initClickOnTrack(); 189 } 190 191 observeHash(); 192 if (settings.hijackInternalLinks) { 193 hijackInternalLinks(); 194 } 195 } 196 197 if (settings.autoReinitialise && !reinitialiseInterval) { 198 reinitialiseInterval = setInterval( 199 function() 200 { 201 initialise(settings); 202 }, 203 settings.autoReinitialiseDelay 204 ); 205 } else if (!settings.autoReinitialise && reinitialiseInterval) { 206 clearInterval(reinitialiseInterval); 207 } 208 209 originalScrollTop && elem.scrollTop(0) && scrollToY(originalScrollTop, false); 210 originalScrollLeft && elem.scrollLeft(0) && scrollToX(originalScrollLeft, false); 211 212 elem.trigger('jsp-initialised', [isScrollableH || isScrollableV]); 213 } 214 215 function initialiseVerticalScroll() 216 { 217 if (isScrollableV) { 218 219 container.append( 220 $('<div class="jspVerticalBar" />').append( 221 $('<div class="jspCap jspCapTop" />'), 222 $('<div class="jspTrack" />').append( 223 $('<div class="jspDrag" />').append( 224 $('<div class="jspDragTop" />'), 225 $('<div class="jspDragBottom" />') 226 ) 227 ), 228 $('<div class="jspCap jspCapBottom" />') 229 ) 230 ); 231 232 verticalBar = container.find('>.jspVerticalBar'); 233 verticalTrack = verticalBar.find('>.jspTrack'); 234 verticalDrag = verticalTrack.find('>.jspDrag'); 235 236 if (settings.showArrows) { 237 arrowUp = $('<a class="jspArrow jspArrowUp" />').bind( 238 'mousedown.jsp', getArrowScroll(0, -1) 239 ).bind('click.jsp', nil); 240 arrowDown = $('<a class="jspArrow jspArrowDown" />').bind( 241 'mousedown.jsp', getArrowScroll(0, 1) 242 ).bind('click.jsp', nil); 243 if (settings.arrowScrollOnHover) { 244 arrowUp.bind('mouseover.jsp', getArrowScroll(0, -1, arrowUp)); 245 arrowDown.bind('mouseover.jsp', getArrowScroll(0, 1, arrowDown)); 246 } 247 248 appendArrows(verticalTrack, settings.verticalArrowPositions, arrowUp, arrowDown); 249 } 250 251 verticalTrackHeight = paneHeight; 252 container.find('>.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow').each( 253 function() 254 { 255 verticalTrackHeight -= $(this).outerHeight(); 256 } 257 ); 258 259 260 verticalDrag.hover( 261 function() 262 { 263 verticalDrag.addClass('jspHover'); 264 }, 265 function() 266 { 267 verticalDrag.removeClass('jspHover'); 268 } 269 ).bind( 270 'mousedown.jsp', 271 function(e) 272 { 273 // Stop IE from allowing text selection 274 $('html').bind('dragstart.jsp selectstart.jsp', nil); 275 276 verticalDrag.addClass('jspActive'); 277 278 var startY = e.pageY - verticalDrag.position().top; 279 280 $('html').bind( 281 'mousemove.jsp', 282 function(e) 283 { 284 positionDragY(e.pageY - startY, false); 285 } 286 ).bind('mouseup.jsp mouseleave.jsp', cancelDrag); 287 return false;
288 } 289 ); 290 sizeVerticalScrollbar(); 291 } 292 } 293 294 function sizeVerticalScrollbar() 295 { 296 verticalTrack.height(verticalTrackHeight + 'px'); 297 verticalDragPosition = 0; 298 scrollbarWidth = settings.verticalGutter + verticalTrack.outerWidth(); 299 300 // Make the pane thinner to allow for the vertical scrollbar 301 pane.width(paneWidth - scrollbarWidth - originalPaddingTotalWidth); 302 303 // Add margin to the left of the pane if scrollbars are on that side (to position 304 // the scrollbar on the left or right set it's left or right property in CSS) 305 try { 306 if (verticalBar.position().left === 0) { 307 pane.css('margin-left', scrollbarWidth + 'px'); 308 } 309 } catch (err) { 310 } 311 } 312 313 function initialiseHorizontalScroll() 314 { 315 if (isScrollableH) { 316 317 container.append( 318 $('<div class="jspHorizontalBar" />').append( 319 $('<div class="jspCap jspCapLeft" />'), 320 $('<div class="jspTrack" />').append( 321 $('<div class="jspDrag" />').append( 322 $('<div class="jspDragLeft" />'), 323 $('<div class="jspDragRight" />') 324 ) 325 ), 326 $('<div class="jspCap jspCapRight" />') 327 ) 328 ); 329 330 horizontalBar = container.find('>.jspHorizontalBar'); 331 horizontalTrack = horizontalBar.find('>.jspTrack'); 332 horizontalDrag = horizontalTrack.find('>.jspDrag'); 333 334 if (settings.showArrows) { 335 arrowLeft = $('<a class="jspArrow jspArrowLeft" />').bind( 336 'mousedown.jsp', getArrowScroll(-1, 0) 337 ).bind('click.jsp', nil); 338 arrowRight = $('<a class="jspArrow jspArrowRight" />').bind( 339 'mousedown.jsp', getArrowScroll(1, 0) 340 ).bind('click.jsp', nil); 341 if (settings.arrowScrollOnHover) { 342 arrowLeft.bind('mouseover.jsp', getArrowScroll(-1, 0, arrowLeft)); 343 arrowRight.bind('mouseover.jsp', getArrowScroll(1, 0, arrowRight)); 344 } 345 appendArrows(horizontalTrack, settings.horizontalArrowPositions, arrowLeft, arrowRight); 346 } 347 348 horizontalDrag.hover( 349 function() 350 { 351 horizontalDrag.addClass('jspHover'); 352 }, 353 function() 354 { 355 horizontalDrag.removeClass('jspHover'); 356 } 357 ).bind( 358 'mousedown.jsp', 359 function(e) 360 { 361 // Stop IE from allowing text selection 362 $('html').bind('dragstart.jsp selectstart.jsp', nil); 363 364 horizontalDrag.addClass('jspActive'); 365 366 var startX = e.pageX - horizontalDrag.position().left; 367 368 $('html').bind( 369 'mousemove.jsp', 370 function(e) 371 { 372 positionDragX(e.pageX - startX, false); 373 } 374 ).bind('mouseup.jsp mouseleave.jsp', cancelDrag); 375 return false; 376 } 377 ); 378 horizontalTrackWidth = container.innerWidth(); 379 sizeHorizontalScrollbar(); 380 } 381 } 382 383 function sizeHorizontalScrollbar() 384 { 385 container.find('>.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow').each( 386 function() 387 { 388 horizontalTrackWidth -= $(this).outerWidth(); 389 } 390 ); 391 392 horizontalTrack.width(horizontalTrackWidth + 'px'); 393 horizontalDragPosition = 0; 394 } 395 396 function resizeScrollbars() 397 { 398 if (isScrollableH && isScrollableV) { 399 var horizontalTrackHeight = horizontalTrack.outerHeight(), 400 verticalTrackWidth = verticalTrack.outerWidth(); 401 verticalTrackHeight -= horizontalTrackHeight; 402 $(horizontalBar).find('>.jspCap:visible,>.jspArrow').each( 403 function() 404 { 405 horizontalTrackWidth += $(this).outerWidth(); 406 } 407 ); 408 horizontalTrackWidth -= verticalTrackWidth; 409 paneHeight -= verticalTrackWidth; 410 paneWidth -= horizontalTrackHeight; 411 horizontalTrack.parent().append( 412 $('<div class="jspCorner" />').css('width', horizontalTrackHeight + 'px') 413 ); 414 sizeVerticalScrollbar(); 415 sizeHorizontalScrollbar(); 416 } 417 // reflow content 418 if (isScrollableH) { 419 pane.width((container.outerWidth() - originalPaddingTotalWidth) + 'px'); 420 } 421 contentHeight = pane.outerHeight(); 422 percentInViewV = contentHeight / paneHeight; 423 424 if (isScrollableH) { 425 horizontalDragWidth = Math.ceil(1 / percentInViewH * horizontalTrackWidth); 426 if (horizontalDragWidth > settings.horizontalDragMaxWidth) { 427 horizontalDragWidth = settings.horizontalDragMaxWidth; 428 } else if (horizontalDragWidth < settings.horizontalDragMinWidth) { 429 horizontalDragWidth = settings.horizontalDragMinWidth; 430 } 431 horizontalDrag.width(horizontalDragWidth + 'px');
432 dragMaxX = horizontalTrackWidth - horizontalDragWidth; 433 _positionDragX(horizontalDragPosition); // To update the state for the arrow buttons 434 } 435 if (isScrollableV) { 436 verticalDragHeight = Math.ceil(1 / percentInViewV * verticalTrackHeight); 437 if (verticalDragHeight > settings.verticalDragMaxHeight) { 438 verticalDragHeight = settings.verticalDragMaxHeight; 439 } else if (verticalDragHeight < settings.verticalDragMinHeight) { 440 verticalDragHeight = settings.verticalDragMinHeight; 441 } 442 verticalDrag.height(verticalDragHeight + 'px'); 443 dragMaxY = verticalTrackHeight - verticalDragHeight; 444 _positionDragY(verticalDragPosition); // To update the state for the arrow buttons 445 } 446 } 447 448 function appendArrows(ele, p, a1, a2) 449 { 450 var p1 = "before", p2 = "after", aTemp; 451 452 // Sniff for mac... Is there a better way to determine whether the arrows would naturally appear 453 // at the top or the bottom of the bar? 454 if (p == "os") { 455 p = /Mac/.test(navigator.platform) ? "after" : "split"; 456 } 457 if (p == p1) { 458 p2 = p; 459 } else if (p == p2) { 460 p1 = p; 461 aTemp = a1; 462 a1 = a2; 463 a2 = aTemp; 464 } 465 466 ele[p1](a1)[p2](a2); 467 } 468 469 function getArrowScroll(dirX, dirY, ele) 470 { 471 return function() 472 { 473 arrowScroll(dirX, dirY, this, ele); 474 this.blur(); 475 return false; 476 }; 477 } 478 479 function arrowScroll(dirX, dirY, arrow, ele) 480 { 481 arrow = $(arrow).addClass('jspActive'); 482 483 var eve, 484 scrollTimeout, 485 isFirst = true, 486 doScroll = function() 487 { 488 if (dirX !== 0) { 489 jsp.scrollByX(dirX * settings.arrowButtonSpeed); 490 } 491 if (dirY !== 0) { 492 jsp.scrollByY(dirY * settings.arrowButtonSpeed); 493 } 494 scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.arrowRepeatFreq); 495 isFirst = false; 496 }; 497 498 doScroll(); 499 500 eve = ele ? 'mouseout.jsp' : 'mouseup.jsp'; 501 ele = ele || $('html'); 502 ele.bind( 503 eve, 504 function() 505 { 506 arrow.removeClass('jspActive'); 507 scrollTimeout && clearTimeout(scrollTimeout); 508 scrollTimeout = null; 509 ele.unbind(eve); 510 } 511 ); 512 } 513 514 function initClickOnTrack() 515 { 516 removeClickOnTrack(); 517 if (isScrollableV) { 518 verticalTrack.bind( 519 'mousedown.jsp', 520 function(e) 521 { 522 if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) { 523 var clickedTrack = $(this), 524 offset = clickedTrack.offset(), 525 direction = e.pageY - offset.top - verticalDragPosition, 526 scrollTimeout, 527 isFirst = true, 528 doScroll = function() 529 { 530 var offset = clickedTrack.offset(), 531 pos = e.pageY - offset.top - verticalDragHeight / 2, 532 contentDragY = paneHeight * settings.scrollPagePercent, 533 dragY = dragMaxY * contentDragY / (contentHeight - paneHeight); 534 if (direction < 0) { 535 if (verticalDragPosition - dragY > pos) { 536 jsp.scrollByY(-contentDragY); 537 } else { 538 positionDragY(pos); 539 } 540 } else if (direction > 0) { 541 if (verticalDragPosition + dragY < pos) { 542 jsp.scrollByY(contentDragY); 543 } else { 544 positionDragY(pos); 545 } 546 } else { 547 cancelClick(); 548 return; 549 } 550 scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq); 551 isFirst = false; 552 }, 553 cancelClick = function() 554 { 555 scrollTimeout && clearTimeout(scrollTimeout); 556 scrollTimeout = null; 557 $(document).unbind('mouseup.jsp', cancelClick); 558 }; 559 doScroll(); 560 $(document).bind('mouseup.jsp', cancelClick); 561 return false; 562 } 563 } 564 ); 565 } 566 567 if (isScrollableH) { 568 horizontalTrack.bind( 569 'mousedown.jsp', 570 function(e) 571 { 572 if (e.originalTarget === undefined || e.originalTarget == e.currentTarget) { 573 var clickedTrack = $(this), 574 offset = clickedTrack.offset(), 575 direction = e.pageX - offset.left - horizontalDragPosition, 576 scrollTimeout, 577 isFirst = true, 578 doScroll = function() 579 { 580 var offset = clickedTrack.offset(), 581 pos = e.pageX - offset.left - horizontalDragWidth / 2, 582 contentDragX = paneWidth * settings.scrollPagePercent, 583 dragX = dragMaxX * contentDragX / (contentWidth - paneWidth); 584 if (direction < 0) { 585 if (horizontalDragPosition - dragX > pos) { 586 jsp.scrollByX(-contentDragX); 587 } else { 588 positionDragX(pos); 589 } 590 } else if (direction > 0) { 591 if (horizontalDragPosition + dragX < pos) { 592 jsp.scrollByX(contentDragX); 593 } else { 594 positionDragX(pos); 595 } 596 } else { 597 cancelClick(); 598 return; 599 } 600 scrollTimeout = setTimeout(doScroll, isFirst ? settings.initialDelay : settings.trackClickRepeatFreq); 601 isFirst = false;
602 }, 603 cancelClick = function() 604 { 605 scrollTimeout && clearTimeout(scrollTimeout); 606 scrollTimeout = null; 607 $(document).unbind('mouseup.jsp', cancelClick); 608 }; 609 doScroll(); 610 $(document).bind('mouseup.jsp', cancelClick); 611 return false; 612 } 613 } 614 ); 615 } 616 } 617 618 function removeClickOnTrack() 619 { 620 if (horizontalTrack) { 621 horizontalTrack.unbind('mousedown.jsp'); 622 } 623 if (verticalTrack) { 624 verticalTrack.unbind('mousedown.jsp'); 625 } 626 } 627 628 function cancelDrag() 629 { 630 $('html').unbind('dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp'); 631 632 if (verticalDrag) { 633 verticalDrag.removeClass('jspActive'); 634 } 635 if (horizontalDrag) { 636 horizontalDrag.removeClass('jspActive'); 637 } 638 } 639 640 function positionDragY(destY, animate) 641 { 642 if (!isScrollableV) { 643 return; 644 } 645 if (destY < 0) { 646 destY = 0; 647 } else if (destY > dragMaxY) { 648 destY = dragMaxY; 649 } 650 651 // can't just check if(animate) because false is a valid value that could be passed in... 652 if (animate === undefined) { 653 animate = settings.animateScroll; 654 } 655 if (animate) { 656 jsp.animate(verticalDrag, 'top', destY, _positionDragY); 657 } else { 658 verticalDrag.css('top', destY); 659 _positionDragY(destY); 660 } 661 662 } 663 664 function _positionDragY(destY) 665 { 666 if (destY === undefined) { 667 destY = verticalDrag.position().top; 668 } 669 670 container.scrollTop(0); 671 verticalDragPosition = destY; 672 673 var isAtTop = verticalDragPosition === 0, 674 isAtBottom = verticalDragPosition == dragMaxY, 675 percentScrolled = destY/ dragMaxY, 676 destTop = -percentScrolled * (contentHeight - paneHeight); 677 678 if (wasAtTop != isAtTop || wasAtBottom != isAtBottom) { 679 wasAtTop = isAtTop; 680 wasAtBottom = isAtBottom; 681 elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]); 682 } 683 684 updateVerticalArrows(isAtTop, isAtBottom); 685 pane.css('top', destTop); 686 elem.trigger('jsp-scroll-y', [-destTop, isAtTop, isAtBottom]).trigger('scroll'); 687 } 688 689 function positionDragX(destX, animate) 690 { 691 if (!isScrollableH) { 692 return; 693 } 694 if (destX < 0) { 695 destX = 0; 696 } else if (destX > dragMaxX) { 697 destX = dragMaxX; 698 } 699 700 if (animate === undefined) { 701 animate = settings.animateScroll; 702 } 703 if (animate) { 704 jsp.animate(horizontalDrag, 'left', destX, _positionDragX); 705 } else { 706 horizontalDrag.css('left', destX); 707 _positionDragX(destX); 708 } 709 } 710 711 function _positionDragX(destX) 712 { 713 if (destX === undefined) { 714 destX = horizontalDrag.position().left; 715 } 716 717 container.scrollTop(0); 718 horizontalDragPosition = destX; 719 720 var isAtLeft = horizontalDragPosition === 0, 721 isAtRight = horizontalDragPosition == dragMaxX, 722 percentScrolled = destX / dragMaxX, 723 destLeft = -percentScrolled * (contentWidth - paneWidth); 724 725 if (wasAtLeft != isAtLeft || wasAtRight != isAtRight) { 726 wasAtLeft = isAtLeft; 727 wasAtRight = isAtRight; 728 elem.trigger('jsp-arrow-change', [wasAtTop, wasAtBottom, wasAtLeft, wasAtRight]); 729 } 730 731 updateHorizontalArrows(isAtLeft, isAtRight); 732 pane.css('left', destLeft); 733 elem.trigger('jsp-scroll-x', [-destLeft, isAtLeft, isAtRight]).trigger('scroll'); 734 } 735 736 function updateVerticalArrows(isAtTop, isAtBottom) 737 { 738 if (settings.showArrows) { 739 arrowUp[isAtTop ? 'addClass' : 'removeClass']('jspDisabled'); 740 arrowDown[isAtBottom ? 'addClass' : 'removeClass']('jspDisabled'); 741 } 742 } 743 744 function updateHorizontalArrows(isAtLeft, isAtRight) 745 { 746 if (settings.showArrows) { 747 arrowLeft[isAtLeft ? 'addClass' : 'removeClass']('jspDisabled'); 748 arrowRight[isAtRight ? 'addClass' : 'removeClass']('jspDisabled'); 749 } 750 } 751 752 function scrollToY(destY, animate) 753 { 754 var percentScrolled = destY / (contentHeight - paneHeight); 755 positionDragY(percentScrolled * dragMaxY, animate); 756 } 757 758 function scrollToX(destX, animate) 759 { 760 var percentScrolled = destX / (contentWidth - paneWidth); 761 positionDragX(percentScrolled * dragMaxX, animate); 762 } 763 764 function scrollToElement(ele, stickToTop, animate) 765 { 766 var e, eleHeight, eleWidth, eleTop = 0, eleLeft = 0, viewportTop, viewportLeft, maxVisibleEleTop, maxVisibleEleLeft, destY, destX; 767 768 // Legal hash values aren't necessarily legal jQuery selectors so we need to catch any 769 // errors from the lookup...
770 try { 771 e = $(ele); 772 } catch (err) { 773 return; 774 } 775 eleHeight = e.outerHeight(); 776 eleWidth= e.outerWidth(); 777 778 container.scrollTop(0); 779 container.scrollLeft(0); 780 781 // loop through parents adding the offset top of any elements that are relatively positioned between 782 // the focused element and the jspPane so we can get the true distance from the top 783 // of the focused element to the top of the scrollpane... 784 while (!e.is('.jspPane')) { 785 eleTop += e.position().top; 786 eleLeft += e.position().left; 787 e = e.offsetParent(); 788 if (/^body|html$/i.test(e[0].nodeName)) { 789 // we ended up too high in the document structure. Quit! 790 return; 791 } 792 } 793 794 viewportTop = contentPositionY(); 795 maxVisibleEleTop = viewportTop + paneHeight; 796 if (eleTop < viewportTop || stickToTop) { // element is above viewport 797 destY = eleTop - settings.verticalGutter; 798 } else if (eleTop + eleHeight > maxVisibleEleTop) { // element is below viewport 799 destY = eleTop - paneHeight + eleHeight + settings.verticalGutter; 800 } 801 if (destY) { 802 scrollToY(destY, animate); 803 } 804 805 viewportLeft = contentPositionX(); 806 maxVisibleEleLeft = viewportLeft + paneWidth; 807 if (eleLeft < viewportLeft || stickToTop) { // element is to the left of viewport 808 destX = eleLeft - settings.horizontalGutter; 809 } else if (eleLeft + eleWidth > maxVisibleEleLeft) { // element is to the right viewport 810 destX = eleLeft - paneWidth + eleWidth + settings.horizontalGutter; 811 } 812 if (destX) { 813 scrollToX(destX, animate); 814 } 815 816 } 817 818 function contentPositionX() 819 { 820 return -pane.position().left; 821 } 822 823 function contentPositionY() 824 { 825 return -pane.position().top; 826 } 827 828 function isCloseToBottom() 829 { 830 var scrollableHeight = contentHeight - paneHeight; 831 return (scrollableHeight > 20) && (scrollableHeight - contentPositionY() < 10); 832 } 833 834 function isCloseToRight() 835 { 836 var scrollableWidth = contentWidth - paneWidth; 837 return (scrollableWidth > 20) && (scrollableWidth - contentPositionX() < 10); 838 } 839 840 function initMousewheel() 841 { 842 container.unbind(mwEvent).bind( 843 mwEvent, 844 function (event, delta, deltaX, deltaY) { 845 var dX = horizontalDragPosition, dY = verticalDragPosition; 846 jsp.scrollBy(deltaX * settings.mouseWheelSpeed, -deltaY * settings.mouseWheelSpeed, false); 847 // return true if there was no movement so rest of screen can scroll 848 return dX == horizontalDragPosition && dY == verticalDragPosition; 849 } 850 ); 851 } 852 853 function removeMousewheel() 854 { 855 container.unbind(mwEvent); 856 } 857 858 function nil() 859 { 860 return false; 861 } 862 863 function initFocusHandler() 864 { 865 pane.find(':input,a').unbind('focus.jsp').bind( 866 'focus.jsp', 867 function(e) 868 { 869 scrollToElement(e.target, false); 870 } 871 ); 872 } 873 874 function removeFocusHandler() 875 { 876 pane.find(':input,a').unbind('focus.jsp'); 877 } 878 879 function initKeyboardNav() 880 { 881 var keyDown, elementHasScrolled, validParents = []; 882 isScrollableH && validParents.push(horizontalBar[0]); 883 isScrollableV && validParents.push(verticalBar[0]); 884 885 // IE also focuses elements that don't have tabindex set. 886 pane.focus( 887 function() 888 { 889 elem.focus(); 890 } 891 ); 892 893 elem.attr('tabindex', 0) 894 .unbind('keydown.jsp keypress.jsp') 895 .bind( 896 'keydown.jsp', 897 function(e) 898 { 899 if (e.target !== this && !(validParents.length && $(e.target).closest(validParents).length)){ 900 return; 901 } 902 var dX = horizontalDragPosition, dY = verticalDragPosition; 903 switch(e.keyCode) { 904 case 40: // down 905 case 38: // up 906 case 34: // page down 907 case 32: // space 908 case 33: // page up 909 case 39: // right 910 case 37: // left 911 keyDown = e.keyCode; 912 keyDownHandler(); 913 break; 914 case 35: // end 915 scrollToY(contentHeight - paneHeight); 916 keyDown = null; 917 break; 918 case 36: // home 919 scrollToY(0); 920 keyDown = null; 921 break; 922 } 923 924 elementHasScrolled = e.keyCode == keyDown && dX != horizontalDragPosition || dY != verticalDragPosition; 925 return !elementHasScrolled; 926 } 927 ).bind( 928 'keypress.jsp', // For FF/ OSX so that we can cancel the repeat key presses if the JSP scrolls... 929 function(e) 930 { 931 if (e.keyCode == keyDown) { 932 keyDownHandler(); 933 } 934 return !elementHasScrolled; 935 } 936 ); 937 938 if (settings.hideFocus) { 939 elem.css('outline', 'none'); 940 if ('hideFocus' in container[0]){ 941 elem.attr('hideFocus', true); 942 } 943 } else { 944 elem.css('outline', ''); 945 if ('hideFocus' in container[0]){ 946 elem.attr('hideFocus', false); 947 } 948 } 949 950 function keyDownHandler() 951 { 952 var dX = horizontalDragPosition, dY = verticalDragPosition; 953 switch(keyDown) { 954 case 40: // down 955 jsp.scrollByY(settings.keyboardSpeed, false); 956 break; 957 case 38: // up 958 jsp.scrollByY(-settings.keyboardSpeed, false); 959 break; 960 case 34: // page down 961 case 32: // space 962 jsp.scrollByY(paneHeight * settings.scrollPagePercent, false); 963 break; 964 case 33: // page up 965 jsp.scrollByY(-paneHeight * settings.scrollPagePercent, false); 966 break; 967 case 39: // right 968 jsp.scrollByX(settings.keyboardSpeed, false); 969 break; 970 case 37: // left 971 jsp.scrollByX(-settings.keyboardSpeed, false); 972 break; 973 } 974 975 elementHasScrolled = dX != horizontalDragPosition || dY != verticalDragPosition; 976 return elementHasScrolled; 977 } 978 } 979 980 function removeKeyboardNav() 981 { 982 elem.attr('tabindex', '-1') 983 .removeAttr('tabindex') 984 .unbind('keydown.jsp keypress.jsp'); 985 } 986 987 function observeHash() 988 { 989 if (location.hash && location.hash.length > 1) { 990 var e, 991 retryInt, 992 hash = escape(location.hash) // hash must be escaped to prevent XSS 993 ; 994 try { 995 e = $(hash); 996 } catch (err) { 997 return; 998 } 999 1000 if (e.length && pane.find(hash)) { 1001 // nasty workaround but it appears to take a little while before the hash has done its thing 1002 // to the rendered page so we just wait until the container's scrollTop has been messed up. 1003 if (container.scrollTop() === 0) { 1004 retryInt = setInterval( 1005 function() 1006 { 1007 if (container.scrollTop() > 0) { 1008 scrollToElement(hash, true); 1009 $(document).scrollTop(container.position().top);
1010 clearInterval(retryInt); 1011 } 1012 }, 1013 50 1014 ); 1015 } else { 1016 scrollToElement(hash, true); 1017 $(document).scrollTop(container.position().top); 1018 } 1019 } 1020 } 1021 } 1022 1023 function unhijackInternalLinks() 1024 { 1025 $('a.jspHijack').unbind('click.jsp-hijack').removeClass('jspHijack'); 1026 } 1027 1028 function hijackInternalLinks() 1029 { 1030 unhijackInternalLinks(); 1031 $('a[href^=#]').addClass('jspHijack').bind( 1032 'click.jsp-hijack', 1033 function() 1034 { 1035 var uriParts = this.href.split('#'), hash; 1036 if (uriParts.length > 1) { 1037 hash = uriParts[1]; 1038 if (hash.length > 0 && pane.find('#' + hash).length > 0) { 1039 scrollToElement('#' + hash, true); 1040 // Need to return false otherwise things mess up... Would be nice to maybe also scroll 1041 // the window to the top of the scrollpane? 1042 return false; 1043 } 1044 } 1045 } 1046 ); 1047 } 1048 1049 // Init touch on iPad, iPhone, iPod, Android 1050 function initTouch() 1051 { 1052 var startX, 1053 startY, 1054 touchStartX, 1055 touchStartY, 1056 moved, 1057 moving = false; 1058 1059 container.unbind('touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick').bind( 1060 'touchstart.jsp', 1061 function(e) 1062 { 1063 var touch = e.originalEvent.touches[0]; 1064 startX = contentPositionX(); 1065 startY = contentPositionY(); 1066 touchStartX = touch.pageX; 1067 touchStartY = touch.pageY; 1068 moved = false; 1069 moving = true; 1070 } 1071 ).bind( 1072 'touchmove.jsp', 1073 function(ev) 1074 { 1075 if(!moving) { 1076 return; 1077 } 1078 1079 var touchPos = ev.originalEvent.touches[0], 1080 dX = horizontalDragPosition, dY = verticalDragPosition; 1081 1082 jsp.scrollTo(startX + touchStartX - touchPos.pageX, startY + touchStartY - touchPos.pageY); 1083 1084 moved = moved || Math.abs(touchStartX - touchPos.pageX) > 5 || Math.abs(touchStartY - touchPos.pageY) > 5; 1085 1086 // return true if there was no movement so rest of screen can scroll 1087 return dX == horizontalDragPosition && dY == verticalDragPosition; 1088 } 1089 ).bind( 1090 'touchend.jsp', 1091 function(e) 1092 { 1093 moving = false; 1094 /*if(moved) { 1095 return false; 1096 }*/ 1097 } 1098 ).bind( 1099 'click.jsp-touchclick', 1100 function(e) 1101 { 1102 if(moved) { 1103 moved = false; 1104 return false; 1105 } 1106 } 1107 ); 1108 } 1109 1110 function destroy(){ 1111 var currentY = contentPositionY(), 1112 currentX = contentPositionX(); 1113 elem.removeClass('jspScrollable').unbind('.jsp'); 1114 elem.replaceWith(originalElement.append(pane.children())); 1115 originalElement.scrollTop(currentY); 1116 originalElement.scrollLeft(currentX); 1117 } 1118 1119 // Public API 1120 $.extend( 1121 jsp, 1122 { 1123 // Reinitialises the scroll pane (if it's internal dimensions have changed since the last time it 1124 // was initialised). The settings object which is passed in will override any settings from the 1125 // previous time it was initialised - if you don't pass any settings then the ones from the previous 1126 // initialisation will be used. 1127 reinitialise: function(s) 1128 { 1129 s = $.extend({}, settings, s); 1130 initialise(s); 1131 }, 1132 // Scrolls the specified element (a jQuery object, DOM node or jQuery selector string) into view so 1133 // that it can be seen within the viewport. If stickToTop is true then the element will appear at 1134 // the top of the viewport, if it is false then the viewport will scroll as little as possible to 1135 // show the element. You can also specify if you want animation to occur. If you don't provide this 1136 // argument then the animateScroll value from the settings object is used instead. 1137 scrollToElement: function(ele, stickToTop, animate) 1138 { 1139 scrollToElement(ele, stickToTop, animate); 1140 }, 1141 // Scrolls the pane so that the specified co-ordinates within the content are at the top left 1142 // of the viewport. animate is optional and if not passed then the value of animateScroll from 1143 // the settings object this jScrollPane was initialised with is used. 1144 scrollTo: function(destX, destY, animate) 1145 { 1146 scrollToX(destX, animate); 1147 scrollToY(destY, animate); 1148 }, 1149 // Scrolls the pane so that the specified co-ordinate within the content is at the left of the 1150 // viewport. animate is optional and if not passed then the value of animateScroll from the settings 1151 // object this jScrollPane was initialised with is used. 1152 scrollToX: function(destX, animate) 1153 { 1154 scrollToX(destX, animate); 1155 }, 1156 // Scrolls the pane so that the specified co-ordinate within the content is at the top of the 1157 // viewport. animate is optional and if not passed then the value of animateScroll from the settings 1158 // object this jScrollPane was initialised with is used. 1159 scrollToY: function(destY, animate) 1160 { 1161 scrollToY(destY, animate); 1162 }, 1163 // Scrolls the pane to the specified percentage of its maximum horizontal scroll position. animate 1164 // is optional and if not passed then the value of animateScroll from the settings object this 1165 // jScrollPane was initialised with is used. 1166 scrollToPercentX: function(destPercentX, animate) 1167 { 1168 scrollToX(destPercentX * (contentWidth - paneWidth), animate); 1169 }, 1170 // Scrolls the pane to the specified percentage of its maximum vertical scroll position. animate 1171 // is optional and if not passed then the value of animateScroll from the settings object this 1172 // jScrollPane was initialised with is used. 1173 scrollToPercentY: function(destPercentY, animate) 1174 { 1175 scrollToY(destPercentY * (contentHeight - paneHeight), animate); 1176 }, 1177 // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then 1178 // the value of animateScroll from the settings object this jScrollPane was initialised with is used. 1179 scrollBy: function(deltaX, deltaY, animate) 1180 { 1181 jsp.scrollByX(deltaX, animate); 1182 jsp.scrollByY(deltaY, animate); 1183 }, 1184 // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then 1185 // the value of animateScroll from the settings object this jScrollPane was initialised with is used. 1186 scrollByX: function(deltaX, animate) 1187 { 1188 var destX = contentPositionX() + Math[deltaX<0 ? 'floor' : 'ceil'](deltaX), 1189 percentScrolled = destX / (contentWidth - paneWidth); 1190 positionDragX(percentScrolled * dragMaxX, animate); 1191 }, 1192 // Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then 1193 // the value of animateScroll from the settings object this jScrollPane was initialised with is used. 1194 scrollByY: function(deltaY, animate) 1195 { 1196 var destY = contentPositionY() + Math[deltaY<0 ? 'floor' : 'ceil'](deltaY), 1197 percentScrolled = destY / (contentHeight - paneHeight); 1198 positionDragY(percentScrolled * dragMaxY, animate); 1199 }, 1200 // Positions the horizontal drag at the specified x position (and updates the viewport to reflect 1201 // this). animate is optional and if not passed then the value of animateScroll from the settings 1202 // object this jScrollPane was initialised with is used. 1203 positionDragX: function(x, animate) 1204 { 1205 positionDragX(x, animate); 1206 }, 1207 // Positions the vertical drag at the specified y position (and updates the viewport to reflect 1208 // this). animate is optional and if not passed then the value of animateScroll from the settings 1209 // object this jScrollPane was initialised with is used. 1210 positionDragY: function(y, animate) 1211 { 1212 positionDragY(y, animate); 1213 }, 1214 // This method is called when jScrollPane is trying to animate to a new position. You can override 1215 // it if you want to provide advanced animation functionality. It is passed the following arguments: 1216 // * ele - the element whose position is being animated 1217 // * prop - the property that is being animated 1218 // * value - the value it's being animated to 1219 // * stepCallback - a function that you must execute each time you update the value of the property 1220 // You can use the default implementation (below) as a starting point for your own implementation. 1221 animate: function(ele, prop, value, stepCallback) 1222 { 1223 var params = {}; 1224 params[prop] = value; 1225 ele.animate( 1226 params, 1227 { 1228 'duration' : settings.animateDuration, 1229 'ease' : settings.animateEase, 1230 'queue' : false, 1231 'step' : stepCallback 1232 } 1233 ); 1234 }, 1235 // Returns the current x position of the viewport with regards to the content pane. 1236 getContentPositionX: function() 1237 { 1238 return contentPositionX(); 1239 }, 1240 // Returns the current y position of the viewport with regards to the content pane. 1241 getContentPositionY: function() 1242 { 1243 return contentPositionY(); 1244 }, 1245 // Returns the width of the content within the scroll pane. 1246 getContentWidth: function() 1247 { 1248 return contentWidth; 1249 }, 1250 // Returns the height of the content within the scroll pane. 1251 getContentHeight: function() 1252 { 1253 return contentHeight; 1254 }, 1255 // Returns the horizontal position of the viewport within the pane content. 1256 getPercentScrolledX: function() 1257 { 1258 return contentPositionX() / (contentWidth - paneWidth); 1259 }, 1260 // Returns the vertical position of the viewport within the pane content. 1261 getPercentScrolledY: function() 1262 { 1263 return contentPositionY() / (contentHeight - paneHeight); 1264 }, 1265 // Returns whether or not this scrollpane has a horizontal scrollbar. 1266 getIsScrollableH: function() 1267 { 1268 return isScrollableH; 1269 }, 1270 // Returns whether or not this scrollpane has a vertical scrollbar. 1271 getIsScrollableV: function() 1272 { 1273 return isScrollableV; 1274 }, 1275 // Gets a reference to the content pane. It is important that you use this method if you want to 1276 // edit the content of your jScrollPane as if you access the element directly then you may have some 1277 // problems (as your original element has had additional elements for the scrollbars etc added into 1278 // it). 1279 getContentPane: function() 1280 { 1281 return pane; 1282 }, 1283 // Scrolls this jScrollPane down as far as it can currently scroll. If animate isn't passed then the 1284 // animateScroll value from settings is used instead. 1285 scrollToBottom: function(animate) 1286 { 1287 positionDragY(dragMaxY, animate); 1288 }, 1289 // Hijacks the links on the page which link to content inside the scrollpane. If you have changed 1290 // the content of your page (e.g. via AJAX) and want to make sure any new anchor links to the 1291 // contents of your scroll pane will work then call this function. 1292 hijackInternalLinks: function() 1293 { 1294 hijackInternalLinks(); 1295 }, 1296 // Removes the jScrollPane and returns the page to the state it was in before jScrollPane was 1297 // initialised. 1298 destroy: function() 1299 { 1300 destroy(); 1301 } 1302 } 1303 ); 1304 1305 initialise(s); 1306 } 1307 1308 // Pluginifying code... 1309 settings = $.extend({}, $.fn.jScrollPane.defaults, settings); 1310 1311 // Apply default speed 1312 $.each(['mouseWheelSpeed', 'arrowButtonSpeed', 'trackClickSpeed', 'keyboardSpeed'], function() { 1313 settings[this] = settings[this] || settings.speed; 1314 }); 1315 1316 return this.each( 1317 function() 1318 { 1319 var elem = $(this), jspApi = elem.data('jsp'); 1320 if (jspApi) { 1321 jspApi.reinitialise(settings); 1322 } else { 1323 jspApi = new JScrollPane(elem, settings); 1324 elem.data('jsp', jspApi); 1325 } 1326 } 1327 ); 1328 }; 1329 1330 $.fn.jScrollPane.defaults = { 1331 showArrows : false, 1332 maintainPosition : true, 1333 stickToBottom : false, 1334 stickToRight : false, 1335 clickOnTrack : true, 1336 autoReinitialise : false, 1337 autoReinitialiseDelay : 500, 1338 verticalDragMinHeight : 0, 1339 verticalDragMaxHeight : 99999, 1340 horizontalDragMinWidth : 0, 1341 horizontalDragMaxWidth : 99999, 1342 contentWidth : undefined, 1343 animateScroll : false, 1344 animateDuration : 300, 1345 animateEase : 'linear', 1346 hijackInternalLinks : false, 1347 verticalGutter : 4, 1348 horizontalGutter : 4,
vendor: 20,543 bytes, lines 1349-1408
1349 mouseWheelSpeed : 0, 1350 arrowButtonSpeed : 0, 1351 arrowRepeatFreq : 50, 1352 arrowScrollOnHover : false, 1353 trackClickSpeed : 0, 1354 trackClickRepeatFreq : 70, 1355 verticalArrowPositions : 'split', 1356 horizontalArrowPositions : 'split', 1357 enableKeyboardNavigation : true, 1358 hideFocus : false, 1359 keyboardSpeed : 0, 1360 initialDelay : 300, // Delay before starting repeating 1361 speed : 30, // Default speed when others falsey 1362 scrollPagePercent : .8 // Percent of visible area scrolled when pageUp/Down or track area pressed 1363 }; 1364 1365})(jQuery,this); 1366 1367/* End */ 1368; 1369; /* Start:"a:4:{s:4:"full";s:78:"/local/templates/voenchast/js/fancybox/jquery.fancybox.pack.js?166624702423242";s:6:"source";s:62:"/local/templates/voenchast/js/fancybox/jquery.fancybox.pack.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1370/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 1371(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0<a.indexOf("%")},m=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return m(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:0,margin:20, 1372width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!t,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, 1373keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ 1374(J?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 1375openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 1376isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("<div/>").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, 1377f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): 1378"html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), 1379b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& 1380(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index<b.group.length-1)&&(b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")):c()},next:function(a){var d=b.current;d&&(r(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d= 1381b.current;d&&(r(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=m(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, 1382update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), 1383b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& 1384b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= 1385e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1<a.group.length&&l[c]!==w)return b[d](l[c]),e.preventDefault(),!1;if(-1<f.inArray(c,l))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,l,g){for(var h=f(d.target||null),k=!1;h.length&&!(k||h.is(".fancybox-skin")||h.is(".fancybox-wrap"));)k=h[0]&&!(h[0].style.overflow&& 1386"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1<b.group.length&&!a.canShrink&&(0<g||0<l?b.prev(0<g?"down":"left"):(0>g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& 1387b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, 1388c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== 1389c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); 1390if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= 1391this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, 1392d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| 1393b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 1394b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", 1395!1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); 1396a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, 1397q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", 1398"hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),c<n&&(c=n,k=m(c/ 1399E)),k<v&&(k=v,c=m(k*E))):(c=Math.max(n,Math.min(c,p)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),k=g.height()),k=Math.max(v,Math.min(k,q)));if(h.fitToView)if(g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height(),h.aspectRatio)for(;(a>A||z>s)&&c>n&&k>v&&!(19<d++);)k=Math.max(v,Math.min(q,k-10)),c=m(k*E),c<n&&(c=n,k=m(c/E)),c>p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&k<B&& 1400c+y+r<A&&(c+=r);g.width(c).height(k);e.width(c+y);a=e.width();z=e.height();e=(a>A||z>s)&&c>n&&k>v;c=h.aspectRatio?c<G&&k<C&&c<D&&k<B:(c<G||k<C)&&(c<D||k<B);f.extend(h,{dim:{width:x(a),height:x(z)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:w,wrapSpace:z-l.outerHeight(!0),skinSpace:l.height()-k});!I&&h.autoHeight&&k>v&&k<q&&!c&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute", 1401top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){f(d.target).is("a")||f(d.target).parent().is("a")|| 1402(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),a.loop||a.index!==a.group.length-1)?b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play(!0)):b.play(!1))}, 1403_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,k=a.wPadding,n=b.getViewport();!e&&a.isDom&&d.is(":visible")&&(e=d.find("img:first"),e.length||(e=d));u(e)?(c=e.offset(),e.is("img")&& 1404(f=e.outerWidth(),g=e.outerHeight())):(c.top=n.y+(n.h-g)*a.topRatio,c.left=n.x+(n.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=n.y,c.left-=n.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-k*a.leftRatio),width:x(f+k),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](m("width"=== 1405f?c:c-g*e)),b.inner[f](m("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,l=f.extend({opacity:1},d);delete l.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(l,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&& 1406(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(m(e[g])-200),c[g]="+=200px"):(e[g]=x(m(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})}, 1407changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!t,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){var d;a=f.extend({},this.defaults,a);this.overlay&& 1408this.close();d=b.coming?b.coming.parent:a.parent;this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay",
1409function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); 1410J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== 1411f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", 1412position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": 1413"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", 1414"click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"), 1415b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px !important;}</style>").appendTo("head")})})(window,document,jQuery); 1416/* End */ 1417; 1418; /* Start:"a:4:{s:4:"full";s:66:"/local/templates/voenchast/js/jquery.maskedinput.js?16662470247207";s:6:"source";s:51:"/local/templates/voenchast/js/jquery.maskedinput.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1419function getPasteEvent() { 1420 var el = document.createElement('input'), 1421 name = 'onpaste'; 1422 el.setAttribute(name, ''); 1423 return (typeof el[name] === 'function')?'paste':'input'; 1424} 1425 1426var pasteEventName = getPasteEvent() + ".mask", 1427 ua = navigator.userAgent, 1428 iPhone = /iphone/i.test(ua), 1429 android=/android/i.test(ua), 1430 caretTimeoutId; 1431 1432$.mask = { 1433 //Predefined character definitions 1434 definitions: { 1435 '9': "[0-9]", 1436 'a': "[A-Za-z]", 1437 '*': "[A-Za-z0-9]" 1438 }, 1439 dataName: "rawMaskFn", 1440 placeholder: '_', 1441}; 1442 1443$.fn.extend({ 1444 //Helper Function for Caret positioning 1445 caret: function(begin, end) { 1446 var range; 1447 1448 if (this.length === 0 || this.is(":hidden")) { 1449 return; 1450 } 1451 1452 if (typeof begin == 'number') { 1453 end = (typeof end === 'number') ? end : begin; 1454 return this.each(function() { 1455 if (this.setSelectionRange) { 1456 this.setSelectionRange(begin, end); 1457 } else if (this.createTextRange) { 1458 range = this.createTextRange(); 1459 range.collapse(true); 1460 range.moveEnd('character', end); 1461 range.moveStart('character', begin); 1462 range.select(); 1463 } 1464 }); 1465 } else { 1466 if (this[0].setSelectionRange) { 1467 begin = this[0].selectionStart; 1468 end = this[0].selectionEnd; 1469 } else if (document.selection && document.selection.createRange) { 1470 range = document.selection.createRange(); 1471 begin = 0 - range.duplicate().moveStart('character', -100000); 1472 end = begin + range.text.length; 1473 } 1474 return { begin: begin, end: end }; 1475 } 1476 }, 1477 unmask: function() { 1478 return this.trigger("unmask"); 1479 }, 1480 mask: function(mask, settings) { 1481 var input, 1482 defs, 1483 tests, 1484 partialPosition, 1485 firstNonMaskPos, 1486 len; 1487 1488 if (!mask && this.length > 0) { 1489 input = $(this[0]); 1490 return input.data($.mask.dataName)(); 1491 } 1492 settings = $.extend({ 1493 placeholder: $.mask.placeholder, // Load default placeholder 1494 completed: null 1495 }, settings); 1496 1497 1498 defs = $.mask.definitions; 1499 tests = []; 1500 partialPosition = len = mask.length; 1501 firstNonMaskPos = null; 1502 1503 $.each(mask.split(""), function(i, c) { 1504 if (c == '?') { 1505 len--; 1506 partialPosition = i; 1507 } else if (defs[c]) { 1508 tests.push(new RegExp(defs[c])); 1509 if (firstNonMaskPos === null) { 1510 firstNonMaskPos = tests.length - 1; 1511 } 1512 } else { 1513 tests.push(null); 1514 } 1515 }); 1516 1517 return this.trigger("unmask").each(function() { 1518 var input = $(this), 1519 buffer = $.map( 1520 mask.split(""), 1521 function(c, i) { 1522 if (c != '?') { 1523 return defs[c] ? settings.placeholder : c; 1524 } 1525 }), 1526 focusText = input.val(); 1527 1528 function seekNext(pos) { 1529 while (++pos < len && !tests[pos]); 1530 return pos; 1531 } 1532 1533 function seekPrev(pos) { 1534 while (--pos >= 0 && !tests[pos]); 1535 return pos; 1536 } 1537 1538 function shiftL(begin,end) { 1539 var i, 1540 j; 1541 1542 if (begin<0) { 1543 return; 1544 } 1545 1546 for (i = begin, j = seekNext(end); i < len; i++) { 1547 if (tests[i]) { 1548 if (j < len && tests[i].test(buffer[j])) { 1549 buffer[i] = buffer[j]; 1550 buffer[j] = settings.placeholder; 1551 } else { 1552 break; 1553 } 1554 1555 j = seekNext(j); 1556 } 1557 } 1558 writeBuffer(); 1559 input.caret(Math.max(firstNonMaskPos, begin)); 1560 } 1561 1562 function shiftR(pos) { 1563 var i, 1564 c, 1565 j, 1566 t; 1567 1568 for (i = pos, c = settings.placeholder; i < len; i++) { 1569 if (tests[i]) { 1570 j = seekNext(i); 1571 t = buffer[i]; 1572 buffer[i] = c; 1573 if (j < len && tests[j].test(t)) { 1574 c = t; 1575 } else { 1576 break; 1577 } 1578 } 1579 } 1580 } 1581 1582 function keydownEvent(e) { 1583 var k = e.which, 1584 pos, 1585 begin, 1586 end; 1587 1588 //backspace, delete, and escape get special treatment 1589 if (k === 8 || k === 46 || (iPhone && k === 127)) { 1590 pos = input.caret(); 1591 begin = pos.begin; 1592 end = pos.end; 1593 1594 if (end - begin === 0) { 1595 begin=k!==46?seekPrev(begin):(end=seekNext(begin-1));
1596 end=k===46?seekNext(end):end; 1597 } 1598 clearBuffer(begin, end); 1599 shiftL(begin, end - 1); 1600 1601 e.preventDefault(); 1602 } else if (k == 27) {//escape 1603 input.val(focusText); 1604 input.caret(0, checkVal()); 1605 e.preventDefault(); 1606 } 1607 } 1608 1609 function keypressEvent(e) { 1610 var k = e.which, 1611 pos = input.caret(), 1612 p, 1613 c, 1614 next; 1615 1616 if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore 1617 return; 1618 } else if (k) { 1619 if (pos.end - pos.begin !== 0){ 1620 clearBuffer(pos.begin, pos.end); 1621 shiftL(pos.begin, pos.end-1); 1622 } 1623 1624 p = seekNext(pos.begin - 1); 1625 if (p < len) { 1626 c = String.fromCharCode(k); 1627 if (tests[p].test(c)) { 1628 shiftR(p); 1629 1630 buffer[p] = c; 1631 writeBuffer(); 1632 next = seekNext(p); 1633 1634 if(android){ 1635 setTimeout($.proxy($.fn.caret,input,next),0); 1636 }else{ 1637 input.caret(next); 1638 } 1639 1640 if (settings.completed && next >= len) { 1641 settings.completed.call(input); 1642 } 1643 } 1644 } 1645 e.preventDefault(); 1646 } 1647 } 1648 1649 function clearBuffer(start, end) { 1650 var i; 1651 for (i = start; i < end && i < len; i++) { 1652 if (tests[i]) { 1653 buffer[i] = settings.placeholder; 1654 } 1655 } 1656 } 1657 1658 function writeBuffer() { input.val(buffer.join('')); } 1659 1660 function checkVal(allow) { 1661 //try to place characters where they belong 1662 var test = input.val(), 1663 lastMatch = -1, 1664 i, 1665 c; 1666 1667 for (i = 0, pos = 0; i < len; i++) { 1668 if (tests[i]) { 1669 buffer[i] = settings.placeholder; 1670 while (pos++ < test.length) { 1671 c = test.charAt(pos - 1); 1672 if (tests[i].test(c)) { 1673 buffer[i] = c; 1674 lastMatch = i; 1675 break; 1676 } 1677 } 1678 if (pos > test.length) { 1679 break; 1680 } 1681 } else if (buffer[i] === test.charAt(pos) && i !== partialPosition) { 1682 pos++; 1683 lastMatch = i; 1684 } 1685 } 1686 if (allow) { 1687 writeBuffer(); 1688 } else if (lastMatch + 1 < partialPosition) { 1689 input.val(""); 1690 clearBuffer(0, len); 1691 } else { 1692 writeBuffer(); 1693 input.val(input.val().substring(0, lastMatch + 1)); 1694 } 1695 return (partialPosition ? i : firstNonMaskPos); 1696 } 1697 1698 input.data($.mask.dataName,function(){ 1699 return $.map(buffer, function(c, i) { 1700 return tests[i]&&c!=settings.placeholder ? c : null; 1701 }).join(''); 1702 }); 1703 1704 if (!input.attr("readonly")) 1705 input 1706 .one("unmask", function() { 1707 input 1708 .unbind(".mask") 1709 .removeData($.mask.dataName); 1710 }) 1711 .bind("focus.mask", function() { 1712 clearTimeout(caretTimeoutId); 1713 var pos, 1714 moveCaret; 1715 1716 focusText = input.val(); 1717 pos = checkVal(); 1718 1719 caretTimeoutId = setTimeout(function(){ 1720 writeBuffer(); 1721 if (pos == mask.length) { 1722 input.caret(0, pos); 1723 } else { 1724 input.caret(pos); 1725 } 1726 }, 10); 1727 }) 1728 .bind("blur.mask", function() { 1729 checkVal(); 1730 if (input.val() != focusText) 1731 input.change(); 1732 }) 1733 .bind("keydown.mask", keydownEvent) 1734 .bind("keypress.mask", keypressEvent) 1735 .bind(pasteEventName, function() { 1736 setTimeout(function() { 1737 var pos=checkVal(true); 1738 input.caret(pos); 1739 if (settings.completed && pos == input.val().length) 1740 settings.completed.call(input); 1741 }, 0); 1742 }); 1743 checkVal(); //Perform initial check for existing values 1744 }); 1745 } 1746}); 1747 1748 1749/* End */ 1750; 1751; /* Start:"a:4:{s:4:"full";s:64:"/local/templates/voenchast/js/placeholders.min.js?16662470245103";s:6:"source";s:49:"/local/templates/voenchast/js/placeholders.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1752/* Placeholders.js v4.0.1 */ 1753/*! 1754 * The MIT License 1755 * 1756 * Copyright (c) 2012 James Allardice 1757 * 1758 * Permission is hereby granted, free of charge, to any person obtaining a copy 1759 * of this software and associated documentation files (the "Software"), to 1760 * deal in the Software without restriction, including without limitation the 1761 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 1762 * sell copies of the Software, and to permit persons to whom the Software is 1763 * furnished to do so, subject to the following conditions: 1764 * 1765 * The above copyright notice and this permission notice shall be included in 1766 * all copies or substantial portions of the Software. 1767 * 1768 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1769 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1770 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1771 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1772 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1773 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 1774 * IN THE SOFTWARE. 1775 */ 1776!function(a){"use strict";function b(){}function c(){try{return document.activeElement}catch(a){}}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return!0;return!1}function e(a,b,c){return a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):void 0}function f(a,b){var c;a.createTextRange?(c=a.createTextRange(),c.move("character",b),c.select()):a.selectionStart&&(a.focus(),a.setSelectionRange(b,b))}function g(a,b){try{return a.type=b,!0}catch(c){return!1}}function h(a,b){if(a&&a.getAttribute(B))b(a);else for(var c,d=a?a.getElementsByTagName("input"):N,e=a?a.getElementsByTagName("textarea"):O,f=d?d.length:0,g=e?e.length:0,h=f+g,i=0;h>i;i++)c=f>i?d[i]:e[i-f],b(c)}function i(a){h(a,k)}function j(a){h(a,l)}function k(a,b){var c=!!b&&a.value!==b,d=a.value===a.getAttribute(B);if((c||d)&&"true"===a.getAttribute(C)){a.removeAttribute(C),a.value=a.value.replace(a.getAttribute(B),""),a.className=a.className.replace(A,"");var e=a.getAttribute(I);parseInt(e,10)>=0&&(a.setAttribute("maxLength",e),a.removeAttribute(I));var f=a.getAttribute(D);return f&&(a.type=f),!0}return!1}function l(a){var b=a.getAttribute(B);if(""===a.value&&b){a.setAttribute(C,"true"),a.value=b,a.className+=" "+z;var c=a.getAttribute(I);c||(a.setAttribute(I,a.maxLength),a.removeAttribute("maxLength"));var d=a.getAttribute(D);return d?a.type="text":"password"===a.type&&g(a,"text")&&a.setAttribute(D,"password"),!0}return!1}function m(a){return function(){P&&a.value===a.getAttribute(B)&&"true"===a.getAttribute(C)?f(a,0):k(a)}}function n(a){return function(){l(a)}}function o(a){return function(){i(a)}}function p(a){return function(b){return v=a.value,"true"===a.getAttribute(C)&&v===a.getAttribute(B)&&d(x,b.keyCode)?(b.preventDefault&&b.preventDefault(),!1):void 0}}
1776function q(a){return function(){k(a,v),""===a.value&&(a.blur(),f(a,0))}}function r(a){return function(){a===c()&&a.value===a.getAttribute(B)&&"true"===a.getAttribute(C)&&f(a,0)}}function s(a){var b=a.form;b&&"string"==typeof b&&(b=document.getElementById(b),b.getAttribute(E)||(e(b,"submit",o(b)),b.setAttribute(E,"true"))),e(a,"focus",m(a)),e(a,"blur",n(a)),P&&(e(a,"keydown",p(a)),e(a,"keyup",q(a)),e(a,"click",r(a))),a.setAttribute(F,"true"),a.setAttribute(B,T),(P||a!==c())&&l(a)}var t=document.createElement("input"),u=void 0!==t.placeholder;if(a.Placeholders={nativeSupport:u,disable:u?b:i,enable:u?b:j},!u){var v,w=["text","search","url","tel","email","password","number","textarea"],x=[27,33,34,35,36,37,38,39,40,8,46],y="#ccc",z="placeholdersjs",A=new RegExp("(?:^|\\s)"+z+"(?!\\S)"),B="data-placeholder-value",C="data-placeholder-active",D="data-placeholder-type",E="data-placeholder-submit",F="data-placeholder-bound",G="data-placeholder-focus",H="data-placeholder-live",I="data-placeholder-maxlength",J=100,K=document.getElementsByTagName("head")[0],L=document.documentElement,M=a.Placeholders,N=document.getElementsByTagName("input"),O=document.getElementsByTagName("textarea"),P="false"===L.getAttribute(G),Q="false"!==L.getAttribute(H),R=document.createElement("style");R.type="text/css";var S=document.createTextNode("."+z+" {color:"+y+";}");R.styleSheet?R.styleSheet.cssText=S.nodeValue:R.appendChild(S),K.insertBefore(R,K.firstChild);for(var T,U,V=0,W=N.length+O.length;W>V;V++)U=V<N.length?N[V]:O[V-N.length],T=U.attributes.placeholder,T&&(T=T.nodeValue,T&&d(w,U.type)&&s(U));var X=setInterval(function(){for(var a=0,b=N.length+O.length;b>a;a++)U=a<N.length?N[a]:O[a-N.length],T=U.attributes.placeholder,T?(T=T.nodeValue,T&&d(w,U.type)&&(U.getAttribute(F)||s(U),(T!==U.getAttribute(B)||"password"===U.type&&!U.getAttribute(D))&&("password"===U.type&&!U.getAttribute(D)&&g(U,"text")&&U.setAttribute(D,"password"),U.value===U.getAttribute(B)&&(U.value=T),U.setAttribute(B,T)))):U.getAttribute(C)&&(k(U),U.removeAttribute(B));Q||clearInterval(X)},J);e(a,"beforeunload",function(){M.disable()})}}(this); 1777/* End */ 1778; 1779; /* Start:"a:4:{s:4:"full";s:81:"/local/templates/voenchast/js/formstyler/jquery.formstyler.min.js?166624702418798";s:6:"source";s:65:"/local/templates/voenchast/js/formstyler/jquery.formstyler.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1780/* jQuery Form Styler v1.7.6 | (c) Dimox | https://github.com/Dimox/jQueryFormStyler */ 1781!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";function t(t,s){this.element=t,this.options=e.extend({},l,s),this.init()}function s(t){if(!e(t.target).parents().hasClass("jq-selectbox")&&"OPTION"!=t.target.nodeName&&e("div.jq-selectbox.opened").length){var s=e("div.jq-selectbox.opened"),l=e("div.jq-selectbox__search input",s),o=e("div.jq-selectbox__dropdown",s),a=s.find("select").data("_"+i).options;a.onSelectClosed.call(s),l.length&&l.val("").keyup(),o.hide().find("li.sel").addClass("selected"),s.removeClass("focused opened dropup dropdown")}}var i="styler",l={idSuffix:"-styler",filePlaceholder:"Файл не вÑбÑан",fileBrowse:"ÐбзоÑ...",fileNumber:"ÐÑбÑано Ñайлов: %s",selectPlaceholder:"ÐÑбеÑиÑе...",selectSearch:!1,selectSearchLimit:10,selectSearchNotFound:"Совпадений не найдено",selectSearchPlaceholder:"ÐоиÑк...",selectVisibleOptions:0,singleSelectzIndex:"100",selectSmartPositioning:!0,onSelectOpened:function(){},onSelectClosed:function(){},onFormStyled:function(){}};t.prototype={init:function(){function t(){void 0!==i.attr("id")&&""!==i.attr("id")&&(this.id=i.attr("id")+l.idSuffix),this.title=i.attr("title"),this.classes=i.attr("class"),this.data=i.data()}var i=e(this.element),l=this.options,o=!(!navigator.userAgent.match(/(iPad|iPhone|iPod)/i)||navigator.userAgent.match(/(Windows\sPhone)/i)),a=!(!navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/(Windows\sPhone)/i));if(i.is(":checkbox")){var d=function(){var s=new t,l=e('<div class="jq-checkbox"><div class="jq-checkbox__div"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(l).prependTo(l),l.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative",overflow:"hidden"}),i.is(":checked")&&l.addClass("checked"),i.is(":disabled")&&l.addClass("disabled"),l.click(function(e){e.preventDefault(),l.is(".disabled")||(i.is(":checked")?(i.prop("checked",!1),l.removeClass("checked")):(i.prop("checked",!0),l.addClass("checked")),i.focus().change())}),i.closest("label").add('label[for="'+i.attr("id")+'"]').on("click.styler",function(t){e(t.target).is("a")||e(t.target).closest(l).length||(l.triggerHandler("click"),t.preventDefault())}),i.on("change.styler",function(){i.is(":checked")?l.addClass("checked"):l.removeClass("checked")}).on("keydown.styler",function(e){32==e.which&&l.click()}).on("focus.styler",function(){l.is(".disabled")||l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")})};d(),i.on("refresh",function(){i.closest("label").add('label[for="'+i.attr("id")+'"]').off(".styler"),i.off(".styler").parent().before(i).remove(),d()})}else if(i.is(":radio")){var n=function(){var s=new t,l=e('<div class="jq-radio"><div class="jq-radio__div"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({position:"absolute",zIndex:"-1",opacity:0,margin:0,padding:0}).after(l).prependTo(l),l.attr("unselectable","on").css({"-webkit-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","-o-user-select":"none","user-select":"none",display:"inline-block",position:"relative"}),i.is(":checked")&&l.addClass("checked"),i.is(":disabled")&&l.addClass("disabled"),e.fn.commonParents=function(){var t=this;return t.first().parents().filter(function(){return e(this).find(t).length===t.length})},e.fn.commonParent=function(){return e(this).commonParents().first()},l.click(function(t){if(t.preventDefault(),!l.is(".disabled")){var s=e('input[name="'+i.attr("name")+'"]');s.commonParent().find(s).prop("checked",!1).parent().removeClass("checked"),i.prop("checked",!0).parent().addClass("checked"),i.focus().change()}}),i.closest("label").add('label[for="'+i.attr("id")+'"]').on("click.styler",function(t){e(t.target).is("a")||e(t.target).closest(l).length||(l.triggerHandler("click"),t.preventDefault())}),i.on("change.styler",function(){i.parent().addClass("checked")}).on("focus.styler",function(){l.is(".disabled")||l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")})};n(),i.on("refresh",function(){i.closest("label").add('label[for="'+i.attr("id")+'"]').off(".styler"),i.off(".styler").parent().before(i).remove(),n()})}else if(i.is(":file")){i.css({position:"absolute",top:0,right:0,margin:0,padding:0,opacity:0,fontSize:"100px"});var r=function(){var s=new t,o=i.data("placeholder");void 0===o&&(o=l.filePlaceholder);var a=i.data("browse");void 0!==a&&""!==a||(a=l.fileBrowse);var d=e('<div class="jq-file"><div class="jq-file__name">'+o+'</div><div class="jq-file__browse">'+a+"</div></div>").css({display:"inline-block",position:"relative",overflow:"hidden"}).attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.after(d).appendTo(d),i.is(":disabled")&&d.addClass("disabled"),i.on("change.styler",function(){var t=i.val(),s=e("div.jq-file__name",d);if(i.is("[multiple]")){t="";var a=i[0].files.length;if(a>0){var n=i.data("number");void 0===n&&(n=l.fileNumber),n=n.replace("%s",a),t=n}}s.text(t.replace(/.+[\\\/]/,"")),""===t?(s.text(o),d.removeClass("changed")):d.addClass("changed")}).on("focus.styler",function(){d.addClass("focused")}).on("blur.styler",function(){d.removeClass("focused")}).on("click.styler",function(){d.removeClass("focused")})};r(),i.on("refresh",function(){i.off(".styler").parent().before(i).remove(),r()})}else if(i.is('input[type="number"]')){var c=function(){var s=new t,l=e('<div class="jq-number"><div class="jq-number__spin minus"></div><div class="jq-number__spin plus"></div></div>').attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.after(l).prependTo(l).wrap('<div class="jq-number__field"></div>'),i.is(":disabled")&&l.addClass("disabled");var o,a,d,n=null,r=null;void 0!==i.attr("min")&&(o=i.attr("min")),void 0!==i.attr("max")&&(a=i.attr("max")),d=void 0!==i.attr("step")&&e.isNumeric(i.attr("step"))?Number(i.attr("step")):Number(1);var c=function(t){var s,l=i.val();e.isNumeric(l)||(l=0,i.val("0")),t.is(".minus")?s=Number(l)-d:t.is(".plus")&&(s=Number(l)+d);var n=(d.toString().split(".")[1]||[]).length;if(n>0){for(var r="1";r.length<=n;)r+="0";s=Math.round(s*r)/r}e.isNumeric(o)&&e.isNumeric(a)?s>=o&&a>=s&&i.val(s):e.isNumeric(o)&&!e.isNumeric(a)?s>=o&&i.val(s):!e.isNumeric(o)&&e.isNumeric(a)?a>=s&&i.val(s):i.val(s)};l.is(".disabled")||(l.on("mousedown","div.jq-number__spin",function(){var t=e(this);c(t),n=setTimeout(function(){r=setInterval(function(){c(t)},40)},350)}).on("mouseup mouseout","div.jq-number__spin",function(){clearTimeout(n),clearInterval(r)}).on("mouseup","div.jq-number__spin",function(){i.change()}),i.on("focus.styler",function(){l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")}))};
1781c(),i.on("refresh",function(){i.off(".styler").closest(".jq-number").before(i).remove(),c()})}else if(i.is("select")){var f=function(){function d(t){t.off("mousewheel DOMMouseScroll").on("mousewheel DOMMouseScroll",function(t){var s=null;"mousewheel"==t.type?s=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"==t.type&&(s=40*t.originalEvent.detail),s&&(t.stopPropagation(),t.preventDefault(),e(this).scrollTop(s+e(this).scrollTop()))})}function n(){for(var e=0;e<f.length;e++){var t=f.eq(e),s="",i="",o="",a="",d="",n="",r="",c="",u="",p="disabled",v="selected sel disabled";t.prop("selected")&&(i="selected sel"),t.is(":disabled")&&(i=p),t.is(":selected:disabled")&&(i=v),void 0!==t.attr("id")&&""!==t.attr("id")&&(a=' id="'+t.attr("id")+l.idSuffix+'"'),void 0!==t.attr("title")&&""!==f.attr("title")&&(d=' title="'+t.attr("title")+'"'),void 0!==t.attr("class")&&(r=" "+t.attr("class"),u=' data-jqfs-class="'+t.attr("class")+'"');var m=t.data();for(var g in m)""!==m[g]&&(n+=" data-"+g+'="'+m[g]+'"');i+r!==""&&(o=' class="'+i+r+'"'),s="<li"+u+n+o+d+a+">"+t.html()+"</li>",t.parent().is("optgroup")&&(void 0!==t.parent().attr("class")&&(c=" "+t.parent().attr("class")),s="<li"+u+n+' class="'+i+r+" option"+c+'"'+d+a+">"+t.html()+"</li>",t.is(":first-child")&&(s='<li class="optgroup'+c+'">'+t.parent().attr("label")+"</li>"+s)),h+=s}}function r(){var a=new t,r="",c=i.data("placeholder"),u=i.data("search"),p=i.data("search-limit"),v=i.data("search-not-found"),m=i.data("search-placeholder"),g=i.data("z-index"),b=i.data("smart-positioning");void 0===c&&(c=l.selectPlaceholder),void 0!==u&&""!==u||(u=l.selectSearch),void 0!==p&&""!==p||(p=l.selectSearchLimit),void 0!==v&&""!==v||(v=l.selectSearchNotFound),void 0===m&&(m=l.selectSearchPlaceholder),void 0!==g&&""!==g||(g=l.singleSelectzIndex),void 0!==b&&""!==b||(b=l.selectSmartPositioning);var y=e('<div class="jq-selectbox jqselect"><div class="jq-selectbox__select" style="position: relative"><div class="jq-selectbox__select-text"></div><div class="jq-selectbox__trigger"><div class="jq-selectbox__trigger-arrow"></div></div></div></div>').css({display:"inline-block",position:"relative",zIndex:g}).attr({id:a.id,title:a.title}).addClass(a.classes).data(a.data);i.css({margin:0,padding:0}).after(y).prependTo(y);
vendor: 9,730 bytes, lines 1781-1785
1781var C=e("div.jq-selectbox__select",y),x=e("div.jq-selectbox__select-text",y),w=f.filter(":selected");n(),u&&(r='<div class="jq-selectbox__search"><input type="search" autocomplete="off" placeholder="'+m+'"></div><div class="jq-selectbox__not-found">'+v+"</div>");var q=e('<div class="jq-selectbox__dropdown" style="position: absolute">'+r+'<ul style="position: relative; list-style: none; overflow: auto; overflow-x: hidden">'+h+"</ul></div>");y.append(q);var _=e("ul",q),j=e("li",q),k=e("input",q),S=e("div.jq-selectbox__not-found",q).hide();j.length<p&&k.parent().hide(),""===f.first().text()&&f.first().is(":selected")?x.text(c).addClass("placeholder"):x.text(w.text());var T=0,P=0;if(j.css({display:"inline-block"}),j.each(function(){var t=e(this);t.innerWidth()>T&&(T=t.innerWidth(),P=t.width())}),j.css({display:""}),x.is(".placeholder")&&x.width()>T)x.width(x.width());else{var N=y.clone().appendTo("body").width("auto"),A=N.outerWidth();N.remove(),A==y.outerWidth()&&x.width(P)}T>y.width()&&q.width(T),""===f.first().text()&&""!==i.data("placeholder")&&j.first().hide(),i.css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0});var D=y.outerHeight(!0),I=k.parent().outerHeight(!0),H=_.css("max-height"),z=j.filter(".selected");z.length<1&&j.first().addClass("selected sel"),void 0===j.data("li-height")&&j.data("li-height",j.outerHeight());var K=q.css("top");if("auto"==q.css("left")&&q.css({left:0}),"auto"==q.css("top")&&(q.css({top:D}),K=D),q.hide(),z.length&&(f.first().text()!=w.text()&&y.addClass("changed"),y.data("jqfs-class",z.data("jqfs-class")),y.addClass(z.data("jqfs-class"))),i.is(":disabled"))return y.addClass("disabled"),!1;C.click(function(){if(e("div.jq-selectbox").filter(".opened").length&&l.onSelectClosed.call(e("div.jq-selectbox").filter(".opened")),i.focus(),!o){var t=e(window),s=j.data("li-height"),a=y.offset().top,n=t.height()-D-(a-t.scrollTop()),r=i.data("visible-options");void 0!==r&&""!==r||(r=l.selectVisibleOptions);var c=5*s,h=s*r;r>0&&6>r&&(c=h),0===r&&(h="auto");var u=function(){q.height("auto").css({bottom:"auto",top:K});var e=function(){_.css("max-height",Math.floor((n-20-I)/s)*s)};e(),_.css("max-height",h),"none"!=H&&_.css("max-height",H),n<q.outerHeight()+20&&e()},p=function(){q.height("auto").css({top:"auto",bottom:K});var e=function(){_.css("max-height",Math.floor((a-t.scrollTop()-20-I)/s)*s)};e(),_.css("max-height",h),"none"!=H&&_.css("max-height",H),a-t.scrollTop()-20<q.outerHeight()+20&&e()};b===!0||1===b?n>c+I+20?(u(),y.removeClass("dropup").addClass("dropdown")):(p(),y.removeClass("dropdown").addClass("dropup")):b!==!1&&0!==b||n>c+I+20&&(u(),y.removeClass("dropup").addClass("dropdown")),y.offset().left+q.outerWidth()>t.width()&&q.css({left:"auto",right:0}),e("div.jqselect").css({zIndex:g-1}).removeClass("opened"),y.css({zIndex:g}),q.is(":hidden")?(e("div.jq-selectbox__dropdown:visible").hide(),q.show(),y.addClass("opened focused"),l.onSelectOpened.call(y)):(q.hide(),y.removeClass("opened dropup dropdown"),e("div.jq-selectbox").filter(".opened").length&&l.onSelectClosed.call(y)),k.length&&(k.val("").keyup(),S.hide(),k.keyup(function(){var t=e(this).val();j.each(function(){e(this).html().match(new RegExp(".*?"+t+".*?","i"))?e(this).show():e(this).hide()}),""===f.first().text()&&""!==i.data("placeholder")&&j.first().hide(),j.filter(":visible").length<1?S.show():S.hide()})),j.filter(".selected").length&&(""===i.val()?_.scrollTop(0):(_.innerHeight()/s%2!==0&&(s/=2),_.scrollTop(_.scrollTop()+j.filter(".selected").position().top-_.innerHeight()/2+s))),d(_)}}),j.hover(function(){e(this).siblings().removeClass("selected")});var M=j.filter(".selected").text();j.filter(":not(.disabled):not(.optgroup)").click(function(){i.focus();var t=e(this),s=t.text();if(!t.is(".selected")){var o=t.index();o-=t.prevAll(".optgroup").length,t.addClass("selected sel").siblings().removeClass("selected sel"),f.prop("selected",!1).eq(o).prop("selected",!0),M=s,x.text(s),y.data("jqfs-class")&&y.removeClass(y.data("jqfs-class")),y.data("jqfs-class",t.data("jqfs-class")),y.addClass(t.data("jqfs-class")),i.change()}q.hide(),y.removeClass("opened dropup dropdown"),l.onSelectClosed.call(y)}),q.mouseout(function(){e("li.sel",q).addClass("selected")}),i.on("change.styler",function(){x.text(f.filter(":selected").text()).removeClass("placeholder"),j.removeClass("selected sel").not(".optgroup").eq(i[0].selectedIndex).addClass("selected sel"),f.first().text()!=j.filter(".selected").text()?y.addClass("changed"):y.removeClass("changed")}).on("focus.styler",function(){y.addClass("focused"),e("div.jqselect").not(".focused").removeClass("opened dropup dropdown").find("div.jq-selectbox__dropdown").hide()}).on("blur.styler",function(){y.removeClass("focused")}).on("keydown.styler keyup.styler",function(e){var t=j.data("li-height");""===i.val()?x.text(c).addClass("placeholder"):x.text(f.filter(":selected").text()),j.removeClass("selected sel").not(".optgroup").eq(i[0].selectedIndex).addClass("selected sel"),38!=e.which&&37!=e.which&&33!=e.which&&36!=e.which||(""===i.val()?_.scrollTop(0):_.scrollTop(_.scrollTop()+j.filter(".selected").position().top)),40!=e.which&&39!=e.which&&34!=e.which&&35!=e.which||_.scrollTop(_.scrollTop()+j.filter(".selected").position().top-_.innerHeight()+t),13==e.which&&(e.preventDefault(),q.hide(),y.removeClass("opened dropup dropdown"),l.onSelectClosed.call(y))}).on("keydown.styler",function(e){32==e.which&&(e.preventDefault(),C.click())}),s.registered||(e(document).on("click",s),s.registered=!0)}function c(){var s=new t,l=e('<div class="jq-select-multiple jqselect"></div>').css({display:"inline-block",position:"relative"}).attr({id:s.id,title:s.title}).addClass(s.classes).data(s.data);i.css({margin:0,padding:0}).after(l),n(),l.append("<ul>"+h+"</ul>");var o=e("ul",l).css({position:"relative","overflow-x":"hidden","-webkit-overflow-scrolling":"touch"}),a=e("li",l).attr("unselectable","on"),r=i.attr("size"),c=o.outerHeight(),u=a.outerHeight();void 0!==r&&r>0?o.css({height:u*r}):o.css({height:4*u}),c>l.height()&&(o.css("overflowY","scroll"),d(o),a.filter(".selected").length&&o.scrollTop(o.scrollTop()+a.filter(".selected").position().top)),i.prependTo(l).css({position:"absolute",left:0,top:0,width:"100%",height:"100%",opacity:0}),i.is(":disabled")?(l.addClass("disabled"),f.each(function(){e(this).is(":selected")&&a.eq(e(this).index()).addClass("selected")})):(a.filter(":not(.disabled):not(.optgroup)").click(function(t){i.focus();var s=e(this);if(t.ctrlKey||t.metaKey||s.addClass("selected"),t.shiftKey||s.addClass("first"),t.ctrlKey||t.metaKey||t.shiftKey||s.siblings().removeClass("selected first"),(t.ctrlKey||t.metaKey)&&(s.is(".selected")?s.removeClass("selected first"):s.addClass("selected first"),s.siblings().removeClass("first")),t.shiftKey){var l=!1,o=!1;s.siblings().removeClass("selected").siblings(".first").addClass("selected"),s.prevAll().each(function(){e(this).is(".first")&&(l=!0)}),s.nextAll().each(function(){e(this).is(".first")&&(o=!0)}),l&&s.prevAll().each(function(){return e(this).is(".selected")?!1:void e(this).not(".disabled, .optgroup").addClass("selected")}),o&&s.nextAll().each(function(){return e(this).is(".selected")?!1:void e(this).not(".disabled, .optgroup").addClass("selected")}),1==a.filter(".selected").length&&s.addClass("first")}f.prop("selected",!1),a.filter(".selected").each(function(){var t=e(this),s=t.index();t.is(".option")&&(s-=t.prevAll(".optgroup").length),f.eq(s).prop("selected",!0)}),i.change()}),f.each(function(t){e(this).data("optionIndex",t)}),i.on("change.styler",function(){a.removeClass("selected");var t=[];f.filter(":selected").each(function(){t.push(e(this).data("optionIndex"))}),a.not(".optgroup").filter(function(s){return e.inArray(s,t)>-1}).addClass("selected")}).on("focus.styler",function(){l.addClass("focused")}).on("blur.styler",function(){l.removeClass("focused")}),c>l.height()&&i.on("keydown.styler",function(e){38!=e.which&&37!=e.which&&33!=e.which||o.scrollTop(o.scrollTop()+a.filter(".selected").position().top-u),40!=e.which&&39!=e.which&&34!=e.which||o.scrollTop(o.scrollTop()+a.filter(".selected:last").position().top-o.innerHeight()+2*u)}))}var f=e("option",i),h="";if(i.is("[multiple]")){if(a||o)return;c()}else r()};f(),i.on("refresh",function(){i.off(".styler").parent().before(i).remove(),f()})}else i.is(":reset")&&i.on("click",function(){setTimeout(function(){i.closest("form").find("input, select").trigger("refresh")},1)})},destroy:function(){var t=e(this.element);t.is(":checkbox")||t.is(":radio")?(t.removeData("_"+i).off(".styler refresh").removeAttr("style").parent().before(t).remove(),t.closest("label").add('label[for="'+t.attr("id")+'"]').off(".styler")):t.is('input[type="number"]')?t.removeData("_"+i).off(".styler refresh").closest(".jq-number").before(t).remove():(t.is(":file")||t.is("select"))&&t.removeData("_"+i).off(".styler refresh").removeAttr("style").parent().before(t).remove()}},e.fn[i]=function(s){var l=arguments;if(void 0===s||"object"==typeof s)return this.each(function(){e.data(this,"_"+i)||e.data(this,"_"+i,new t(this,s))}).promise().done(function(){var t=e(this[0]).data("_"+i);t&&t.options.onFormStyled.call()}),this;if("string"==typeof s&&"_"!==s[0]&&"init"!==s){var o;return this.each(function(){var a=e.data(this,"_"+i);a instanceof t&&"function"==typeof a[s]&&(o=a[s].apply(a,Array.prototype.slice.call(l,1)))}),void 0!==o?o:this}},s.registered=!1}); 1782/* End */ 1783; 1784; /* Start:"a:4:{s:4:"full";s:89:"/local/templates/voenchast/js/magnific-popup/jquery.magnific-popup.min.js?166624702420216";s:6:"source";s:73:"/local/templates/voenchast/js/magnific-popup/jquery.magnific-popup.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1785/*! Magnific Popup - v1.1.0 - 2016-02-20
1786* http://dimsemenov.com/plugins/magnific-popup/ 1787* Copyright (c) 2016 Dmitry Semenov; */ 1788!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)}
1788,updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1
1788));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;
1788var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});
1788var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()}); 1789/* End */ 1790; 1791; /* Start:"a:4:{s:4:"full";s:58:"/local/templates/voenchast/js/tcal/tcal.js?166624702411829";s:6:"source";s:42:"/local/templates/voenchast/js/tcal/tcal.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 1792// Tigra Calendar v5.2 (11/20/2011) 1793// http://www.softcomplex.com/products/tigra_calendar/ 1794// License: Public Domain... You're welcome. 1795
1796// default settins - this structure can be moved in separate file in multilangual applications 1797var A_TCALCONF = { 1798 'cssprefix' : 'tcal', 1799 'months' : ['ЯнваÑÑ', 'ФевÑалÑ', 'ÐаÑÑ', 'ÐпÑелÑ', 'Ðай', 'ÐÑнÑ', 'ÐÑлÑ', 'ÐвгÑÑÑ', 'СенÑÑбÑÑ', 'ÐкÑÑбÑÑ', 'ÐоÑбÑÑ', 'ÐекабÑÑ'], 1800 'weekdays' : ['Ðн', 'ÐÑ', 'СÑ', 'ЧÑ', 'ÐÑ', 'Сб', 'ÐÑ'], 1801 'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 1802 'yearscroll' : true, // show year scroller 1803 'weekstart' : 0, // first day of week: 0-Su or 1-Mo 1804 'prevyear' : 'ÐÑедÑдÑÑий год', 1805 'nextyear' : 'СледÑÑÑий год', 1806 'prevmonth' : 'ÐÑедÑдÑÑий меÑÑÑ', 1807 'nextmonth' : 'СледÑÑÑий меÑÑÑ', 1808 'format' : 'd.m.Y' // 'd-m-Y', Y-m-d', 'l, F jS Y' 1809}; 1810 1811var A_TCALTOKENS = [ 1812 // A full numeric representation of a year, 4 digits 1813 {'t': 'Y', 'r': '19\\d{2}|20\\d{2}', 'p': function (d_date, n_value) { d_date.setFullYear(Number(n_value)); return d_date; }, 'g': function (d_date) { var n_year = d_date.getFullYear(); return n_year; }}, 1814 // Numeric representation of a month, with leading zeros 1815 {'t': 'm', 'r': '0?[1-9]|1[0-2]', 'p': function (d_date, n_value) { d_date.setMonth(Number(n_value) - 1); return d_date; }, 'g': function (d_date) { var n_month = d_date.getMonth() + 1; return (n_month < 10 ? '0' : '') + n_month }}, 1816 // A full textual representation of a month, such as January or March 1817 {'t': 'F', 'r': A_TCALCONF.months.join('|'), 'p': function (d_date, s_value) { for (var m = 0; m < 12; m++) if (A_TCALCONF.months[m] == s_value) { d_date.setMonth(m); return d_date; }}, 'g': function (d_date) { return A_TCALCONF.months[d_date.getMonth()]; }}, 1818 // Day of the month, 2 digits with leading zeros 1819 {'t': 'd', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return (n_date < 10 ? '0' : '') + n_date; }}, 1820 // Day of the month without leading zeros 1821 {'t': 'j', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return n_date; }}, 1822 // A full textual representation of the day of the week 1823 {'t': 'l', 'r': A_TCALCONF.longwdays.join('|'), 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { return A_TCALCONF.longwdays[d_date.getDay()]; }}, 1824 // English ordinal suffix for the day of the month, 2 characters 1825 {'t': 'S', 'r': 'st|nd|rd|th', 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { n_date = d_date.getDate(); if (n_date % 10 == 1 && n_date != 11) return 'st'; if (n_date % 10 == 2 && n_date != 12) return 'nd'; if (n_date % 10 == 3 && n_date != 13) return 'rd'; return 'th'; }} 1826 1827]; 1828 1829function f_tcalGetHTML (d_date) { 1830 1831 var e_input = f_tcalGetInputs(true); 1832 if (!e_input) return; 1833 1834 var s_pfx = A_TCALCONF.cssprefix, 1835 s_format = A_TCALCONF.format; 1836 1837 // today from config or client date 1838 var d_today = f_tcalParseDate(A_TCALCONF.today, A_TCALCONF.format); 1839 if (!d_today) 1840 d_today = f_tcalResetTime(new Date()); 1841 1842 // selected date from input or config or today 1843 var d_selected = f_tcalParseDate(e_input.value, s_format); 1844 if (!d_selected) 1845 d_selected = f_tcalParseDate(A_TCALCONF.selected, A_TCALCONF.format); 1846 if (!d_selected) 1847 d_selected = new Date(d_today); 1848 1849 // show calendar for passed or selected date 1850 d_date = d_date ? f_tcalResetTime(d_date) : new Date(d_selected); 1851 1852 var d_firstDay = new Date(d_date); 1853 d_firstDay.setDate(1); 1854 d_firstDay.setDate(1 - (7 + d_firstDay.getDay() - A_TCALCONF.weekstart) % 7); 1855 1856 var a_class, s_html = '<table id="' + s_pfx + 'Controls"><tbody><tr><td class="title2">' 1857 + A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear() 1858 + (A_TCALCONF.yearscroll ? '<span class="niz_22" onclick="f_niz_22()"></span></td>' : '') 1859 + '<td class="n2" id="' + s_pfx + 'PrevMonth"' + f_tcalRelDate(d_date, -1) + ' title="' + A_TCALCONF.prevmonth + '"><span></span></td><td><img src="/images/calc22.png" /></td>' 1860 1861 + '<td class="n3" id="' + s_pfx + 'NextMonth"' + f_tcalRelDate(d_date, 1) + ' title="' + A_TCALCONF.nextmonth + '"><span></span></td>' 1862 + (A_TCALCONF.yearscroll ? '' : '') 1863 + '</tr></tbody></table><table id="' + s_pfx + 'Grid"><tbody><tr>'; 1864 1865 // print weekdays titles 1866 for (var i = 0; i < 7; i++) 1867 s_html += '<th class="nh">' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '</th>'; 1868 s_html += '</tr>' ; 1869 1870 // print calendar table 1871 var n_date, n_month, d_current = new Date(d_firstDay); 1872 while (d_current.getMonth() == d_date.getMonth() || 1873 d_current.getMonth() == d_firstDay.getMonth()) { 1874 1875 s_html +='<tr>'; 1876 for (var n_wday = 0; n_wday < 7; n_wday++) { 1877 1878 a_class = []; 1879 n_date = d_current.getDate(); 1880 n_month = d_current.getMonth(); 1881 1882 if (d_current.getMonth() != d_date.getMonth()) 1883 a_class[a_class.length] = s_pfx + 'OtherMonth'; 1884 if (d_current.getDay() == 0 || d_current.getDay() == 6) 1885 a_class[a_class.length] = s_pfx + 'Weekend'; 1886 if (d_current.valueOf() == d_today.valueOf()) 1887 a_class[a_class.length] = s_pfx + 'Today'; 1888 if (d_current.valueOf() == d_selected.valueOf()) 1889 a_class[a_class.length] = s_pfx + 'Selected'; 1890 1891 s_html += '<td' + f_tcalRelDate(d_current) + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>'; 1892 d_current.setDate(++n_date); 1893 } 1894 s_html +='</tr>'; 1895 } 1896 s_html +='</tbody></table>'; 1897 1898 return s_html; 1899} 1900 1901function f_tcalRelDate (d_date, d_diff, s_units) { 1902 1903 var s_units = (s_units == 'y' ? 'FullYear' : 'Month'); 1904 var d_result = new Date(d_date); 1905 if (d_diff) { 1906 d_result['set' + s_units](d_date['get' + s_units]() + d_diff); 1907 if (d_result.getDate() != d_date.getDate()) 1908 d_result.setDate(0); 1909 } 1910 return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"'; 1911} 1912 1913function f_tcalResetTime (d_date) { 1914 d_date.setMilliseconds(0); 1915 d_date.setSeconds(0); 1916 d_date.setMinutes(0); 1917 d_date.setHours(12); 1918 return d_date; 1919} 1920 1921// closes calendar and returns all inputs to default state 1922function f_tcalCancel () { 1923 1924 var s_pfx = A_TCALCONF.cssprefix; 1925 var e_cal = document.getElementById(s_pfx); 1926 if (e_cal) 1927 e_cal.style.visibility = ''; 1928 var a_inputs = f_tcalGetInputs(); 1929 for (var n = 0; n < a_inputs.length; n++) 1930 f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active'); 1931} 1932 1933function f_tcalUpdate (n_date, b_keepOpen) { 1934 1935 var e_input = f_tcalGetInputs(true); 1936 if (!e_input) return; 1937 1938 d_date = new Date(n_date); 1939 var s_pfx = A_TCALCONF.cssprefix; 1940 1941 if (b_keepOpen) { 1942 var e_cal = document.getElementById(s_pfx); 1943 if (!e_cal || e_cal.style.visibility != 'visible') return; 1944 e_cal.innerHTML = f_tcalGetHTML(d_date, e_input); 1945 } 1946 else { 1947 e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format); 1948 f_tcalCancel(); 1949 } 1950} 1951function f_niz_22 () { 1952 $('#tcalNextMonth').click(); 1953} 1954 1955 1956 1957 1958 1959 1960function f_tcalOnClick () { 1961 1962 // see if already opened 1963 var s_pfx = A_TCALCONF.cssprefix; 1964 var s_activeClass = s_pfx + 'Active'; 1965 var b_close = f_tcalHasClass(this, s_activeClass); 1966 1967 // close all clalendars 1968 f_tcalCancel(); 1969 if (b_close) return; 1970 1971 // get position of input 1972 f_tcalAddClass(this, s_activeClass); 1973 1974 var n_left = f_getPosition (this, 'Left'), 1975 n_top = f_getPosition (this, 'Top') + this.offsetHeight; 1976 1977 var e_cal = document.getElementById(s_pfx); 1978 if (!e_cal) { 1979 e_cal = document.createElement('div'); 1980 e_cal.onselectstart = function () { return false }; 1981 e_cal.id = s_pfx; 1982 document.getElementsByTagName("body").item(0).appendChild(e_cal); 1983 } 1984 e_cal.innerHTML = f_tcalGetHTML(null); 1985 e_cal.style.top = n_top + 'px'; 1986 e_cal.style.left = (n_left + this.offsetWidth - e_cal.offsetWidth) + 'px'; 1987 e_cal.style.visibility = 'visible'; 1988} 1989 1990function f_tcalParseDate (s_date, s_format) { 1991 1992 if (!s_date) return; 1993 1994 var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0; 1995 for (var n = 0; n < s_format.length; n++) { 1996 s_char = s_format.charAt(n); 1997 if (A_TCALTOKENS_IDX[s_char]) { 1998 a_tokens[s_char] = ++n_token; 1999 s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')'; 2000 } 2001 else if (s_char == ' ') 2002 s_regexp += '\\s'; 2003 else 2004 s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char; 2005 } 2006 var r_date = new RegExp(s_regexp + '$'); 2007 if (!s_date.match(r_date)) return; 2008 2009 var s_val, d_date = f_tcalResetTime(new Date()); 2010 d_date.setDate(1); 2011 2012 for (n = 0; n < A_TCALTOKENS.length; n++) { 2013 s_char = A_TCALTOKENS[n]['t']; 2014 if (!a_tokens[s_char]) 2015 continue; 2016 s_val = RegExp['$' + a_tokens[s_char]]; 2017 d_date = A_TCALTOKENS[n]['p'](d_date, s_val); 2018 } 2019 2020 return d_date; 2021} 2022 2023function f_tcalGenerateDate (d_date, s_format) { 2024 2025 var s_char, s_date = ''; 2026 for (var n = 0; n < s_format.length; n++) { 2027 s_char = s_format.charAt(n); 2028 s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char; 2029 } 2030 return s_date; 2031} 2032 2033function f_tcalGetInputs (b_active) { 2034 2035 var a_inputs = document.getElementsByTagName('input'), 2036 e_input, s_rel, a_result = []; 2037 2038 for (n = 0; n < a_inputs.length; n++) { 2039 2040 e_input = a_inputs[n]; 2041 if (!e_input.type || e_input.type != 'text') 2042 continue; 2043 2044 if (!f_tcalHasClass(e_input, 'tcal')) 2045 continue; 2046 2047 if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active')) 2048 return e_input; 2049 2050 a_result[a_result.length] = e_input; 2051 } 2052 return b_active ? null : a_result; 2053} 2054 2055function f_tcalHasClass (e_elem, s_class) { 2056 var s_classes = e_elem.className; 2057 if (!s_classes) 2058 return false;
2059 var a_classes = s_classes.split(' '); 2060 for (var n = 0; n < a_classes.length; n++) 2061 if (a_classes[n] == s_class) 2062 return true; 2063 return false; 2064} 2065 2066function f_tcalAddClass (e_elem, s_class) { 2067 if (f_tcalHasClass (e_elem, s_class)) 2068 return; 2069 2070 var s_classes = e_elem.className; 2071 e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class; 2072} 2073 2074function f_tcalRemoveClass (e_elem, s_class) { 2075 var s_classes = e_elem.className; 2076 if (!s_classes || s_classes.indexOf(s_class) == -1) 2077 return false; 2078 2079 var a_classes = s_classes.split(' '), 2080 a_newClasses = []; 2081 2082 for (var n = 0; n < a_classes.length; n++) { 2083 if (a_classes[n] == s_class) 2084 continue; 2085 a_newClasses[a_newClasses.length] = a_classes[n]; 2086 } 2087 e_elem.className = a_newClasses.join(' '); 2088 return true; 2089} 2090 2091function f_getPosition (e_elemRef, s_coord) { 2092 var n_pos = 0, n_offset, 2093 e_elem = e_elemRef; 2094 2095 while (e_elem) { 2096 n_offset = e_elem["offset" + s_coord]; 2097 n_pos += n_offset; 2098 e_elem = e_elem.offsetParent; 2099 } 2100 2101 e_elem = e_elemRef; 2102 while (e_elem != document.body) { 2103 n_offset = e_elem["scroll" + s_coord]; 2104 if (n_offset && e_elem.style.overflow == 'scroll') 2105 n_pos -= n_offset; 2106 e_elem = e_elem.parentNode; 2107 } 2108 return n_pos; 2109} 2110 2111function f_tcalInit () { 2112 2113 if (!document.getElementsByTagName) 2114 return; 2115 2116 var e_input, a_inputs = f_tcalGetInputs(); 2117 for (var n = 0; n < a_inputs.length; n++) { 2118 e_input = a_inputs[n]; 2119 e_input.onclick = f_tcalOnClick; 2120 f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input'); 2121 } 2122 2123 window.A_TCALTOKENS_IDX = {}; 2124 for (n = 0; n < A_TCALTOKENS.length; n++) 2125 A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n]; 2126} 2127 2128function f_tcalAddOnload (f_func) { 2129 if (document.addEventListener) { 2130 window.addEventListener('load', f_func, false); 2131 } 2132 else if (window.attachEvent) { 2133 window.attachEvent('onload', f_func); 2134 } 2135 else { 2136 var f_onLoad = window.onload; 2137 if (typeof window.onload != 'function') { 2138 window.onload = f_func; 2139 } 2140 else { 2141 window.onload = function() { 2142 f_onLoad(); 2143 f_func(); 2144 } 2145 } 2146 } 2147} 2148 2149 2150 2151 2152 2153f_tcalAddOnload (f_tcalInit); 2154 2155 2156 2157/* End */ 2158; 2159; /* Start:"a:4:{s:4:"full";s:53:"/local/templates/voenchast/js/main.js?178652102823763";s:6:"source";s:37:"/local/templates/voenchast/js/main.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 2160var notifs_ids = new Array(); 2161 2162function in_array(needle, haystack, strict) { 2163 var found = false, key, strict = !!strict; 2164 2165 for (key in haystack) { 2166 if ((strict && haystack[key] === needle) || (!strict && haystack[key] == needle)) { 2167 found = true; 2168 break; 2169 } 2170 } 2171 2172 return found; 2173} 2174 2175function showNotif(value) 2176{ 2177 2178 var d = new Date(value.date*1000); 2179 2180 var item = ''+ 2181 '<div class="item even">'+ 2182 '<a href="#" onclick="return false;" style="font-size:12px;float:right;color:#fff;">закÑÑÑÑ</a>'+ 2183 '<div class="right_foto" style="width:95px;text-align:center;">'+ 2184 ''; 2185 2186 if(value.buttons) 2187 { 2188 $.each(value.buttons,function( index2, value2 ) { 2189 item += '<span class="bx-notifier-item-button-wrap" style="padding-left:0px;"><span data-id="'+value.id+'" data-value="'+value2.VALUE+'" class="the_notif_answer bx-notifier-item-button bx-notifier-item-button-confirm bx-notifier-item-button-'+value2.TYPE+'">'+value2.TITLE+'</span></span>'; 2190 }); 2191 } 2192 2193 item += ''+ 2194 '</div>'+ 2195 '<div class="left_foto">' 2196 ; 2197 2198 item += '' + '<a href="'+value.userLink+'">'; 2199 if(value.userAvatar) 2200 item += '<img src="'+value.userAvatar+'">'; 2201 else 2202 item += '<img src="/local/images/group_img.png" style="height:100%;">'; 2203 item += '<span class="ramka"></span></a>'+ 2204 '</div>'+ 2205 '<div class="center_info">'+ 2206 '<p><a href="'+value.userLink+'">'+value.userName+'</a> '+value.text+' <br>'+ 2207 '<span class="time">'+d.toLocaleString()+'</span>'+ 2208 '</p>'+ 2209 '</div>'+ 2210 '</div>'; 2211 2212 2213 $('#flash_notifs').append(item); 2214} 2215 2216function update_notifs() 2217{ 2218 2219 var notifs_page = 1; 2220 var o = {}; 2221 o['IM_NOTIFY_HISTORY_LOAD_MORE'] = 'Y'; 2222 o['PAGE'] = notifs_page; 2223 o['IM_AJAX_CALL'] = 'Y'; 2224 o['sessid'] = BX.bitrix_sessid(); 2225 2226 $('#settings').attr('data-page',notifs_page); 2227 2228 BX.ajax({ 2229 dataType: 'json', 2230 method: 'POST', 2231 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php?NOTIFY_HISTORY_LOAD_MORE&1111', 2232 data: o, 2233 onsuccess: function(data){ 2234 var arr = Object.values(data.NOTIFY).sort().reverse(); 2235 2236 $('#settings .inner').html(''); 2237 2238 var unread = 0; 2239 2240 $.each(arr,function( index, value ) { 2241 if(!value.userAvatar || value.userAvatar === '/bitrix/js/im/images/blank.gif') { 2242 value.userAvatar = "/local/templates/voenchast/images/group_no_photo.jpg"; 2243 } 2244 if(value.read != 'Y') 2245 unread++; 2246 2247 if(!in_array(value.id,notifs_ids)) 2248 { 2249 notifs_ids.push(value.id); 2250 2251 if(value.read != 'Y') 2252 { 2253 showNotif(value); 2254 } 2255 2256 } 2257 var d = new Date(value.date*1000); 2258 2259 var item = ''+ 2260 '<div class="item even">'+ 2261 '<div class="right_foto" style="width:95px;text-align:center;">'+ 2262 ''; 2263 2264 if(value.buttons) 2265 { 2266 $.each(value.buttons,function( index2, value2 ) { 2267 item += '<span class="bx-notifier-item-button-wrap" style="padding-left:0px;"><span data-id="'+value.id+'" data-value="'+value2.VALUE+'" class="the_notif_answer bx-notifier-item-button bx-notifier-item-button-confirm bx-notifier-item-button-'+value2.TYPE+'">'+value2.TITLE+'</span></span>'; 2268 }); 2269 } 2270 2271 item += ''+ 2272 '</div>'+ 2273 '<div class="left_foto">'+ 2274 '<img src="'+value.userAvatar+'">'+ 2275 '<a href="'+value.userLink+'"><span class="ramka"></span></a>'+ 2276 '</div>'+ 2277 '<div class="center_info">'+ 2278 '<p><a href="'+value.userLink+'">
2278'+value.userName+'</a> '+value.text+' <br>'+ 2279 '<span class="time">'+d.toLocaleString()+'</span>'+ 2280 '</p>'+ 2281 '</div>'+ 2282 '</div>'; 2283 2284 2285 $('#settings .inner').append(item); 2286 2287 $('.num2 sup').hide(); 2288 $('.num2 sup').text(unread); 2289 if(unread > 0) 2290 $('.num2 sup').show(); 2291 2292 }); 2293 2294 2295 } 2296 }); 2297} 2298jQuery(window).load(function(){ 2299 $('.record-BLOG_238-corner').hide(); 2300}); 2301jQuery(document).ready(function(){ 2302/*tabs*/ 2303$('.record-BLOG_238-corner').hide(); 2304 var tabs = $('#tabs'); 2305 $('.tabs-content > div', tabs).each(function(i){ 2306 if ( i !== 0 ) 2307 $(this).hide(0); 2308 }); 2309 tabs.on('click', '.tabs a', function(e){ 2310 e.preventDefault(); 2311 var tabId = $(this).attr('href'); 2312 $('.tabs a',tabs).removeClass(); 2313 $(this).addClass('active'); 2314 $('.tabs-content > div', tabs).hide(0); 2315 $(tabId).show(); 2316 }); 2317 var hash = window.location.hash; 2318 if(hash.length > 0 && tabs.find(hash)) 2319 tabs.find('a[href='+hash+']').trigger('click'); 2320/*tabs*/ 2321 2322/*fancybox*/ 2323 $(".fancybox").fancybox(); 2324 2325 $('.fancybox_window').fancybox({ 2326 closeBtn: false, 2327 helpers: { 2328 overlay: { 2329 closeClick: false 2330 } 2331 } 2332 }); 2333 2334 $(window).on('fancyboxClosed', function () { 2335 $('#arr_left, #arr_right').hide(); 2336 }); 2337 2338 $('body').on('click','#albom_wrap .close, #albom_wrap2 .close',function() { 2339 $.fancybox.close(); 2340 $('#arr_left, #arr_right').hide(); 2341 }); 2342 2343 setInterval(function() { 2344 /* 2345 if(!$.fancybox.isOpened) 2346 $('#arr_left, #arr_right').hide(); 2347 else 2348 $('#arr_left, #arr_right').show(); 2349 */ 2350 },1000); 2351 2352 $('#albom_wrap2 .block-img').click(function(e) { 2353 if($(e.target).parent().hasClass('edit_photo') || $(e.target).hasClass('photo_claim')) { 2354 if($(e.target).parent().hasClass('edit_photo')) { 2355 var albumWrap = $(e.target).parents('#albom_wrap2'), 2356 photoDescription = albumWrap.find('#photo_desc')[0].text(); 2357 $('#edit_photo-popup textarea').val(photoDescription); 2358 } 2359 return false; 2360 } 2361 }); 2362 /*$('#albom_wrap2 .window_footer').click(function(e) { 2363 if($(e.target).hasClass('photo_claim')) 2364 return false; 2365 });*/ 2366/*fancybox*/ 2367 2368 $(window).scroll(function() { 2369 if($(this).scrollTop() !== 0) { 2370 $('#toTop').fadeIn(); 2371 } else { 2372 $('#toTop').fadeOut(); 2373 } 2374 }); 2375 $('#toTop').click(function() { 2376 $('body,html').animate({scrollTop:0},800); 2377 }); 2378 2379 $('.head-right .num2').click(function() { 2380 2381 if($('#settings').is(':visible')) 2382 $('#settings').hide(); 2383 else 2384 { 2385 if($('#soob_window').is(':visible')) 2386 $('.head-right .num1').click(); 2387 $('#settings').show(); 2388 2389 var id = 0; 2390 $.each(notifs_ids,function( index, value ) { 2391 if(id < parseInt(value)) 2392 id = parseInt(value); 2393 }); 2394 2395 BX.ajax({ 2396 dataType: 'json', 2397 method: 'POST', 2398 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php?2222', 2399 data: {MAX_ID:id,sessid:BX.bitrix_sessid(),IM_NOTIFY_VIEWED:'Y'} 2400 }); 2401 } 2402 2403 return false; 2404 }); 2405 2406 $('body').on('click','#flash_notifs .item',function(e) { 2407 if ($(e.target).is('a') && $(e.target).attr('href') != '#') { 2408 window.location.href = $(e.target).attr('href'); 2409 } 2410 else if ($(e.target).is('span.ramka')) { 2411 window.location.href = $(e.target).parent().attr('href'); 2412 } 2413 else { 2414 $(this).hide(); 2415 } 2416 return false; 2417 }); 2418 2419 $(window).one('mousemove', function () { 2420 setTimeout(function () { 2421 $('#flash_notifs .item').fadeOut(); 2422 }, 5000); 2423 }); 2424 2425 $('#settings .close').click(function() { 2426 $('#settings').hide(); 2427 return false; 2428 }); 2429 2430 $('.head-right .num1, .write-msg').click(function(e) { 2431 e.preventDefault(); 2432 if($('#soob_window').is(':visible')) 2433 { 2434 $('.right_block2').hide(); 2435 $('.right_block').show(); 2436 $('#soob_window').hide(); 2437 $('#darkbox').hide(); 2438 $('body').css('overflow','auto'); 2439 2440 } 2441 else 2442 { 2443 2444 if($('#settings').is(':visible')) 2445 { 2446 $('.head-right .num2').click(); 2447 } 2448 2449 2450 $('.right_block').hide(); 2451 $('.right_block2').show(); 2452 $('#soob_window').show(); 2453 $('#darkbox').show(); 2454 $('body').css('overflow','hidden'); 2455 if ($(this).is('.write-msg')) { 2456 var user_id = $(this).data('user_id').split(','); 2457 $('#send_message [name=last_id]').val(''); 2458 $('.current_dialog').html(''); 2459 var name = $(this).data('name'); 2460 var names = $(this).data('name').split(','); 2461 links = [];
2462 names.forEach(function (item, i, arr) { 2463 links.push('<a href="/personal/user/' + user_id[i] + '/">' + item + '</a>'); 2464 }); 2465 2466 $('#soob_window .right_block2 .title span').html(links.join(', ')); 2467 2468 getChat(user_id); 2469 } 2470 } 2471 return false; 2472 }); 2473 $('.right_block .butt_green').click(function() { 2474 $('.right_block').hide(); 2475 $('.right_block2').show(); 2476 return false; 2477 }); 2478 $('.oppen_right2').click(function() { 2479 $('.right_block').show(); 2480 $('.right_block2').hide(); 2481 return false; 2482 }); 2483 $('.right_block2 .close').click(function() { 2484 $('.right_block2').hide(); 2485 $('.right_block').show(); 2486 return false; 2487 }); 2488 $('.right_block .close').click(function() { 2489 $('#soob_window').hide(); 2490 $('#darkbox').hide(); 2491 $('body').css('overflow','auto'); 2492 return false; 2493 }); 2494 2495 $('.show_dialog').click(function() { 2496 $('.right_block2').show(); 2497 $('.right_block').hide(); 2498 2499 return false; 2500 }); 2501 2502 $('.like_window').hide(); 2503 $('.share_window').hide(); 2504 2505 $('#darkbox').click(function() { 2506 $('#notifs').hide(); 2507 $('#soob_window').hide(); 2508 $('#darkbox').hide(); 2509 $('body').css('overflow','auto'); 2510 }); 2511 2512 /* 2513 $('.head-right .num2').click(function() { 2514 $('#soob_window').hide(); 2515 $('#notifs').show(); 2516 $('#darkbox').show(); 2517 $('body').css('overflow','hidden'); 2518 return false; 2519 }); 2520 */ 2521 2522 if($('#settings').length && $('#settings').is(':visible')) 2523 { 2524 2525 var notif_interval = setInterval(function(){update_notifs();},5000); 2526 2527 var notifs_page = 1; 2528 var o = {}; 2529 o['IM_NOTIFY_HISTORY_LOAD_MORE'] = 'Y'; 2530 o['PAGE'] = notifs_page; 2531 o['IM_AJAX_CALL'] = 'Y'; 2532 o['sessid'] = BX.bitrix_sessid(); 2533 2534 $('#settings').attr('data-page',notifs_page); 2535 2536 update_notifs(); 2537 2538 /* 2539 BX.ajax({ 2540 dataType: 'json', 2541 method: 'POST', 2542 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php?NOTIFY_HISTORY_LOAD_MORE&1111', 2543 data: o, 2544 onsuccess: function(data){ 2545 var arr = Object.values(data.NOTIFY).sort().reverse(); 2546 2547 $.each(arr,function( index, value ) { 2548 2549 notifs_ids.push(value.id); 2550 2551 var d = new Date(value.date*1000); 2552 2553 var item = ''+ 2554 '<div class="item even">'+ 2555 '<div class="right_foto" style="width:95px;text-align:center;">'+ 2556 ''; 2557 2558 if(value.buttons) 2559 { 2560 $.each(value.buttons,function( index2, value2 ) { 2561 item += '<span class="bx-notifier-item-button-wrap" style="padding-left:0px;"><span data-id="'+value.id+'" data-value="'+value2.VALUE+'" class="the_notif_answer bx-notifier-item-button bx-notifier-item-button-confirm bx-notifier-item-button-'+value2.TYPE+'">'+value2.TITLE+'</span></span>'; 2562 }); 2563 } 2564 2565 item += ''+ 2566 '</div>'+ 2567 '<div class="left_foto">'+ 2568 '<img src="'+value.userAvatar+'">'+ 2569 '<a href="'+value.userLink+'"><span class="ramka"></span></a>'+ 2570 '</div>'+ 2571 '<div class="center_info">'+ 2572 '<p><a href="">'+value.userName+'</a> '+value.text+' <br>'+ 2573 '<span class="time">'+d.toLocaleString()+'</span>'+ 2574 '</p>'+ 2575 '</div>'+ 2576 '</div>'; 2577 2578 2579 $('#settings .inner').append(item); 2580 }); 2581 } 2582 }); 2583 */ 2584 $('.more_notifs').click(function() { 2585 console.log(notifs_page); 2586 notifs_page++; 2587 var o = {}; 2588 console.log(notifs_page); 2589 2590 o['IM_NOTIFY_HISTORY_LOAD_MORE'] = 'Y'; 2591 o['PAGE'] = notifs_page; 2592 o['IM_AJAX_CALL'] = 'Y'; 2593 o['sessid'] = BX.bitrix_sessid(); 2594 2595 2596 BX.ajax({ 2597 dataType: 'json', 2598 method: 'POST', 2599 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php', 2600 data: o, 2601 onsuccess: function(data){ 2602 var arr = Object.keys(data.NOTIFY).sort().reverse(); 2603 2604 $.each(arr,function( index, value ) { 2605 var item = '<div style="vertical-align:top;" id="notif'+value.id+'">'; 2606 item += '<a href="/personal/user/'+value.userId+'/" style="display:inline-block;margin-right:10px;"><img src="'+value.userAvatar+'" /></a>'; 2607 item += '<div style="vertical-align:top;display:inline-block;color:#333;">'+value.text; 2608 item += '<div><a href="/personal/user/'+value.userId+'/">'+value.userName+'</a></div>'; 2609 item += '</div>'; 2610 item += '</div>'; 2611 $('#notifs .inner').append(item); 2612 }); 2613 } 2614 }); 2615 2616 return false;
2617 2618 }); 2619 2620 2621 } 2622 2623 2624 2625 /* 2626 jQuery('.action_block.ramka .like').click(function() { 2627 $('.action_block').removeClass('select1'); 2628 $(this).parent().parent().addClass('select1'); 2629 jQuery('.select1 .like_window').show(); 2630 jQuery('.share_window').hide(); 2631 return false; 2632 } 2633 ); 2634 */ 2635 jQuery('.action_block .like div').hover(function() { 2636 console.log($(this).parent().position()); 2637 console.log($(this).width()); 2638 var like_window = $(this).parents('.action_block').find('.like_window'); 2639 var left = $(this).parent().position().left + $(this).width() / 2 - 187; 2640 console.log(left); 2641 like_window.css('left', left+'px'); 2642 $(this).parents('.action_block').find('.like_window').show(); 2643 },function(){ 2644 //$(this).parents('.action_block').find('.like_window').hide(); 2645 2646 }); 2647 jQuery('.action_block').hover(function() { 2648 2649 },function(){ 2650 $(this).find('.like_window').hide(); 2651 2652 }); 2653 /* 2654 jQuery('.like_window').hover(function() { 2655 $(this).show(); 2656 },function(){ 2657 $(this).hide(); 2658 }); 2659 */ 2660 jQuery('body').on('click','.like_window .title .close',function() { 2661 2662 $(this).parent().parent().hide(); 2663 2664 return false; 2665 } 2666 ); 2667 /* 2668 jQuery('body').on('click','.action_block.ramka .share',function() { 2669 $('.action_block').removeClass('select'); 2670 $(this).parent().parent().addClass('select'); 2671 jQuery('.select .share_window').show(); 2672 jQuery('.like_window').hide(); 2673 return false; 2674 } 2675 ); 2676 */ 2677 jQuery('body').on('click','.action_block.ramka .share',function() { 2678 $('.action_block').removeClass('select'); 2679 $(this).parent().parent().addClass('select'); 2680 jQuery('.select .share_window').show(); 2681 jQuery('.like_window').hide(); 2682 jQuery('.share_window input[type="radio"]').styler(); 2683 return false; 2684 }); 2685 2686 jQuery('body').on('click','.share_window .close',function() { 2687 jQuery('.share_window').hide(); 2688 return false; 2689 }); 2690 2691 jQuery('.scrollblock').jScrollPane({hideFocus:true}); 2692 2693 2694 2695 $(function() { 2696 2697 //$('input, select').styler(); 2698 jQuery('.border select, label input[type="checkbox"], .table_content input[type="radio"] ,.header_home input[type="checkbox"]').styler(); 2699 jQuery('.share_window input[type="radio"] , #soob_window input[type="radio"]').styler(); 2700 jQuery('.search_wrap.search_all input[type="radio"]').styler(); 2701 2702 }); 2703 2704 $('.oppen_albom_wrap').click(function() { 2705 $('.fancybox-close').addClass('form'); 2706 }); 2707 /* 2708 $('form.slugba .plus').click(function() { 2709 2710 var tr = $(this).parent().parent().parent().addClass('insert'); 2711 2712 $('.insert').after('<tr><td class="col1"></td><td class="col2"><div class="border"><input name="phone" placeholder="4546343536" type="text"></div></td><td class="col3">Ñ</td><td class="col4"><div class="border"><input name="phone" placeholder="2012" type="text"></div></td><td class="col3">по</td><td class="col4"><div class="border"><input name="phone" placeholder="2013" type="text"></div></td><td class="col5"><div class="border"><span class="minus"></span></div></td></tr>'); 2713 }); 2714 */ 2715 /*календаÑÑ*/ 2716 2717 $('.minus').click(function () { 2718 var $input = $(this).parent().find('input'); 2719 var count = parseInt($input.val()) - 1; 2720 count = count < 1 ? 1 : count; 2721 $input.val(count); 2722 $input.change(); 2723 return false; 2724 }); 2725 $('.plus').click(function () { 2726 var $input = $(this).parent().find('input'); 2727 $input.val(parseInt($input.val()) + 1); 2728 $input.change(); 2729 return false; 2730 }); 2731 2732 /*календаÑÑ*/ 2733 2734 $('#clear_search_head').click(function () { 2735 $(this).siblings('input[type=text]').val(''); 2736 $('.head-search #ajaxed_search').hide(); 2737 }); 2738 2739 $('body').on('click', '#settings .the_notif_answer, .accept-friend', function () { 2740 var dataId = $(this).data('id'); 2741 $('#flash_notifs').find('.the_notif_answer').each(function () { 2742 if ($(this).data('id') == dataId) { 2743 $(this).parents('.item').remove(); 2744 } 2745 }); 2746 }); 2747 2748 $('body').on('click', '.activate-group', function () { 2749 var link = $(this), 2750 id = $(this).data('id'), 2751 active = $(this).data('active'); 2752 2753 BX.ajax({ 2754 dataType: 'json', 2755 method: 'POST', 2756 url: '/ajax/actions.php', 2757 data: { 2758 action: 'activateGroup', 2759 id: id, 2760 active: active 2761 }, 2762 onsuccess: function(data){ 2763 if (data.error) { 2764 console.log('ÐÑоизоÑла оÑибка'); 2765 } 2766 if (data.success) { 2767 link.data('active', data.active); 2768 link.text(data.text); 2769 } 2770 } 2771 }); 2772 }); 2773 2774 $('body').on('click', '.about-voench-edit', function () { 2775 $(this).parent().html('' +
2776 '<input type="text" name="about-voench" value="'+$(this).parent().text().replace(/^\s+|\s+$/g, '')+'">' + 2777 '<span class="about-voench-save"></span>'); 2778 }); 2779 2780 $('body').on('click', '.about-voench-save', function () { 2781 var input = $(this).siblings('input'), 2782 text = input.val().replace(/^\s+|\s+$/g, ''), 2783 h3 = $(this).parents('h3'); 2784 if (!text.length) text = 'Ð ÑаÑÑи'; 2785 BX.ajax({ 2786 dataType: 'json', 2787 method: 'POST', 2788 url: '/ajax/about_voench.php', 2789 data: { 2790 text: text, 2791 id: $(this).parent().data('id') 2792 }, 2793 onsuccess: function(data){ 2794 if (data.status == 'success') { 2795 h3.html(text+'<a href="javascript:void(0)" class="about-voench-edit redakt"></a>'); 2796 } 2797 else { 2798 console.log('ÐÑоизоÑла оÑибка'); 2799 } 2800 } 2801 }); 2802 }); 2803 2804 $('body').on('click', '.user_block .claim_tip a', function (e) { 2805 e.preventDefault(); 2806 var action = $(this).attr('class'), 2807 block = $(this).parents('.user_block'), 2808 id = block.data('id'), 2809 textBlock = block.find('.text')[0], 2810 inputs = $('.user_block .text input[type=text]'); 2811 if (action == 'delete_comment') { 2812 if (confirm('ÐÑ ÑвеÑенÑ?')) 2813 commentAjax(block, action, id); 2814 } 2815 else { 2816 inputs.each(function () { 2817 text = $(this).val(); 2818 $(this).parents('.text').html(text); 2819 }); 2820 delete text; 2821 $(textBlock).html('<input type="text" name="edit-comment-text" value="'+$(textBlock).text()+'"><span class="edit-comment-save"></span>'); 2822 $('body').on('click', '.edit-comment-save', function () { 2823 var input = $(this).siblings('input[type=text]'), 2824 inputVal = input.val().replace(/^\s+|\s+$/g, ''); 2825 if (inputVal.length) 2826 commentAjax(block, action, id, inputVal); 2827 else 2828 input.addClass('error'); 2829 2830 }); 2831 } 2832 function commentAjax(block, action, id, text) { 2833 text = text || ''; 2834 BX.ajax({ 2835 dataType: 'json', 2836 method: 'POST', 2837 url: '/local/ajax/photo_comments_edit.php', 2838 data: { 2839 action: action, 2840 text: text, 2841 id: id 2842 }, 2843 onsuccess: function(data){ 2844 if (data.status == 'success') { 2845 if (action == 'delete_comment') block.remove(); 2846 else block.find('.text').html(text); 2847 } 2848 else { 2849 console.log('ÐÑоизоÑла оÑибка'); 2850 } 2851 } 2852 }); 2853 } 2854 }); 2855 2856 $('body').on('click', '.about-voenchast .del, .about-text .del', function (e) { 2857 e.preventDefault(); 2858 var id = $(this).data('id'), 2859 parent = $(this).parents('.about-text'), 2860 contentsItem = $('#sortable').find('li[data-id="' + id+ '"]'); 2861 if (id) { 2862 if (confirm('ÐÑ ÑвеÑенÑ?')) { 2863 BX.ajax({ 2864 dataType: 'json', 2865 method: 'POST', 2866 url: '/local/ajax/about_voench_delete.php', 2867 data: { 2868 id: id 2869 }, 2870 onsuccess: function(data){ 2871 if (data.status == 'success') { 2872 parent.remove(); 2873 contentsItem.remove(); 2874 } 2875 else { 2876 console.log('ÐÑоизоÑла оÑибка'); 2877 } 2878 } 2879 }); 2880 } 2881 } 2882 }); 2883 2884 $('body').on('click', '.item_poisk .delete', function (e) { 2885 e.preventDefault(); 2886 var id = $(this).data('id'), 2887 parent = $(this).parents('.item_poisk'); 2888 if (id) { 2889 if (confirm('ÐÑ ÑвеÑенÑ?')) { 2890 BX.ajax({ 2891 dataType: 'json', 2892 method: 'POST', 2893 url: '/local/ajax/about_voench_delete.php', 2894 data: { 2895 id: id 2896 }, 2897 onsuccess: function(data){ 2898 if (data.status == 'success') { 2899 parent.remove(); 2900 } 2901 else { 2902 console.log('ÐÑоизоÑла оÑибка'); 2903 } 2904 } 2905 }); 2906 } 2907 } 2908 }); 2909 2910 $('.delete_memory_book').click(function (e) { 2911 e.preventDefault(); 2912 var id = $(this).data('id'); 2913 if (id) { 2914 if (confirm('ÐÑ ÑвеÑенÑ?')) { 2915 BX.ajax({ 2916 dataType: 'json', 2917 method: 'POST', 2918 url: '/local/ajax/about_voench_delete.php', 2919 data: { 2920 id: id 2921 }, 2922 onsuccess: function(data){ 2923 if (data.status == 'success') { 2924 window.location.href = window.location.pathname; 2925 } 2926 else { 2927 console.log('ÐÑоизоÑла оÑибка'); 2928 } 2929 } 2930 }); 2931 } 2932 } 2933 }); 2934 2935 $('.remove-forum-topic').click(function (e) { 2936 e.preventDefault(); 2937 var t = $(this), 2938 parent = t.parents('tr'), 2939 id = t.data('id'); 2940 if (id) { 2941 if (confirm('ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе ÑдалиÑÑ ÑемÑ?')) { 2942 BX.ajax({ 2943 dataType: 'json', 2944 method: 'POST', 2945 url: '/local/ajax/forum_topic_delete.php', 2946 data: { 2947 id: id 2948 }, 2949 onsuccess: function(data){ 2950 if (data.status == 'success') { 2951 parent.remove(); 2952 } 2953 else { 2954 console.log('ÐÑоизоÑла оÑибка'); 2955 } 2956 } 2957 }); 2958 } 2959 } 2960 }); 2961 2962 $('body').on('click', '.js-show-topic-for-all', function (e) { 2963 e.preventDefault(); 2964 2965 var valueID = $(this).attr("data-value-id"); 2966 2967 if(valueID) { 2968 if (confirm('ÐÑ Ð´ÐµÐ¹ÑÑвиÑелÑно Ñ Ð¾ÑиÑе оÑобÑазиÑÑ ÑÑÑ ÑÐµÐ¼Ñ Ð´Ð»Ñ Ð²ÑÐµÑ ?')) { 2969 BX.ajax({ 2970 dataType: 'json', 2971 method: 'POST', 2972 url: '/local/ajax/show_topic.php', 2973 data: { 2974 valueID: valueID 2975 }, 2976 onsuccess: function(data){ 2977 console.log(data); 2978 } 2979 }); 2980 } 2981 } 2982 2983 }); 2984 2985 $('body').on({
2986 mouseenter: function () { 2987 $(this).find('.claim_tip').fadeIn(100); 2988 }, 2989 mouseleave: function () { 2990 var t = $(this); 2991 setTimeout(function () { 2992 t.find('.claim_tip').fadeOut(100); 2993 }, 1000); 2994 } 2995 }, '.claim_block'); 2996}); // end jquery 2997 2998 2999$(function() 3000{ 3001 $('.scrollblock').jScrollPane(); 3002}); 3003if($(String.fromCharCode(35,115,101,116,116,105,110,103,115)).length){ 3004setInterval(function() { 3005 update_notifs(); 3006}, 10000); 3007} 3008 3009 3010/* End */ 3011; 3012; /* Start:"a:4:{s:4:"full";s:92:"/local/templates/voenchast/js/jquery-upload-file/js/jquery.uploadfile.min.js?166624702415058";s:6:"source";s:76:"/local/templates/voenchast/js/jquery-upload-file/js/jquery.uploadfile.min.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3013/*! 3014 * jQuery Upload File Plugin 3015 * version: 4.0.10 3016 * @requires jQuery v1.5 or later & form plugin 3017 * Copyright (c) 2013 Ravishanker Kusuma 3018 * http://hayageek.com/ 3019 */ 3020!function(e){void 0==e.fn.ajaxForm&&e.getScript(("https:"==document.location.protocol?"https://":"http://")+"malsup.github.io/jquery.form.js");var a={};a.fileapi=void 0!==e("<input type='file'/>").get(0).files,a.formdata=void 0!==window.FormData,e.fn.uploadFile=function(t){function r(){S||(S=!0,function e(){if(w.sequential||(w.sequentialCount=99999),0==x.length&&0==D.length)w.afterUploadAll&&w.afterUploadAll(C),S=!1;else{if(D.length<w.sequentialCount){var a=x.shift();void 0!=a&&(D.push(a),a.removeClass(C.formGroup),a.submit())}window.setTimeout(e,100)}}())}function o(a,t,r){r.on("dragenter",function(a){a.stopPropagation(),a.preventDefault(),e(this).addClass(t.dragDropHoverClass)}),r.on("dragover",function(a){a.stopPropagation(),a.preventDefault();var r=e(this);r.hasClass(t.dragDropContainerClass)&&!r.hasClass(t.dragDropHoverClass)&&r.addClass(t.dragDropHoverClass)}),r.on("drop",function(r){r.preventDefault(),e(this).removeClass(t.dragDropHoverClass),a.errorLog.html("");var o=r.originalEvent.dataTransfer.files;return!t.multiple&&o.length>1?void(t.showError&&e("<div class='"+t.errorClass+"'>"+t.multiDragErrorStr+"</div>").appendTo(a.errorLog)):void(0!=t.onSelect(o)&&l(t,a,o))}),r.on("dragleave",function(a){e(this).removeClass(t.dragDropHoverClass)}),e(document).on("dragenter",function(e){e.stopPropagation(),e.preventDefault()}),e(document).on("dragover",function(a){a.stopPropagation(),a.preventDefault();var r=e(this);r.hasClass(t.dragDropContainerClass)||r.removeClass(t.dragDropHoverClass)}),e(document).on("drop",function(a){a.stopPropagation(),a.preventDefault(),e(this).removeClass(t.dragDropHoverClass)})}function s(e){var a="",t=e/1024;if(parseInt(t)>1024){var r=t/1024;a=r.toFixed(2)+" MB"}else a=t.toFixed(2)+" KB";return a}function i(a){var t=[];t="string"==jQuery.type(a)?a.split("&"):e.param(a).split("&");var r,o,s=t.length,i=[];for(r=0;s>r;r++)t[r]=t[r].replace(/\+/g," "),o=t[r].split("="),i.push([decodeURIComponent(o[0]),decodeURIComponent(o[1])]);return i}function l(a,t,r){for(var o=0;o<r.length;o++)if(n(t,a,r[o].name))if(a.allowDuplicates||!d(t,r[o].name))if(-1!=a.maxFileSize&&r[o].size>a.maxFileSize)a.showError&&e("<div class='"+a.errorClass+"'><b>"+r[o].name+"</b> "+a.sizeErrorStr+s(a.maxFileSize)+"</div>").appendTo(t.errorLog);else if(-1!=a.maxFileCount&&t.selectedFiles>
vendor: 4,615 bytes, line 3020
3020=a.maxFileCount)a.showError&&e("<div class='"+a.errorClass+"'><b>"+r[o].name+"</b> "+a.maxFileCountErrorStr+a.maxFileCount+"</div>").appendTo(t.errorLog);else{t.selectedFiles++,t.existingFileNames.push(r[o].name);var l=a,p=new FormData,u=a.fileName.replace("[]","");p.append(u,r[o]);var c=a.formData;if(c)for(var h=i(c),f=0;f<h.length;f++)h[f]&&p.append(h[f][0],h[f][1]);l.fileData=p;var w=new m(t,a),g="";g=a.showFileCounter?t.fileCounter+a.fileCounterStyle+r[o].name:r[o].name,a.showFileSize&&(g+=" ("+s(r[o].size)+")"),w.filename.html(g);var C=e("<form style='display:block; position:absolute;left: 150px;' class='"+t.formGroup+"' method='"+a.method+"' action='"+a.url+"' enctype='"+a.enctype+"'></form>");C.appendTo("body");var b=[];b.push(r[o].name),v(C,l,w,b,t,r[o]),t.fileCounter++}else a.showError&&e("<div class='"+a.errorClass+"'><b>"+r[o].name+"</b> "+a.duplicateErrorStr+"</div>").appendTo(t.errorLog);else a.showError&&e("<div class='"+a.errorClass+"'><b>"+r[o].name+"</b> "+a.extErrorStr+a.allowedTypes+"</div>").appendTo(t.errorLog)}function n(e,a,t){var r=a.allowedTypes.toLowerCase().split(/[\s,]+/g),o=t.split(".").pop().toLowerCase();return"*"!=a.allowedTypes&&jQuery.inArray(o,r)<0?!1:!0}function d(e,a){var t=!1;if(e.existingFileNames.length)for(var r=0;r<e.existingFileNames.length;r++)(e.existingFileNames[r]==a||w.duplicateStrict&&e.existingFileNames[r].toLowerCase()==a.toLowerCase())&&(t=!0);return t}function p(e,a){if(e.existingFileNames.length)for(var t=0;t<a.length;t++){var r=e.existingFileNames.indexOf(a[t]);-1!=r&&e.existingFileNames.splice(r,1)}}function u(e,a){if(e){a.show();var t=new FileReader;t.onload=function(e){a.attr("src",e.target.result)},t.readAsDataURL(e)}}function c(a,t){if(a.showFileCounter){var r=e(t.container).find(".ajax-file-upload-filename").length;t.fileCounter=r+1,e(t.container).find(".ajax-file-upload-filename").each(function(t,o){var s=e(this).html().split(a.fileCounterStyle),i=(parseInt(s[0])-1,r+a.fileCounterStyle+s[1]);e(this).html(i),r--})}}function h(t,r,o,s){var i="ajax-upload-id-"+(new Date).getTime(),d=e("<form method='"+o.method+"' action='"+o.url+"' enctype='"+o.enctype+"'></form>"),p="<input type='file' id='"+i+"' name='"+o.fileName+"' accept='"+o.acceptFiles+"'/>";o.multiple&&(o.fileName.indexOf("[]")!=o.fileName.length-2&&(o.fileName+="[]"),p="<input type='file' id='"+i+"' name='"+o.fileName+"' accept='"+o.acceptFiles+"' multiple/>");var u=e(p).appendTo(d);u.change(function(){t.errorLog.html("");var i=(o.allowedTypes.toLowerCase().split(","),[]);if(this.files){for(g=0;g<this.files.length;g++)i.push(this.files[g].name);if(0==o.onSelect(this.files))return}else{var p=e(this).val(),u=[];if(i.push(p),!n(t,o,p))return void(o.showError&&e("<div class='"+o.errorClass+"'><b>"+p+"</b> "+o.extErrorStr+o.allowedTypes+"</div>").appendTo(t.errorLog));if(u.push({name:p,size:"NA"}),0==o.onSelect(u))return}if(c(o,t),s.unbind("click"),d.hide(),h(t,r,o,s),d.addClass(r),o.serialize&&a.fileapi&&a.formdata){d.removeClass(r);var f=this.files;d.remove(),l(o,t,f)}else{for(var w="",g=0;g<i.length;g++)w+=o.showFileCounter?t.fileCounter+o.fileCounterStyle+i[g]+"<br>":i[g]+"<br>",t.fileCounter++;if(-1!=o.maxFileCount&&t.selectedFiles+i.length>o.maxFileCount)return void(o.showError&&e("<div class='"+o.errorClass+"'><b>"+w+"</b> "+o.maxFileCountErrorStr+o.maxFileCount+"</div>").appendTo(t.errorLog));t.selectedFiles+=i.length;var C=new m(t,o);C.filename.html(w),v(d,o,C,i,t,null)}}),o.nestedForms?(d.css({margin:0,padding:0}),s.css({position:"relative",overflow:"hidden",cursor:"default"}),u.css({position:"absolute",cursor:"pointer",top:"0px",width:"100%",height:"100%",left:"0px","z-index":"100",opacity:"0.0",filter:"alpha(opacity=0)","-ms-filter":"alpha(opacity=0)","-khtml-opacity":"0.0","-moz-opacity":"0.0"}),d.appendTo(s)):(d.appendTo(e("body")),d.css({margin:0,padding:0,display:"block",position:"absolute",left:"-250px"}),-1!=navigator.appVersion.indexOf("MSIE ")?s.attr("for",i):s.click(function(){u.click()}))}function f(a,t){return this.statusbar=e("<div class='ajax-file-upload-statusbar'></div>").width(t.statusBarWidth),this.preview=e("<img class='ajax-file-upload-preview' />").width(t.previewWidth).height(t.previewHeight).appendTo(this.statusbar).hide(),this.filename=e("<div class='ajax-file-upload-filename'></div>").appendTo(this.statusbar),this.progressDiv=e("<div class='ajax-file-upload-progress'>").appendTo(this.statusbar).hide(),this.progressbar=e("<div class='ajax-file-upload-bar'></div>").appendTo(this.progressDiv),this.abort=e("<div>"+t.abortStr+"</div>").appendTo(this.statusbar).hide(),this.cancel=e("<div>
3020"+t.cancelStr+"</div>").appendTo(this.statusbar).hide(),this.done=e("<div>"+t.doneStr+"</div>").appendTo(this.statusbar).hide(),this.download=e("<div>"+t.downloadStr+"</div>").appendTo(this.statusbar).hide(),this.del=e("<div>"+t.deletelStr+"</div>").appendTo(this.statusbar).hide(),this.abort.addClass("ajax-file-upload-red"),this.done.addClass("ajax-file-upload-green"),this.download.addClass("ajax-file-upload-green"),this.cancel.addClass("ajax-file-upload-red"),this.del.addClass("ajax-file-upload-red"),this}function m(a,t){var r=null;return r=t.customProgressBar?new t.customProgressBar(a,t):new f(a,t),r.abort.addClass(a.formGroup),r.abort.addClass(t.abortButtonClass),r.cancel.addClass(a.formGroup),r.cancel.addClass(t.cancelButtonClass),t.extraHTML&&(r.extraHTML=e("<div class='extrahtml'>"+t.extraHTML()+"</div>").insertAfter(r.filename)),"bottom"==t.uploadQueueOrder?e(a.container).append(r.statusbar):e(a.container).prepend(r.statusbar),r}function v(t,o,s,l,n,d){var h={cache:!1,contentType:!1,processData:!1,forceSync:!1,type:o.method,data:o.formData,formData:o.fileData,dataType:o.returnType,beforeSubmit:function(a,r,d){if(0!=o.onSubmit.call(this,l)){if(o.dynamicFormData){var u=i(o.dynamicFormData());if(u)for(var h=0;h<u.length;h++)u[h]&&(void 0!=o.fileData?d.formData.append(u[h][0],u[h][1]):d.data[u[h][0]]=u[h][1])}return o.extraHTML&&e(s.extraHTML).find("input,select,textarea").each(function(a,t){void 0!=o.fileData?d.formData.append(e(this).attr("name"),e(this).val()):d.data[e(this).attr("name")]=e(this).val()}),!0}return s.statusbar.append("<div class='"+o.errorClass+"'>"+o.uploadErrorStr+"</div>"),s.cancel.show(),t.remove(),s.cancel.click(function(){x.splice(x.indexOf(t),1),p(n,l),s.statusbar.remove(),o.onCancel.call(n,l,s),n.selectedFiles-=l.length,c(o,n)}),!1},beforeSend:function(e,t){s.progressDiv.show(),s.cancel.hide(),s.done.hide(),o.showAbort&&(s.abort.show(),s.abort.click(function(){p(n,l),e.abort(),n.selectedFiles-=l.length,o.onAbort.call(n,l,s)})),a.formdata?s.progressbar.width("1%"):s.progressbar.width("5%")},uploadProgress:function(e,a,t,r){r>98&&(r=98);var i=r+"%";r>1&&s.progressbar.width(i),o.showProgress&&(s.progressbar.html(i),s.progressbar.css("text-align","center"))},success:function(a,r,i){if(s.cancel.remove(),D.pop(),"json"==o.returnType&&"object"==e.type(a)&&a.hasOwnProperty(o.customErrorKeyStr)){s.abort.hide();var d=a[o.customErrorKeyStr];return o.onError.call(this,l,200,d,s),o.showStatusAfterError?(s.progressDiv.hide(),s.statusbar.append("<span class='"+o.errorClass+"'>ERROR: "+d+"</span>")):(s.statusbar.hide(),s.statusbar.remove()),n.selectedFiles-=l.length,void t.remove()}n.responses.push(a),s.progressbar.width("100%"),o.showProgress&&(s.progressbar.html("100%"),s.progressbar.css("text-align","center")),s.abort.hide(),o.onSuccess.call(this,l,a,i,s),o.showStatusAfterSuccess?(o.showDone?(s.done.show(),s.done.click(function(){s.statusbar.hide("slow"),s.statusbar.remove()})):s.done.hide(),o.showDelete?(s.del.show(),s.del.click(function(){p(n,l),s.statusbar.hide().remove(),o.deleteCallback&&o.deleteCallback.call(this,a,s),n.selectedFiles-=l.length,c(o,n)})):s.del.hide()):(s.statusbar.hide("slow"),s.statusbar.remove()),o.showDownload&&(s.download.show(),s.download.click(function(){o.downloadCallback&&o.downloadCallback(a)})),t.remove()},error:function(e,a,r){s.cancel.remove(),D.pop(),s.abort.hide(),"abort"==e.statusText?(s.statusbar.hide("slow").remove(),c(o,n)):(o.onError.call(this,l,a,r,s),o.showStatusAfterError?(s.progressDiv.hide(),s.statusbar.append("<span class='"+o.errorClass+"'>ERROR: "+r+"</span>")):(s.statusbar.hide(),s.statusbar.remove()),n.selectedFiles-=l.length),t.remove()}};o.showPreview&&null!=d&&"image"==d.type.toLowerCase().split("/").shift()&&u(d,s.preview),o.autoSubmit?(t.ajaxForm(h),x.push(t),r()):(o.showCancel&&(s.cancel.show(),s.cancel.click(function(){x.splice(x.indexOf(t),1),p(n,l),t.remove(),s.statusbar.remove(),o.onCancel.call(n,l,s),n.selectedFiles-=l.length,c(o,n)})),t.ajaxForm(h))}var w=e.extend({url:"",method:"POST",enctype:"multipart/form-data",returnType:null,allowDuplicates:!0,duplicateStrict:!1,allowedTypes:"*",acceptFiles:"*",fileName:"file",formData:!1,dynamicFormData:!1,maxFileSize:-1,maxFileC
3020ount:-1,multiple:!0,dragDrop:!0,autoSubmit:!0,showCancel:!0,showAbort:!0,showDone:!1,showDelete:!1,showError:!0,showStatusAfterSuccess:!0,showStatusAfterError:!0,showFileCounter:!0,fileCounterStyle:"). ",showFileSize:!0,showProgress:!1,nestedForms:!0,showDownload:!1,onLoad:function(e){},onSelect:function(e){return!0},onSubmit:function(e,a){},onSuccess:function(e,a,t,r){},onError:function(e,a,t,r){},onCancel:function(e,a){},onAbort:function(e,a){},downloadCallback:!1,deleteCallback:!1,afterUploadAll:!1,serialize:!0,sequential:!1,sequentialCount:2,customProgressBar:!1,abortButtonClass:"ajax-file-upload-abort",cancelButtonClass:"ajax-file-upload-cancel",dragDropContainerClass:"ajax-upload-dragdrop",dragDropHoverClass:"state-hover",errorClass:"ajax-file-upload-error",uploadButtonClass:"ajax-file-upload",dragDropStr:"<span><b>Drag & Drop Files</b></span>",uploadStr:"Upload",abortStr:"Abort",cancelStr:"Cancel",deletelStr:"Delete",doneStr:"Done",multiDragErrorStr:"Multiple File Drag & Drop is not allowed.",extErrorStr:"is not allowed. Allowed extensions: ",duplicateErrorStr:"is not allowed. File already exists.",sizeErrorStr:"is not allowed. Allowed Max size: ",uploadErrorStr:"Upload is not allowed",maxFileCountErrorStr:" is not allowed. Maximum allowed files are:",downloadStr:"Download",customErrorKeyStr:"jquery-upload-file-error",showQueueDiv:!1,statusBarWidth:400,dragdropWidth:400,showPreview:!1,previewHeight:"auto",previewWidth:"100%",extraHTML:!1,uploadQueueOrder:"top"},t);this.fileCounter=1,this.selectedFiles=0;var g="ajax-file-upload-"+(new Date).getTime();this.formGroup=g,this.errorLog=e("<div></div>"),this.responses=[],this.existingFileNames=[],a.formdata||(w.dragDrop=!1),a.formdata||(w.multiple=!1),e(this).html("");var C=this,b=e("<div>"+w.uploadStr+"</div>");e(b).addClass(w.uploadButtonClass),function F(){if(e.fn.ajaxForm){if(w.dragDrop){var a=e('<div class="'+w.dragDropContainerClass+'" style="vertical-align:top;"></div>').width(w.dragdropWidth);e(C).append(a),e(a).append(b),e(a).append(e(w.dragDropStr)),o(C,w,a)}else e(C).append(b);e(C).append(C.errorLog),w.showQueueDiv?C.container=e("#"+w.showQueueDiv):C.container=e("<div class='ajax-file-upload-container'></div>").insertAfter(e(C)),w.onLoad.call(this,C),h(C,g,w,b)}else window.setTimeout(F,10)}(),this.startUpload=function(){e("form").each(function(a,t){e(this).hasClass(C.formGroup)&&x.push(e(this))}),x.length>=1&&r()},this.getFileCount=function(){return C.selectedFiles},this.stopUpload=function(){e("."+w.abortButtonClass).each(function(a,t){e(this).hasClass(C.formGroup)&&e(this).click()}),e("."+w.cancelButtonClass).each(function(a,t){e(this).hasClass(C.formGroup)&&e(this).click()})},this.cancelAll=function(){e("."+w.cancelButtonClass).each(function(a,t){e(this).hasClass(C.formGroup)&&e(this).click()})},this.update=function(a){w=e.extend(w,a)},this.reset=function(e){C.fileCounter=1,C.selectedFiles=0,C.errorLog.html(""),0!=e&&C.container.html("")},this.remove=function(){C.container.html(""),e(C).remove()},this.createProgress=function(e,a,t){var r=new m(this,w);r.progressDiv.show(),r.progressbar.width("100%");var o="";return o=w.showFileCounter?C.fileCounter+w.fileCounterStyle+e:e,w.showFileSize&&(o+=" ("+s(t)+")"),r.filename.html(o),C.fileCounter++,C.selectedFiles++,w.showPreview&&(r.preview.attr("src",a),r.preview.show()),w.showDownload&&(r.download.show(),r.download.click(function(){w.downloadCallback&&w.downloadCallback.call(C,[e])})),w.showDelete&&(r.del.show(),r.del.click(function(){r.statusbar.hide().remove();var a=[e];w.deleteCallback&&w.deleteCallback.call(this,a,r),C.selectedFiles-=1,c(w,C)})),r},this.getResponses=function(){return this.responses};var x=[],D=[],S=!1;return this}}(jQuery); 3021/* End */ 3022; 3023; /* Start:"a:4:{s:4:"full";s:55:"/local/templates/voenchast/js/common.js?178652164561024";s:6:"source";s:39:"/local/templates/voenchast/js/common.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3024function withoutCyr(input) { 3025 var value = input.value; 3026 var re = /а|б|в|г|д|е|Ñ|ж|з|и|Ñ|к|л|м|н|о|п|Ñ|Ñ|Ñ|Ñ|Ñ|Ñ |Ñ|Ñ|Ñ|Ñ|Ñ|Ñ|Ñ|Ñ|Ñ|Ñ/gi; 3027 if (re.test(value)) { 3028 value = value.replace(re, ''); 3029 input.value = value; 3030 } 3031} 3032function strstr(haystack, needle, bool) { // Find first occurrence of a string 3033 // 3034 // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) 3035 3036 var pos = 0; 3037 3038 pos = haystack.indexOf(needle); 3039 if (pos == -1) { 3040 return false; 3041 } else { 3042 if (bool) { 3043 return haystack.substr(0, pos); 3044 } else { 3045 return haystack.slice(pos); 3046 } 3047 } 3048} 3049 3050var can_get_chat = true; 3051 3052function getChat(user_id) { 3053 if (!can_get_chat) return; 3054 3055 var last_id = parseInt($('#send_message [name=last_id]').val()); 3056 3057 can_get_chat = false; 3058 3059 if (!last_id) { 3060 $('.current_dialog').html(''); 3061 }
3062 if (!last_id && user_id) 3063 $('.current_dialog').html('<img src="/local/images/preloader.gif" style="display:block;position:relative;top:48%;left:48%;" />'); 3064 3065 3066 $.post('/local/ajax/chat_get_dialog.php', {user_id: user_id, last_id: last_id}, 3067 function (data) { 3068 3069 if (last_id) 3070 $('.current_dialog').append(data.html); 3071 else if (user_id) { 3072 $('.current_dialog').html(data.html); 3073 $('#user_dialogs .user_block').removeClass('active'); 3074 $('#user_dialogs .user_block[data-user_id="' + user_id + '"]').addClass('active'); 3075 } 3076 if (data.last_id) 3077 $('#send_message [name=last_id]').val(data.last_id); 3078 $('#send_message [name=user_id]').val(user_id); 3079 3080 3081 if (data.dialogs) 3082 $('#user_dialogs .dialogs').html(data.dialogs); 3083 3084 if (data.unread) { 3085 $('.head-right .num1 sup').html(data.unread); 3086 $('.head-right .num1 sup').hide(); 3087 if (parseInt(data.unread) > 0) 3088 $('.head-right .num1 sup').show(); 3089 } 3090 else { 3091 $('.head-right .num1 sup').html(0); 3092 $('.head-right .num1 sup').hide(); 3093 } 3094 3095 3096 var objDiv = document.getElementById("current_dialog"); 3097 objDiv.scrollTop = objDiv.scrollHeight; 3098 3099 can_get_chat = true; 3100 3101 3102 if (user_id) { 3103 $('#user_dialogs .user_block').removeClass('active'); 3104 $('#user_dialogs .user_block[data-user_id="' + user_id + '"]').addClass('active'); 3105 } 3106 3107 3108 }, 'json'); 3109} 3110 3111$(document).on('click', '.jSearchMailVch', function(){ 3112 var uId = $(this).data('id'); 3113 3114 getChat(uId); 3115 $('.head-right .num1').trigger('click'); 3116 3117 return false; 3118}); 3119 3120var blog_item_clicked; 3121$(document).ready(function () { 3122 $('.header_home .soc-block a').click(function () { 3123 3124 var sn = $(this).data('sn'); 3125 $('.header_home .ulogin-button-' + sn).trigger('click'); 3126 3127 return false; 3128 }); 3129 3130 function phoneInputHandler() { 3131 if (!this.value.match(/^[-0-9+()]*$/)) { 3132 this.value = this.getAttribute("value"); 3133 } else { 3134 this.setAttribute("value", this.value); 3135 } 3136 } 3137 3138 $('[name=PERSONAL_PHONE]').on("input", phoneInputHandler); 3139 $('[name="UF_PHONES[]"]').on("input", phoneInputHandler); 3140 3141 $('.plus.add_phone').on('click', function () { 3142 3143 var n = $(this).parents('table').find('tr.additional_phone').length; 3144 var html = '' + 3145 '<tr class="additional_phone">' + 3146 '<td class="label"><label></label></td>' + 3147 '<td width="460">' + 3148 '<div class="border add_input">' + 3149 '<input name="UF_PHONES[]" placeholder="+7 (495) 962-62-62" type="phone">' + 3150 '</div>' + 3151 '</td>' + 3152 '<td>' + 3153 '<div class="border">' + 3154 '<span class="minus"></span>' + 3155 '</div>' + 3156 '</td>' + 3157 '</tr>' + 3158 ''; 3159 3160 if (n) 3161 $(this).parents('table').find('tr.additional_phone').eq(n - 1).after(html); 3162 else 3163 $(this).parents('tr').after(html); 3164 $('[name="UF_PHONES[]"]').on("input", phoneInputHandler); 3165 3166 }); 3167 3168 $('.plus.add_email').on('click', function () { 3169 3170 var n = $(this).parents('table').find('tr.additional_email').length; 3171 var html = '' + 3172 '<tr class="additional_email">' + 3173 '<td class="label"><label></label></td>' + 3174 '<td width="460">' + 3175 '<div class="border add_input">' + 3176 '<input name="UF_EMAILS[]" placeholder="[email protected]" type="email">' + 3177 '</div>' + 3178 '</td>' + 3179 '<td>' + 3180 '<div class="border">' + 3181 '<span class="minus"></span>' + 3182 '</div>' + 3183 '</td>' + 3184 '</tr>' + 3185 ''; 3186 3187 if (n) 3188 $(this).parents('table').find('tr.additional_email').eq(n - 1).after(html); 3189 else 3190 $(this).parents('tr').after(html); 3191 3192 });
3193 3194 $('.form_conent.slugba').submit(function () { 3195 3196 var go = true; 3197 $(this).find('[name="SLUGBA[MILITARY_UNIT][]"]').each(function () { 3198 3199 if ($(this).val().length < 4 || $(this).val().length > 5) { 3200 go = false; 3201 } 3202 3203 }); 3204 3205 if (!go) { 3206 alert('ÐÐ¾Ð¼ÐµÑ Ð²Ð¾Ð¸Ð½Ñкой ÑаÑÑи должен ÑоÑÑоÑÑÑ Ð¸Ð· 4 или 5 ÑиÑÑ'); 3207 return false; 3208 } 3209 3210 }); 3211 3212 $('.plus.add_slugba').on('click', function () { 3213 3214 var n = $(this).parents('table').find('tr.slugba').length; 3215 var html = '' + 3216 '<tr>' + 3217 '<td class="col1"></td>' + 3218 '<td class="col2"><div class="border"><input name="SLUGBA[MILITARY_UNIT][]" placeholder="12345" type="text"></div></td>' + 3219 '<td class="col3">Ñ</td>' + 3220 '<td class="col4"><div class="border"><input name="SLUGBA[FROM][]" placeholder="2012" type="text"></div></td>' + 3221 '<td class="col3">по</td>' + 3222 '<td class="col4"><div class="border"><input name="SLUGBA[TO][]" placeholder="2013" type="text"></div></td>' + 3223 '<td class="col5">' + 3224 '<div class="border">' + 3225 '<span class="minus"></span>' + 3226 '</div>' + 3227 '</td>' + 3228 '</tr>' + 3229 ''; 3230 3231 if (n) 3232 $(this).parents('table').find('tr:last-child').before(html); 3233 else 3234 $(this).parents('tr').after(html); 3235 $('[name="SLUGBA[FROM][]"]').mask('9999'); 3236 $('[name="SLUGBA[TO][]"]').mask('9999'); 3237 3238 }); 3239 3240 3241 $('body').on('click', '.minus', function () { 3242 $(this).parents('tr').remove(); 3243 }); 3244 3245 $('.show_change').click(function () { 3246 3247 var id = $(this).parents('tr').attr('id'); 3248 $(this).parents('tr').hide(); 3249 3250 $('#' + id + '_change').show(); 3251 3252 return false; 3253 }); 3254 3255 $('.submit_change').click(function () { 3256 3257 $(this).parents('form').submit(); 3258 3259 return false; 3260 }); 3261 3262 $('body').on('click','li.like a',function() { 3263 var url = "/local/components/vamba/rating.vote/vote.ajax.php"; 3264 3265 var action = "plus"; 3266 if ($(this).hasClass('liked')) 3267 action = "cancel"; 3268 3269 var s = $(this).data('sessid').split('='); 3270 3271 var data = { 3272 RATING_VOTE: "Y", 3273 RATING_VOTE_TYPE_ID: "BLOG_POST", 3274 RATING_VOTE_ENTITY_ID: $(this).data('entity_id'), 3275 RATING_VOTE_ACTION: action, 3276 sessid: s[1] 3277 }; 3278 3279 if ($(this).parents('.obsugden').length) { 3280 data.RATING_VOTE_TYPE_ID = 'FORUM_POST'; 3281 } 3282 if ($(this).parents('.item_obsugd').hasClass('firstm')) { 3283 data.RATING_VOTE_TYPE_ID = 'FORUM_TOPIC'; 3284 } 3285 if ($(this).parents('.feed-log-entry').length) { 3286 data.RATING_VOTE_TYPE_ID = 'IBLOCK_SECTION'; 3287 } 3288 3289 var t = $(this); 3290 var p = t.parents('.action_block '); 3291 var lw = p.find('.like_window'); 3292 3293 $.ajax({
3294 url: url, 3295 method: "POST", 3296 data: data, 3297 dataType: "json", 3298 success: function (res) { 3299 console.log(t); 3300 t.find('b').text(res.items_all); 3301 if (action == 'cancel') t.removeClass('liked'); 3302 else t.addClass('liked'); 3303 3304 lw.html(res.html); 3305 3306 if (res.html) { 3307 lw.show(); 3308 } 3309 3310 3311 }, 3312 error: function (res, textStatus, err) { 3313 3314 console.log(res); 3315 console.log(textStatus); 3316 console.log(err); 3317 3318 } 3319 }); 3320 3321 //return false; 3322 }); 3323 3324 3325 $('[name=to_years], [name=from_years]').change(function () { 3326 var d = new Date(); 3327 var y = d.getFullYear(); 3328 3329 var to0 = $('[name=to_years]').val(); 3330 var from0 = $('[name=from_years]').val(); 3331 3332 var y1 = y - to0; 3333 var y2 = y - from0; 3334 3335 $('[name=flt_personal_birthday_year]').val(y1 + ',' + y2); 3336 3337 }); 3338 3339 3340 $('body').on('click', '.delete_post', function () { 3341 if (confirm('ÐÑ ÑвеÑенÑ?')) { 3342 var id = $(this).data('id'); 3343 var t = $(this); 3344 $.get('/ajax/delete_post.php?id=' + id, 3345 function (data) { 3346 if (data) 3347 alert(data); 3348 else { 3349 t.parents('.blog_post').remove(); 3350 } 3351 }); 3352 } 3353 3354 return false; 3355 }); 3356 3357 $('body').on('click', '.post_approve', function (e) { 3358 e.preventDefault(); 3359 var t = $(this), 3360 id = t.data('id'); 3361 $.get('/local/ajax/approve_post.php?id=' + id, 3362 function (data) { 3363 if (data.status == 'success') { 3364 t.remove(); 3365 } 3366 else { 3367 console.log(data); 3368 } 3369 } 3370 ); 3371 }); 3372 3373 $('[name=flt_personal_city]').keyup(function () { 3374 var v = $(this).val(); 3375 console.log(v.length); 3376 $('.city_vars').hide(); 3377 if (v.length > 1) { 3378 $.get('/ajax/get_cities.php?city=' + v, 3379 function (data) { 3380 $('.city_vars').html(data); 3381 $('.city_vars').show(); 3382 }); 3383 } 3384 else { 3385 $('.city_vars').html(''); 3386 $('.city_vars').hide(); 3387 } 3388 }); 3389 3390 $('body').on('click', '.city_search_result', function (data) { 3391 var t = $(this).text(); 3392 $(this).parent().parent().find('[type=text]').val(t); 3393 $(this).parent().hide(); 3394 3395 return false; 3396 }); 3397 3398 3399 $('[name=PERSONAL_CITY]').keyup(function () { 3400 var v = $(this).val(); 3401 console.log(v.length); 3402 $('.city_vars').hide(); 3403 if (v.length > 1) { 3404 $.get('/ajax/get_cities.php?city=' + v, 3405 function (data) { 3406 $('.city_vars').html(data); 3407 $('.city_vars').show(); 3408 }); 3409 } 3410 else { 3411 $('.city_vars').html(''); 3412 $('.city_vars').hide(); 3413 } 3414 }); 3415 3416 $('#contacts_form').submit(function () { 3417 3418 var vk = $(this).find('[name=UF_VK]').val(); 3419 if (vk && vk.substring(0, 7) != 'vk.com/') { 3420 alert('ÐÑоÑÐ¸Ð»Ñ vk должен наÑинаÑÑÑÑ Ñ vk.com/') 3421 return false; 3422 } 3423 var fb = $(this).find('[name=UF_FB]').val(); 3424 if (fb && fb.substring(0, 13) != 'facebook.com/') { 3425 alert('ÐÑоÑÐ¸Ð»Ñ facebook должен наÑинаÑÑÑÑ Ñ facebook.com/') 3426 return false; 3427 } 3428 var ok = $(this).find('[name=UF_OK]').val(); 3429 if (ok && ok.substring(0, 6) != 'ok.ru/') { 3430 alert('ÐÑоÑÐ¸Ð»Ñ ok должен наÑинаÑÑÑÑ Ñ ok.ru/') 3431 return false; 3432 } 3433 3434 }); 3435 3436 if ($('.popular_blog_post').length) { 3437 $('.popular_blog_post').each(function () { 3438 var p = $(this).find('.dtext'); 3439 p.css('height', 'auto'); 3440 if (p.height() <= 100) 3441 $(this).find('.read_more').hide(); 3442 3443 p.css('height', '100px'); 3444 }); 3445 3446 $('.popular_blog_post .read_more a').click(function () { 3447 var dtext = $(this).parents('.popular_blog_post').find('.dtext'); 3448 3449 console.log(dtext.css('height')); 3450 if (dtext.css('height') != '100px') { 3451 dtext.css('height', '100px'); 3452 $(this).text('ЧиÑаÑÑ Ð´Ð°Ð»ÐµÐµ'); 3453 } 3454 else { 3455 dtext.css('height', 'auto'); 3456 $(this).text('СвеÑнÑÑÑ'); 3457 } 3458 3459 return false; 3460 }); 3461 } 3462 if ($('.blog_post').length) { 3463 $('.blog_post').each(function () { 3464 var p = $(this).find('.text_block'); 3465 p.css('height', 'auto'); 3466 3467 if (p.hasClass('repost')) { 3468 if (p.height() <= 200) 3469 $(this).find('.read_more').hide(); 3470 3471 p.css('height', '200px'); 3472 } 3473 else if (p.find('iframe').length || p.find('img').length) { 3474 $(this).find('.read_more').hide(); 3475 } 3476 else { 3477 if (p.height() <= 100) 3478 $(this).find('.read_more').hide(); 3479 ///p.css('height', '95px'); 3480 } 3481 }); 3482 3483 $('body').on('click', '.blog_post .read_more a', function () { 3484 console.log('test'); 3485 //var p = $(this).parents('.blog_post').find('.text_block'); 3486 var text_block = $(this).parents('.blog_post').find('.text_block'); 3487 /*var text_block_table = text_block.find('table');*/ 3488 if (text_block.hasClass('height_max')) { 3489 if (text_block.css('height') != '345px') { 3490 text_block.css('height', '345px'); 3491 $(this).text('ЧиÑаÑÑ Ð´Ð°Ð»ÐµÐµ'); 3492 } 3493 else { 3494 text_block.css('height', 'auto'); 3495 $(this).text('СвеÑнÑÑÑ'); 3496 } 3497 } 3498 else { 3499 if (text_block.hasClass('repost')) { 3500 if (text_block.css('height') != '200px') { 3501 text_block.css('height', '200px'); 3502 $(this).text('ЧиÑаÑÑ Ð´Ð°Ð»ÐµÐµ'); 3503 } 3504 else { 3505 text_block.css('height', 'auto'); 3506 $(this).text('СвеÑнÑÑÑ'); 3507 } 3508 } 3509 else { 3510 if (text_block.height() == 95) { 3511 text_block.css('height', 'auto'); 3512 $(this).text('СвеÑнÑÑÑ'); 3513 } 3514 else { 3515 text_block.css('height', '95px'); 3516 $(this).text('ЧиÑаÑÑ Ð´Ð°Ð»ÐµÐµ'); 3517 } 3518 } 3519 } 3520 /*if (text_block.css('height') != '100px') { 3521 text_block.css('height', '100px'); 3522 $(this).text('ЧиÑаÑÑ Ð´Ð°Ð»ÐµÐµ'); 3523 } 3524 else { 3525 text_block.css('height', 'auto'); 3526 $(this).text('СвеÑнÑÑÑ'); 3527 }*/ 3528 3529 3530 return false; 3531 }); 3532 } 3533 3534 $('#up_group_search_form input').keyup(function () { 3535 if (!$('.search_group').length) { 3536 $('.foto_block_zdem').before('<div class="foto_block_zdem grupp search_group"></div>'); 3537 } 3538 var v = $(this).val(); 3539 3540 if (!v) { 3541 $('.foto_block_zdem').not('.search_group').show(); 3542 $('.search_group').hide(); 3543 } 3544 else { 3545 $('.foto_block_zdem').not('.search_group').hide(); 3546 $('.search_group').show(); 3547 3548 var url = '/local/ajax/ajax_group_search.php?s=' + v; 3549 $.get(url, 3550 function (data) { 3551 $('.search_group').html(data); 3552 if (!data) $('.search_group').html('ÐÑÑпп не найдено'); 3553 }); 3554 } 3555 3556 3557 });
3558 3559 3560 $('.search_chast input').keyup(function () { 3561 if (!$('.foto_block_zdem_search').length) { 3562 $('.foto_block_zdem').before('<div class="foto_block_zdem foto_block_zdem_search"></div>'); 3563 } 3564 var v = $(this).val(); 3565 3566 if (!v) { 3567 $('.foto_block_zdem').not('.foto_block_zdem_search').show(); 3568 $('.foto_block_zdem_search').hide(); 3569 } 3570 else { 3571 $('.foto_block_zdem').not('.foto_block_zdem_search').hide(); 3572 $('.foto_block_zdem_search').show(); 3573 3574 var url = '/ajax/get_friends.php?s=' + v; 3575 if ($(this).parent().hasClass('vch')) { 3576 url += '&vch=' + $(this).parent().data('id'); 3577 } 3578 3579 $.get(url, 3580 function (data) { 3581 $('.foto_block_zdem_search').html(data); 3582 if (!data) $('.foto_block_zdem_search').html('ÐикÑо не найден'); 3583 }); 3584 } 3585 3586 3587 }); 3588 3589 $('[name=to_years], [name=from_years]').keydown(function (event) { 3590 if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || 3591 // РазÑеÑаем: Ctrl+A 3592 (event.keyCode == 65 && event.ctrlKey === true) || 3593 // РазÑеÑаем: home, end, влево, впÑаво 3594 (event.keyCode >= 35 && event.keyCode <= 39)) { 3595 // ÐиÑего не делаем 3596 return; 3597 } 3598 else { 3599 // ÐбеждаемÑÑ, ÑÑо ÑÑо ÑиÑÑа, и оÑÑанавливаем ÑобÑÑие keypress 3600 if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) { 3601 event.preventDefault(); 3602 } 3603 } 3604 }); 3605 3606 $('[name="SLUGBA[FROM][]"]').mask('9999'); 3607 $('[name="SLUGBA[TO][]"]').mask('9999'); 3608 3609 $('.num4, .sub').hover(function () { 3610 $('.sub').show(); 3611 }, function () { 3612 $('.sub').hide(); 3613 }); 3614 3615 3616 $('body').magnificPopup({ 3617 delegate: '.popup-link', 3618 type: 'inline', 3619 fixedContentPos: true, 3620 fixedBgPos: true, 3621 overflowY: 'auto', 3622 closeBtnInside: true, 3623 preloader: false, 3624 midClick: true, 3625 removalDelay: 300, 3626 mainClass: 'my-mfp-zoom-in', 3627 callbacks: { 3628 close: function () { 3629 var p = $('#group_claim_form').parents('.popup-block'); 3630 p.find('.title').show(); 3631 p.find('form').show(); 3632 p.find('.sent').hide(); 3633 } 3634 } 3635 }); 3636 3637 3638 $('#group_claim_form').submit(function () { 3639 3640 var a = $(this).serialize(); 3641 var p = $(this).parents('.popup-block'); 3642 $.post('/local/ajax/submit_claim_form.php', a, 3643 function (data) { 3644 console.log(data); 3645 if (data.result) { 3646 p.addClass('one_line_text'); 3647 /*p.find('.body').html('СпаÑибо! ÐаÑа заÑвка пÑинÑÑа!'); 3648 p.find('.title').html(''); 3649 p.find('.header').css('background', '#f8f8f8');*/ 3650 p.find('textarea').val(''); 3651 p.find('.title').hide(); 3652 p.find('form').hide(); 3653 p.find('.sent').show(); 3654 } 3655 else { 3656 alert(data.error); 3657 } 3658 3659 }, 'json'); 3660 3661 return false; 3662 }); 3663 3664 $('.tab-link').click(function () { 3665 3666 var id = '#' + $(this).data('tab'); 3667 $(this).parents('.tabs-block').find('.tab').hide(); 3668 $(id).show(); 3669 3670 return false; 3671 }); 3672 3673 3674 $('body').on('click', '#user_friends .user_block', function () { 3675 var user_id = $(this).data('user_id').split(','); 3676 $('#send_message [name=last_id]').val(''); 3677 $('.current_dialog').html(''); 3678 var name = $(this).find('.name').text(); 3679 var names = $(this).find('.name').text().split(','); 3680 links = [];
3681 names.forEach(function (item, i, arr) { 3682 links.push('<a href="/personal/user/' + user_id[i] + '/">' + item + '</a>'); 3683 }); 3684 3685 $('#soob_window .right_block2 .title span').html(links.join(', ')); 3686 3687 getChat(user_id); 3688 3689 return false; 3690 }); 3691 $('body').on('click', '#user_dialogs .user_block', function () { 3692 var user_id = $(this).data('user_id').split(','); 3693 $('#send_message [name=last_id]').val(''); 3694 $('.current_dialog').html(''); 3695 var name = $(this).find('.name').text(); 3696 var names = $(this).find('.name').text().split(','); 3697 3698 links = []; 3699 names.forEach(function (item, i, arr) { 3700 links.push('<a href="/personal/user/' + user_id[i] + '/">' + item + '</a>'); 3701 }); 3702 3703 $('#soob_window .right_block2 .title span').html(links.join(', ')); 3704 //$('#soob_window .right_block2 .title span').text(name); 3705 3706 getChat(user_id); 3707 3708 return false; 3709 }); 3710 $('#inv_button').click(function () { 3711 3712 if ($('.invite:checked').length) { 3713 var user_id = new Array(); 3714 var name = new Array(); 3715 $('.invite:checked').each(function () { 3716 3717 user_id.push($(this).val()); 3718 var n = $(this).parents('tr').find('.w2 b').text(); 3719 name.push(n); 3720 3721 }); 3722 $('#send_message [name=last_id]').val(''); 3723 $('.current_dialog').html(''); 3724 $('#send_message [name=user_id]').val(user_id); 3725 $('#soob_window .right_block2 .title span').text(name); 3726 3727 getChat(user_id); 3728 } 3729 else { 3730 alert('ÐикÑо не вÑбÑан'); 3731 } 3732 3733 return false; 3734 }); 3735 3736 3737 $('#send_message').submit(function () { 3738 3739 var a = $(this).serialize(); 3740 var user_id = $(this).find('[name=user_id]').val(); 3741 3742 if (!user_id) { 3743 alert('Ðе вÑбÑан диалог'); 3744 return false; 3745 } 3746 3747 var ttt = $(this); 3748 3749 $.get('/local/ajax/messages_check_rights.php?user_id=' + user_id, 3750 function (data) { 3751 if (data == 1) { 3752 ttt.find('textarea').val(''); 3753 3754 $.post('/local/ajax/chat_send_message.php', a, 3755 function (data) { 3756 3757 getChat(user_id); 3758 3759 /* 3760 $('#send_message [name=last_id]').val(data.last_id); 3761 3762 $('.current_dialog').append(data.html); 3763 3764 var objDiv = document.getElementById("current_dialog"); 3765 objDiv.scrollTop = objDiv.scrollHeight; 3766 */ 3767 3768 }, 'json'); 3769 } 3770 else if (data == 0) { 3771 alert('ÐолÑзоваÑÐµÐ»Ñ Ð¾Ð³ÑаниÑил кол-во лÑдей, коÑоÑÑе могÑÑ ÐµÐ¼Ñ Ð¿Ð¸ÑаÑÑ'); 3772 } 3773 else 3774 alert(data); 3775 }); 3776 3777 3778 return false; 3779 }); 3780 3781 var chatInterval = setInterval(function () { 3782 3783 var user_id = $('#send_message').find('[name=user_id]').val(); 3784 var last_id = $('#send_message').find('[name=last_id]').val(); 3785 3786 3787 if (user_id) { 3788 3789 getChat(user_id); 3790 /* 3791 $.post('/local/ajax/chat_get_dialog.php',{user_id:user_id,last_id:last_id}, 3792 function(data){ 3793 3794 if(data.last_id) 3795 $('#send_message [name=last_id]').val(data.last_id); 3796 3797 $('.current_dialog').append(data.html); 3798 3799 var objDiv = document.getElementById("current_dialog"); 3800 objDiv.scrollTop = objDiv.scrollHeight; 3801 3802 },'json'); 3803 */ 3804 } 3805 3806 }, 5000); 3807 3808 3809 $('body').on('submit', '.share_form', function () { 3810 3811 var a = $(this).serialize(); 3812 3813 var st = $(this).find('[name=share_to]:checked').val(); 3814 3815 if (st == 'message' && !parseInt($(this).find('.fr_select select').val())) { 3816 alert('УкажиÑе дÑÑга Ð´Ð»Ñ Ð¾ÑпÑавки'); 3817 return false; 3818 } 3819 3820 $.post('/local/ajax/submit_share_form.php', a, 3821 function (data) { 3822 if (data.result) { 3823 alert('УÑпеÑно!'); 3824 location.reload(); 3825 } 3826 else 3827 alert(data.error); 3828 }, 'json'); 3829 3830 return false; 3831 });
3832 3833 if ($('.ajax_paginator').length) { 3834 var paginator_top = new Array(); 3835 var paginator_flag = new Array(); 3836 3837 $('.ajax_paginator').each(function () { 3838 paginator_top.push($(this).offset().top); 3839 paginator_flag.push(true); 3840 }); 3841 3842 $(window).scroll(function () { 3843 3844 var wh = $(this).height(); 3845 var st = $(this).scrollTop(); 3846 3847 var h = wh + st; 3848 3849 3850 $('.ajax_paginator').each(function (i) { 3851 3852 var t = $(this); 3853 var navnum = $(this).data('navnum'); 3854 var page = $(this).data('page'); 3855 var max = $(this).data('max'); 3856 var u = $(this).data('unique'); 3857 3858 if (h >= paginator_top[i] && paginator_flag[i]) { 3859 paginator_flag[i] = false; 3860 page++; 3861 var href = location.href.replace(location.hash, ""); 3862 var url = ~href.indexOf("?") ? href + "&" : href + "?"; 3863 $.ajax({
3864 url: url + 'ajax_' + u + '=Y&PAGEN_' + navnum + '=' + page, 3865 data: {}, 3866 success: function (data) { 3867 console.log(data.length); 3868 $('#' + u).append(data); 3869 if (page < max) { 3870 t.data('page', page); 3871 paginator_top[i] = t.offset().top; 3872 paginator_flag[i] = true; 3873 } 3874 3875 }}); 3876 3877 } 3878 }); 3879 3880 3881 }); 3882 3883 } 3884 //if ($('#fileuploader').length > 0) { 3885 var uploadObj = $("#fileuploader").uploadFile({ 3886 url: "/local/templates/voenchast/js/jquery-upload-file/php/upload.php", 3887 fileName: "myfile", 3888 allowedTypes: "jpg,png", 3889 acceptFiles: "/*", 3890 multiple: true, 3891 showPreview: true, 3892 dragdropWidth: "100%", 3893 previewWidth: "auto", 3894 previewHeight: "100%", 3895 autoSubmit: false, 3896 showDelete: true, 3897 showFileSize: false, 3898 maxFileCount: 10, 3899 autoSubmit: true, 3900 uploadStr: 'вÑбеÑиÑе на компÑÑÑеÑе', 3901 dragDropStr: '<span>или пеÑеÑаÑиÑе ÑоÑогÑаÑии ÑÑда</span>', 3902 maxFileCountErrorStr: 'не загÑÑжен. ÐакÑималÑно допÑÑÑимо к загÑÑзке Ñайлов: ', 3903 afterUploadAll: function (obj) { 3904 setTimeout(function () { 3905 $('.ajax-file-upload-progress').fadeOut(300); 3906 3907 $('.ajax-file-upload-statusbar').each(function (i) { 3908 3909 if (!$(this).find('a.delete').length) { 3910 $(this).prepend('<a href="#" class="delete" style="position:absolute;top:0;right:0;display:block;width:37px;height:38px;background-image:url(/images/basket_mini_hover.png);"></a>'); 3911 } 3912 3913 var chkd = false; 3914 if ($(this).find('.main_photo:checked').length) 3915 chkd = true; 3916 $(this).find('.main_photo').parent().remove(); 3917 3918 if (!chkd) 3919 $(this).append('<label><input type="radio" name="main_photo" class="main_photo" value="' + i + '" /> ÐÑновное ÑоÑо</label>'); 3920 else 3921 $(this).append('<label><input type="radio" name="main_photo" class="main_photo" value="' + i + '" checked /> ÐÑновное ÑоÑо</label>'); 3922 3923 }); 3924 3925 3926 }, 300); 3927 3928 3929 var site = 'http://' + location.host + '/upload/temp_files/'; 3930 $.each(obj.responses, function (key, value) { 3931 var v = site + value; 3932 var name = 'image[]'; 3933 3934 if (!$('.uimages [value="' + v + '"]').length) 3935 $('.uimages').prepend('<input type="hidden" name="' + name + '" value="' + v + '" />'); 3936 }); 3937 3938 3939 }, 3940 onLoad: function (obj) { 3941 3942 3943 } 3944 3945 }); 3946 // } 3947 3948 3949 $('body').on('click', '.ajax-file-upload-statusbar .delete', function () { 3950 3951 $(this).parent().find('.ajax-file-upload-red:last-child').click(); 3952 3953 return false; 3954 }); 3955 3956 /*****инаÑе поÑемÑÑо пеÑеÑÑало оÑпÑавлÑÑÑÑÑ ÑообÑениÑ***/ 3957 $('#blogPostForm').attr('novalidate', true); 3958 $('#REPLIER').attr('novalidate', true); 3959 3960 3961 $('body').on('change', '[name=share_to]', function () { 3962 var p = $(this).parents('.center'); 3963 var v = p.find('[name=share_to]:checked').val(); 3964 p.find('.fr_select').hide(); 3965 // console.log(v); 3966 3967 if (v == 'message') { 3968 p.find('.fr_select').show(); 3969 p.find('.fr_select select').styler(); 3970 } 3971 3972 3973 }); 3974 3975 3976 $('#mb_search [name=s]').keyup(function () { 3977 3978 var v = $(this).val(); 3979 3980 // if(v.length > 3 || 1) 3981 // { 3982 $.get(location.href + '?s=' + v + '&ajax=Y', 3983 function (data) { 3984 $('.foto_block_zdem.kniga').html(data); 3985 }); 3986 3987 // } 3988 3989 3990 });
3991 3992 3993 $('.right_block input[type=text]').keyup(function () { 3994 3995 var v = $(this).val().toLowerCase(); 3996 //$('.right_block .ublock').not('.friends').remove(); 3997 3998 if (!v) { 3999 //$('.right_block .ublock.friends').show(); 4000 } 4001 else { 4002 4003 $('.right_block .ublock.friends').hide(); 4004 $('.right_block table tr.ublock').each(function () { 4005 //if(!$(this).hasClass('form_tr') && !$(this).hasClass('need_tr')) 4006 $(this).remove(); 4007 }); 4008 4009 $.get('/local/ajax/ajax_user_chat_search.php?q=' + v, 4010 function (data) { 4011 $('.right_block table tbody tr.form_tr').after(data); 4012 4013 $('.right_block table tbody input').styler(); 4014 }); 4015 /* 4016 $('.right_block .ublock').each(function() { 4017 var n = $(this).find('.w2').text().toLowerCase(); 4018 $(this).hide(); 4019 if(n.indexOf(v) >= 0) 4020 $(this).show(); 4021 }); 4022 */ 4023 } 4024 4025 }); 4026 $('[name=friends_search]').keyup(function () { 4027 4028 var v = $(this).val().toLowerCase(); 4029 4030 if (!v) { 4031 $('#user_friends .user_block').show(); 4032 } 4033 else { 4034 $('#user_friends .user_block').each(function () { 4035 var n = $(this).find('.name').text().toLowerCase(); 4036 $(this).hide(); 4037 console.log(v); 4038 console.log(n.indexOf(v)); 4039 if (n.indexOf(v) >= 0) 4040 $(this).show(); 4041 }); 4042 } 4043 4044 }); 4045 $('[name=dialogs_search]').keyup(function () { 4046 4047 var v = $(this).val().toLowerCase(); 4048 4049 if (!v) { 4050 $('#user_dialogs .dialogs .user_block').show(); 4051 } 4052 else { 4053 $('#user_dialogs .dialogs .user_block').each(function () { 4054 var n = $(this).find('.name').text().toLowerCase(); 4055 $(this).hide(); 4056 console.log(v); 4057 console.log(n.indexOf(v)); 4058 if (n.indexOf(v) >= 0) 4059 $(this).show(); 4060 }); 4061 } 4062 4063 }); 4064 4065 $("#send_message [name=message]").keyup(function (event) { 4066 if (event.keyCode === 13) { 4067 $("#send_message").submit(); 4068 return false; 4069 } 4070 }); 4071 4072 var clicked_foto; 4073 var last_clicked_foto; 4074 var total_foto = $('.show_foto').length; 4075 4076 4077 $('#albom_wrap2 .block-img img').click(function () { 4078 if (last_clicked_foto.data('entity') !== 'USER_PHOTO') 4079 $('.show_foto').eq(clicked_foto).click(); 4080 return false; 4081 }); 4082 4083 $('body').on('click', '#arr_left', function () { 4084 if (last_clicked_foto.data('entity') !== 'USER_PHOTO') { 4085 if (clicked_foto) 4086 clicked_foto = clicked_foto - 2; 4087 $('.show_foto').eq(clicked_foto).click(); 4088 } 4089 return false; 4090 }); 4091 $('body').on('click', '#arr_right', function () { 4092 if (last_clicked_foto.data('entity') !== 'USER_PHOTO') 4093 $('.show_foto').eq(clicked_foto).click(); 4094 return false; 4095 }); 4096 4097 setTimeout(function () { 4098 $("#albom_wrap2").after('<div id="arr_left"></div><div id="arr_right"></div>'); 4099 }, 800); 4100 4101 $('body').on('click', '.show_foto', function (e) { 4102 e.preventDefault(); 4103 var t = $(this); 4104 $.post( 4105 '/ajax/actions.php', 4106 { 4107 action: 'increaseViews', 4108 id: $(this).data('id') 4109 }, 4110 function(data) { 4111 data = JSON.parse(data); 4112 if (data.views) 4113 t.data('views', data.views); 4114 4115 $('#albom_wrap2 .window_footer #photo_desc').remove(); 4116 $('#albom_wrap2 .action_block ul .edit_photo').remove(); 4117 $('#albom_wrap2 .action_block ul .delete_photo').remove(); 4118 $('#albom_wrap2 .action_block ul .change_foto').remove(); 4119 4120 console.log(t.hasClass('myfoto')); 4121 4122 4123 // $('#albom_wrap2 #foto_comment').hide(); 4124 $('#albom_wrap2 .action_block ul .share.share_foto').hide(); 4125 4126 var num = $('.show_foto').length; 4127 var n = t.index('.show_foto') + 1; 4128 clicked_foto = n; 4129 last_clicked_foto = $(this); 4130 4131 if (!t.hasClass('myfoto') && num > 1) 4132 $('#arr_left, #arr_right').show(); 4133 else 4134 $('#arr_left, #arr_right').hide(); 4135 4136 var id = t.data('id'); 4137 4138 var src = t.data('src'); 4139 var original = t.data('original'); 4140 var name = t.data('name'); 4141 var views = parseInt(t.data('views')); 4142 var date = t.data('date');
4143 var likes = t.data('likes'); 4144 var liked = t.data('liked'); 4145 var author = t.data('user'); 4146 var album = t.data('album'); 4147 var entity = t.data('entity'); 4148 var created_by = t.data('created_by'); 4149 4150 4151 $('#albom_wrap2 .block-img img').attr('src', src); 4152 $('#albom_wrap2 .block-img .count').text(n + ' из ' + num); 4153 $('#albom_wrap2 .block-img .origin').attr('href', original); 4154 // $('#albom_wrap2 .block-img .name span:eq(0)').text(name); 4155 $('#albom_wrap2 .block-img .share').attr('data-id', id); 4156 $('#albom_wrap2 .block-img .like').attr('data-id', id); 4157 $('#albom_wrap2 .block-img .like').text(likes); 4158 $('#albom_wrap2 td.views').text(views); 4159 $('#albom_wrap2 td.date').text(date); 4160 4161 if (author) 4162 $('#albom_wrap2 td.author').html(author); 4163 if (album) 4164 $('#albom_wrap2 td.album').html(album); 4165 4166 if (author && created_by) 4167 $('#albom_wrap2 td.author').html('<a href="/personal/user/' + created_by + '/">' + author + '</a>'); 4168 4169 if (t.hasClass('myfoto') && (!entity || entity == 'IBLOCK_ELEMENT')) { 4170 $('#albom_wrap2 .action_block ul').append('<li class="change_foto"><a href="/personal/user/' + created_by + '/main_edit/" style="background:none;padding-left:10px;">ÑмениÑÑ Ð°Ð²Ð°ÑаÑ</a></li>'); 4171 } 4172 4173 4174 if (entity) 4175 $('#albom_wrap2 .block-img .like').attr('data-entity', entity); 4176 4177 if (liked == 'Y') 4178 $('#albom_wrap2 .block-img .like').addClass('liked'); 4179 else 4180 $('#albom_wrap2 .block-img .like').removeClass('liked'); 4181 4182 $('#foto_comment [name=id]').val(id); 4183 4184 var url = '/local/ajax/photo_get_comments.php?id=' + id; 4185 4186 if (entity) url += '&entity=' + entity; 4187 4188 $.get(url, 4189 function (data) { 4190 $('#albom_wrap2 .left').html(data); 4191 }); 4192 4193 if (!entity || entity == 'IBLOCK_ELEMENT') 4194 $.get('/local/ajax/photo_get_desc.php?id=' + id, 4195 function (data) { 4196 $('#albom_wrap2 .window_footer').prepend('<div style="margin-top:-10px;text-align:left;" id="photo_desc">' + data.desc + '</div>'); 4197 4198 if ((data.mine || data.moder) && (!entity || entity == 'IBLOCK_ELEMENT')) { 4199 $('#albom_wrap2 .action_block ul').append('<li class="edit_photo"><a href="#edit_photo-popup" data-id="' + id + '" style="background:none;padding-left:10px;">ÑедакÑиÑоваÑÑ</a></li>'); 4200 $('#albom_wrap2 .action_block ul').append('<li class="delete_photo"><a data-id="' + id + '" style="background:none;padding-left:10px;">ÑдалиÑÑ</a></li>'); 4201 4202 $('#albom_wrap2 .action_block ul .edit_photo a').magnificPopup({ 4203 type: 'inline', 4204 fixedContentPos: true, 4205 fixedBgPos: true, 4206 overflowY: 'auto', 4207 closeBtnInside: true, 4208 preloader: false, 4209 midClick: true, 4210 removalDelay: 300, 4211 mainClass: 'my-mfp-zoom-in', 4212 closeOnBgClick: false 4213 }); 4214 } 4215 4216 if (data.can_comment) 4217 $('#albom_wrap2 #foto_comment').show(); 4218 if (data.can_share) 4219 $('#albom_wrap2 .action_block ul .share.share_foto').show(); 4220 }, 'json'); 4221 $('#foto_popup').click(); 4222 return false; 4223 } 4224 ); 4225 });
4226 4227 $('body').on('click', '.show_avatar', function (e) { 4228 e.preventDefault(); 4229 var t = $(this); 4230 $.post( 4231 '/ajax/actions.php', 4232 { 4233 action: 'increaseAvatarViews', 4234 user_id: t.data('created_by') 4235 }, 4236 function (data) { 4237 data = JSON.parse(data); 4238 if (data.views) 4239 t.data('views', data.views); 4240 console.log(t.data('views')); 4241 $('#albom_wrap2 .window_footer #photo_desc').remove(); 4242 $('#albom_wrap2 .action_block ul .edit_photo').remove(); 4243 $('#albom_wrap2 .action_block ul .delete_photo').remove(); 4244 $('#albom_wrap2 .action_block ul .change_foto').remove(); 4245 4246 $('#arr_left, #arr_right').hide(); 4247 4248 //$('#albom_wrap2 #foto_comment').hide(); 4249 $('#albom_wrap2 .action_block ul .share.share_foto').hide(); 4250 4251 var id = t.data('id'); 4252 var src = t.data('src'); 4253 var original = t.data('original'); 4254 var views = parseInt(t.data('views')); 4255 var date = t.data('date'); 4256 var likes = t.data('likes'); 4257 var liked = t.data('liked'); 4258 var author = t.data('user'); 4259 var album = t.data('album'); 4260 var entity = t.data('entity'); 4261 var created_by = t.data('created_by'); 4262 4263 $('#albom_wrap2 .block-img img').attr('src', src); 4264 $('#albom_wrap2 .block-img .count').text(''); 4265 $('#albom_wrap2 .block-img .origin').attr('href', original); 4266 $('#albom_wrap2 .block-img .share').attr('data-id', id); 4267 $('#albom_wrap2 .block-img .like').attr('data-id', id); 4268 $('#albom_wrap2 .block-img .like').text(likes); 4269 $('#albom_wrap2 td.views').text(views); 4270 $('#albom_wrap2 td.date').text(date); 4271 4272 if (author) 4273 $('#albom_wrap2 td.author').html(author); 4274 if (album) 4275 $('#albom_wrap2 td.album').html(album); 4276 4277 if (author && created_by) 4278 $('#albom_wrap2 td.author').html('<a href="/personal/user/' + created_by + '/">' + author + '</a>'); 4279 4280 if (t.hasClass('myfoto') && (!entity || entity === 'IBLOCK_ELEMENT')) { 4281 $('#albom_wrap2 .action_block ul').append('<li class="change_foto"><a href="/personal/user/' + created_by + '/main_edit/" style="background:none;padding-left:10px;">ÑмениÑÑ Ð°Ð²Ð°ÑаÑ</a></li>'); 4282 } 4283 4284 4285 if (entity) 4286 $('#albom_wrap2 .block-img .like').attr('data-entity', entity); 4287 4288 if (liked == 'Y') 4289 $('#albom_wrap2 .block-img .like').addClass('liked'); 4290 else 4291 $('#albom_wrap2 .block-img .like').removeClass('liked'); 4292 4293 $('#foto_comment [name=id]').val(id); 4294 4295 var url = '/local/ajax/photo_get_comments.php?id=' + id; 4296 if (entity) 4297 url += '&entity=' + entity; 4298 4299 $.get(url, 4300 function (data) { 4301 $('#albom_wrap2 .left').html(data); 4302 }); 4303 4304 if (!entity || entity === 'IBLOCK_ELEMENT') 4305 $.get('/local/ajax/photo_get_desc.php?id=' + id, 4306 function (data) { 4307 $('#albom_wrap2 .window_footer').prepend('<div style="margin-top:-10px;text-align:left;" id="photo_desc">' + data.desc + '</div>'); 4308 4309 if ((data.mine || data.moder) && (!entity || entity == 'IBLOCK_ELEMENT')) { 4310 $('#albom_wrap2 .action_block ul').append('<li class="edit_photo"><a href="#edit_photo-popup" data-id="' + id + '" style="background:none;padding-left:10px;">ÑедакÑиÑоваÑÑ</a></li>'); 4311 $('#albom_wrap2 .action_block ul').append('<li class="delete_photo"><a data-id="' + id + '" style="background:none;padding-left:10px;">ÑдалиÑÑ</a></li>'); 4312 4313 $('#albom_wrap2 .action_block ul .edit_photo a').magnificPopup({ 4314 type: 'inline', 4315 fixedContentPos: true, 4316 fixedBgPos: true, 4317 overflowY: 'auto', 4318 closeBtnInside: true, 4319 preloader: false, 4320 midClick: true, 4321 removalDelay: 300, 4322 mainClass: 'my-mfp-zoom-in' 4323 }); 4324 } 4325 4326 if (data.can_comment) 4327 $('#albom_wrap2 #foto_comment').show(); 4328 if (data.can_share) 4329 $('#albom_wrap2 .action_block ul .share.share_foto').show(); 4330 }, 'json'); 4331 $('#foto_popup').click(); 4332 return false; 4333 } 4334 ); 4335 });
4336 4337 $('body').on('click', '#albom_wrap2 .action_block ul .edit_photo a', 4338 function () { 4339 $('#photo_edit_form textarea').val($('#photo_desc').text()); 4340 $('#photo_edit_form [name=photo_id]').val($(this).data('id')); 4341 }); 4342 $('body').on('click', '#albom_wrap2 .action_block ul .delete_photo a', 4343 function () { 4344 if (confirm('ÐÑ ÑвеÑенÑ?')) { 4345 $.get('/local/ajax/photo_delete.php?id=' + $(this).data('id'), 4346 function (data) { 4347 location.reload(); 4348 }); 4349 } 4350 }); 4351 4352 $('#photo_edit_form').submit(function () { 4353 var a = $(this).serialize(); 4354 var m = $(this).find('textarea').val(); 4355 $.post('/local/ajax/photo_change_desc.php', a, 4356 function (data) { 4357 $('#edit_photo-popup .mfp-close').click(); 4358 $('#photo_edit_form textarea').val(''); 4359 $('#albom_wrap2 #photo_desc').text(m); 4360 }); 4361 return false; 4362 }); 4363 4364 $('#foto_comment').submit(function () { 4365 var id = $(this).find('[name=id]').val(); 4366 var a = $(this).serialize(); 4367 var t = $(this); 4368 var isGroup = $(this).data('group'); 4369 console.log(isGroup); 4370 $.get('/local/ajax/photo_check_comment_rights.php?id=' + id + '&group=' + isGroup, 4371 function (data) { 4372 if (parseInt(data) == 1) { 4373 var entity = $('#albom_wrap2 .like').data('entity'); 4374 var url = '/local/ajax/photo_comment.php'; 4375 if (entity) url += '?entity=' + entity; 4376 4377 $.post(url, a, 4378 function (data) { 4379 4380 t.find('input[name=message]').val(''); 4381 $('.window_footer .left').html(data); 4382 }); 4383 } 4384 else if (parseInt(data) == 0) { 4385 alert('ÐолÑзоваÑÐµÐ»Ñ Ð¾Ð³ÑаниÑил возможноÑÑÑ ÐºÐ¾Ð¼Ð¼ÐµÐ½ÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ ÑÐ²Ð¾Ð¸Ñ ÑоÑо'); 4386 } 4387 else 4388 alert(data); 4389 }); 4390 4391 return false; 4392 }); 4393 4394 4395 $('#albom_wrap2 .block-img .like').click(function () { 4396 4397 var id = $(this).data('id'); 4398 var entity = $(this).data('entity'); 4399 var t = $(this); 4400 4401 var url = '/local/ajax/photo_vote.php?id=' + id; 4402 4403 if (entity) url += '&entity=' + entity; 4404 4405 $.get(url, 4406 function (data) { 4407 if (t.hasClass('liked')) 4408 t.removeClass('liked'); 4409 else 4410 t.addClass('liked'); 4411 t.text(data); 4412 4413 }); 4414 4415 return false; 4416 }); 4417 4418 $('#albom_wrap2 .block-img .share').click(function () { 4419 4420 var id = $(this).data('id'); 4421 var entity = $('#albom_wrap2 .like').data('entity'); 4422 var t = $(this); 4423 4424 var url = '/local/ajax/photo_share.php?id=' + id; 4425 4426 if (entity) url += '&entity=' + entity; 4427 4428 $.get(url, 4429 function (data) { 4430 if (data.result) 4431 alert('ФоÑогÑаÑÐ¸Ñ ÑазмеÑена Ñ Ð²Ð°Ñ Ð² ленÑе'); 4432 else 4433 alert(data.error); 4434 }, 'json'); 4435 4436 return false; 4437 }); 4438 4439 4440 $('.create_chat').click(function () { 4441 $('#soob_window .right_block').show(); 4442 $('#soob_window .right_block2').hide(); 4443 }); 4444 4445 $('.text_block_detail .img_block').height($('.text_block_detail table').height()); 4446 4447 4448 $('.settings_form').submit(function () { 4449 $(this).find('[type=file]').attr('required', false); 4450 }); 4451 4452 4453 $('#about_sort_form').submit(function () { 4454 4455 var t = $(this); 4456 4457 $('#sortable li').each(function () { 4458 4459 t.append('<input type="hidden" name="sort[' + $(this).data('id') + ']" value="' + $(this).data('sort') + '" />'); 4460 4461 }); 4462 4463 4464 //return false; 4465 });
4466 4467 4468 $('input.voen_chast').mask('9999?9'); 4469 4470 4471 $('#vch_enter_form').submit(function () { 4472 4473 var a = $(this).serialize(); 4474 4475 $.post('/local/ajax/enter_vch.php', a, 4476 function (data) { 4477 4478 alert(data); 4479 location.reload(); 4480 4481 }); 4482 4483 4484 return false; 4485 }); 4486 4487 4488 $('#albom_wrap2').each(function (i) { 4489 if (i) $(this).remove(); 4490 }); 4491 $('#foto_popup').each(function (i) { 4492 if (i) $(this).remove(); 4493 }); 4494 4495 4496 $('.vch_blog_item.before_click').css('cursor', 'pointer'); 4497 4498 var ccc = true; 4499 4500 4501 $('.vch_blog_item.before_click').click(function (e) { 4502 /* 4503 var id = $(this).data('post_id'); 4504 $('#cb'+id).click(); 4505 */ 4506 if (!$(e.target).is('a')) { 4507 blog_item_clicked = $(this).parent(); 4508 4509 blog_item_clicked.find('.delete_post').hide(); 4510 4511 var t = $(window).scrollTop(); 4512 4513 4514 $(this).removeClass('before_click'); 4515 var p = $(this).parent(); 4516 4517 p.css('position', 'absolute'); 4518 p.animate( 4519 { 4520 left: '50%', 4521 top: (t + 50) + 'px', 4522 marginLeft: '-270px', 4523 zIndex: '1000', 4524 width: '664px', 4525 }, 4526 500 4527 ); 4528 $('#darkbox').fadeIn(500); 4529 4530 4531 return false; 4532 } 4533 4534 }); 4535 4536 $('#darkbox').click(function () { 4537 if (blog_item_clicked) { 4538 blog_item_clicked.css('position', 'relative'); 4539 blog_item_clicked.css('left', ''); 4540 blog_item_clicked.css('top', ''); 4541 blog_item_clicked.css('marginLeft', ''); 4542 blog_item_clicked.css('zIndex', ''); 4543 blog_item_clicked.css('width', ''); 4544 4545 $('#darkbox').fadeOut(500); 4546 blog_item_clicked.find('.delete_post').show(); 4547 } 4548 }); 4549 4550 $('.colorbox').colorbox({ 4551 // iframe:true, 4552 onComplete: function () { 4553 jQuery('.share_window input[type="radio"]').styler(); 4554 }, 4555 }); 4556 4557 4558 $('body').on('click', '#colorbox .feed-com-add-link', function () { 4559 4560 var c = $(this).parents('#colorbox'); 4561 c.find('.feed-add-post').show(); 4562 c.find('.feed-add-post').parents('form').parent().show(); 4563 //$(this).remove(); 4564 4565 //return false; 4566 }); 4567 4568 $('.isearch_like').click(function () { 4569 4570 var liked = $(this).hasClass('liked'); 4571 var id = $(this).data('id'); 4572 var t = $(this); 4573 4574 $.get('/local/ajax/isearch_vote.php?id=' + id, 4575 function (data) { 4576 t.find('span').text(data); 4577 if (liked) 4578 t.removeClass('liked'); 4579 else 4580 t.addClass('liked'); 4581 }); 4582 4583 return false; 4584 }); 4585 4586 $('.isearch_share').click(function () { 4587 4588 var id = $(this).data('id'); 4589 var t = $(this); 4590 4591 var url = '/local/ajax/isearch_share.php?id=' + id + '&entity=ISEARCH'; 4592 4593 $.get(url, 4594 function (data) { 4595 alert('ÐапиÑÑ ÑазмеÑена Ñ Ð²Ð°Ñ Ð² ленÑе'); 4596 }); 4597 4598 return false; 4599 4600 4601 return false; 4602 }); 4603 4604 $('.head-search [name=q]').keyup(function () { 4605 4606 var v = $(this).val(); 4607 if (v.length > 2) { 4608 $.get('/local/ajax/ajax_top_search.php?q=' + v + '&ajax=Y', 4609 function (data) { 4610 $('#ajaxed_search').html(data); 4611 $('#ajaxed_search').show(); 4612 }); 4613 } 4614 else { 4615 $('#ajaxed_search').hide(); 4616 } 4617 4618 4619 }); 4620 4621 4622 $('body').on('click', '.the_notif_answer, .accept-friend', function () { 4623 var t = $(this); 4624 4625 BX.ajax({ 4626 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php?NOTIFY_CONFIRM', 4627 method: 'POST', 4628 dataType: 'json', 4629 timeout: 60, 4630 data: { 4631 'IM_NOTIFY_CONFIRM': 'Y',
4632 'NOTIFY_ID': t.data('id'), 4633 'NOTIFY_VALUE': t.data('value'), 4634 'IM_AJAX_CALL': 'Y', 4635 'sessid': BX.bitrix_sessid() 4636 }, 4637 onsuccess: BX.delegate(function (data) { 4638 if (t.hasClass('page_notif_answer')) { 4639 location.reload(); 4640 } 4641 else { 4642 var notifs_page = 1; 4643 var o = {}; 4644 o['IM_NOTIFY_HISTORY_LOAD_MORE'] = 'Y'; 4645 o['PAGE'] = notifs_page; 4646 o['IM_AJAX_CALL'] = 'Y'; 4647 o['sessid'] = BX.bitrix_sessid(); 4648 4649 $("#settings .inner").html(''); 4650 4651 BX.ajax({ 4652 dataType: 'json', 4653 method: 'POST', 4654 url: '/bitrix/components/bitrix/im.messenger/im.ajax.php?NOTIFY_HISTORY_LOAD_MORE&1111', 4655 data: o, 4656 onsuccess: function (data) { 4657 var arr = Object.values(data.NOTIFY).sort().reverse(); 4658 4659 $.each(arr, function (index, value) { 4660 if (!value.userAvatar) { 4661 value.userAvatar = "/local/images/group_img.png"; 4662 } 4663 var d = new Date(value.date * 1000); 4664 4665 var item = '' + 4666 '<div class="item even">' + 4667 '<div class="right_foto">' + 4668 ''; 4669 if (value.buttons) { 4670 $.each(value.buttons, function (index2, value2) { 4671 item += '<span class="bx-notifier-item-button-wrap"><span data-id="' + value.id + '" data-value="' + value2.VALUE + '" class="the_notif_answer bx-notifier-item-button bx-notifier-item-button-confirm bx-notifier-item-button-' + value2.TYPE + '">' + value2.TITLE + '</span></span>'; 4672 }); 4673 } 4674 4675 item += '' + 4676 '</div>' + 4677 '<div class="left_foto">' + 4678 '<img src="' + value.userAvatar + '">' + 4679 '<a href="' + value.userLink + '"><span class="ramka"></span></a>' + 4680 '</div>' + 4681 '<div class="center_info">' + 4682 '<p><a href="'+value.userLink+'">' + value.userName + '</a> ' + value.text + ' <br>' + 4683 '<span class="time">' + d.toLocaleString() + '</span>' + 4684 '</p>' + 4685 '</div>' + 4686 '</div>'; 4687 4688 4689 $('#settings .inner').append(item); 4690 }); 4691 } 4692 }); 4693 } 4694 if (t.hasClass('accept-friend')) { 4695 t.attr('href', '/personal/user/'+t.data('user')+'/friends/delete/'); 4696 t.attr('title', 'УбÑаÑÑ Ð¸Ð· дÑÑзей'); 4697 t.text('У Ð²Ð°Ñ Ð² дÑÑзÑÑÑ '); 4698 t.removeClass('accept-friend'); 4699 } 4700 }, this) 4701 }); 4702 4703 }); 4704 4705 $('#user_blog_edit .feed-add-post-micro').click(function () { 4706 4707 //$('#blog-title').show(); 4708 LHEPostForm.getHandler('idPostFormLHE_blogPostForm').showPanelEditor(); 4709 $('[name=UF_BLOG_POST_IMPRTNT]').val('1'); 4710 }); 4711 4712 /* 4713 $('#blog-submit-button-cancel').click(function() { 4714 4715 $('#blog-title').hide(); 4716 }); 4717 */ 4718 4719 $('#user_blog_edit #blogPostForm').submit(function () { 4720 /* 4721 if(!$('#blog-title').val()) 4722 return false; 4723 */ 4724 });
4725 4726 4727 $('.post_claim').click(function () { 4728 var id = $(this).data('id'), 4729 user = $(this).data('user'); 4730 $('#claim-popup [name=post_id]').val(id); 4731 $('#claim-popup [name=user_id]').val(user); 4732 4733 }); 4734 $('.photo_claim').click(function () { 4735 var id = $(this).parents('#albom_wrap2').find('.block-img img').attr('src'); 4736 $('#claim-popup [name=photo_id]').val(id); 4737 }); 4738 4739 $('[name=PERSONAL_COUNTRY0]').keyup(function () { 4740 4741 var v = $(this).val(); 4742 var l = v.length; 4743 if (l) { 4744 $('.country_vars').show(); 4745 4746 $('.country_vars a').each(function () { 4747 var t = $(this).text(); 4748 if (t.substr(0, l) == v) { 4749 $(this).show(); 4750 } 4751 else 4752 $(this).hide(); 4753 4754 4755 }); 4756 } 4757 else { 4758 $('.country_vars').hide(); 4759 $('.country_vars a').hide(); 4760 } 4761 4762 console.log(v + '/' + l); 4763 4764 }); 4765 $('.country_vars a').click(function () { 4766 4767 $('.country_vars').hide(); 4768 $('.country_vars a').hide(); 4769 $('[name=PERSONAL_COUNTRY]').val($(this).data('v')); 4770 $('[name=PERSONAL_COUNTRY0]').val($(this).text()); 4771 }); 4772 4773 $('.detail_action a').click(function () { 4774 4775 $('body').append('<div style="position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.6);left:0;top:0;z-index:10;"><img src="/local/images/preloader.gif" style="width:24px;height:24px;position:absolute;top:50%;left:50%;" /></div>'); 4776 4777 }); 4778 4779 4780 $('.fm_delete').click(function () { 4781 4782 if (confirm('ÐÑ ÑвеÑенÑ, ÑÑо Ñ Ð¾ÑиÑе ÑдалиÑÑ ÑообÑение без возможноÑÑи воÑÑÑановлениÑ?')) { 4783 var id = $(this).data('id'); 4784 4785 $.get('/local/ajax/forum_message_delete.php?id=' + id, 4786 function (data) { 4787 if (data == 1) { 4788 location.reload(); 4789 } 4790 else { 4791 alert(data); 4792 } 4793 }); 4794 } 4795 4796 4797 return false; 4798 }); 4799 4800 4801 $('#clear_blog_header').click(function () { 4802 $('#POST_TITLE').val(''); 4803 }); 4804 $('.all_not').click(function () { 4805 $('.uved_block .item').show(); 4806 return false; 4807 }); 4808 $('.friend_not').click(function () { 4809 $('.uved_block .item').hide(); 4810 $('._friend_not').show(); 4811 return false; 4812 }); 4813 $('.groups_not').click(function () { 4814 $('.uved_block .item').hide(); 4815 $('._groups_not').show(); 4816 return false; 4817 }); 4818 $('.comm_not').click(function () { 4819 $('.uved_block .item').hide(); 4820 $('._comm_not').show(); 4821 return false; 4822 }); 4823 4824}); 4825 4826 4827/* End */ 4828; 4829; /* Start:"a:4:{s:4:"full";s:69:"/local/templates/voenchast/js/lightbox/js/lightbox.js?166624702418250";s:6:"source";s:53:"/local/templates/voenchast/js/lightbox/js/lightbox.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 4830/*! 4831 * Lightbox v2.9.0 4832 * by Lokesh Dhakar 4833 * 4834 * More info: 4835 * http://lokeshdhakar.com/projects/lightbox2/ 4836 * 4837 * Copyright 2007, 2015 Lokesh Dhakar 4838 * Released under the MIT license 4839 * https://github.com/lokesh/lightbox2/blob/master/LICENSE 4840 * 4841 * @preserve 4842 */ 4843 4844// Uses Node, AMD or browser globals to create a module. 4845(function (root, factory) { 4846 if (typeof define === 'function' && define.amd) { 4847 // AMD. Register as an anonymous module. 4848 define(['jquery'], factory); 4849 } else if (typeof exports === 'object') { 4850 // Node. Does not work with strict CommonJS, but 4851 // only CommonJS-like environments that support module.exports, 4852 // like Node. 4853 module.exports = factory(require('jquery')); 4854 } else { 4855 // Browser globals (root is window) 4856 root.lightbox = factory(root.jQuery); 4857 } 4858}(this, function ($) { 4859 4860 function Lightbox(options) { 4861 this.album = []; 4862 this.currentImageIndex = void 0; 4863 this.init(); 4864 4865 // options 4866 this.options = $.extend({}, this.constructor.defaults); 4867 this.option(options); 4868 } 4869 4870 // Descriptions of all options available on the demo site: 4871 // http://lokeshdhakar.com/projects/lightbox2/index.html#options 4872 Lightbox.defaults = { 4873 albumLabel: 'Image %1 of %2', 4874 alwaysShowNavOnTouchDevices: false, 4875 fadeDuration: 600,
vendor: 4,171 bytes, lines 4876-4978
4876 fitImagesInViewport: true, 4877 imageFadeDuration: 600, 4878 // maxWidth: 800, 4879 // maxHeight: 600, 4880 positionFromTop: 50, 4881 resizeDuration: 700, 4882 showImageNumberLabel: true, 4883 wrapAround: false, 4884 disableScrolling: false, 4885 /* 4886 Sanitize Title 4887 If the caption data is trusted, for example you are hardcoding it in, then leave this to false. 4888 This will free you to add html tags, such as links, in the caption. 4889 4890 If the caption data is user submitted or from some other untrusted source, then set this to true 4891 to prevent xss and other injection attacks. 4892 */ 4893 sanitizeTitle: false 4894 }; 4895 4896 Lightbox.prototype.option = function(options) { 4897 $.extend(this.options, options); 4898 }; 4899 4900 Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) { 4901 return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages); 4902 }; 4903 4904 Lightbox.prototype.init = function() { 4905 var self = this; 4906 // Both enable and build methods require the body tag to be in the DOM. 4907 $(document).ready(function() { 4908 self.enable(); 4909 self.build(); 4910 }); 4911 }; 4912 4913 // Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes 4914 // that contain 'lightbox'. When these are clicked, start lightbox. 4915 Lightbox.prototype.enable = function() { 4916 var self = this; 4917 $('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { 4918 self.start($(event.currentTarget)); 4919 return false; 4920 }); 4921 }; 4922 4923 // Build html for the lightbox and the overlay. 4924 // Attach event handlers to the new DOM elements. click click click 4925 Lightbox.prototype.build = function() { 4926 var self = this; 4927 $('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body')); 4928 4929 // Cache jQuery objects 4930 this.$lightbox = $('#lightbox'); 4931 this.$overlay = $('#lightboxOverlay'); 4932 this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); 4933 this.$container = this.$lightbox.find('.lb-container'); 4934 this.$image = this.$lightbox.find('.lb-image'); 4935 this.$nav = this.$lightbox.find('.lb-nav'); 4936 4937 // Store css values for future lookup 4938 this.containerPadding = { 4939 top: parseInt(this.$container.css('padding-top'), 10), 4940 right: parseInt(this.$container.css('padding-right'), 10), 4941 bottom: parseInt(this.$container.css('padding-bottom'), 10), 4942 left: parseInt(this.$container.css('padding-left'), 10) 4943 }; 4944 4945 this.imageBorderWidth = { 4946 top: parseInt(this.$image.css('border-top-width'), 10), 4947 right: parseInt(this.$image.css('border-right-width'), 10), 4948 bottom: parseInt(this.$image.css('border-bottom-width'), 10), 4949 left: parseInt(this.$image.css('border-left-width'), 10) 4950 }; 4951 4952 // Attach event handlers to the newly minted DOM elements 4953 this.$overlay.hide().on('click', function() { 4954 self.end(); 4955 return false; 4956 }); 4957 4958 this.$lightbox.hide().on('click', function(event) { 4959 if ($(event.target).attr('id') === 'lightbox') { 4960 self.end(); 4961 } 4962 return false; 4963 }); 4964 4965 this.$outerContainer.on('click', function(event) { 4966 if ($(event.target).attr('id') === 'lightbox') { 4967 self.end(); 4968 } 4969 return false; 4970 }); 4971 4972 this.$lightbox.find('.lb-prev').on('click', function() { 4973 if (self.currentImageIndex === 0) { 4974 self.changeImage(self.album.length - 1); 4975 } else { 4976 self.changeImage(self.currentImageIndex - 1); 4977 } 4978 return false;
4979 }); 4980 4981 this.$lightbox.find('.lb-next').on('click', function() { 4982 if (self.currentImageIndex === self.album.length - 1) { 4983 self.changeImage(0); 4984 } else { 4985 self.changeImage(self.currentImageIndex + 1); 4986 } 4987 return false; 4988 }); 4989 4990 /* 4991 Show context menu for image on right-click 4992 4993 There is a div containing the navigation that spans the entire image and lives above of it. If 4994 you right-click, you are right clicking this div and not the image. This prevents users from 4995 saving the image or using other context menu actions with the image. 4996 4997 To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we 4998 set pointer-events to none on the nav div. This is so that the upcoming right-click event on 4999 the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs 5000 we set the pointer events back to auto for the nav div so it can capture hover and left-click 5001 events as usual. 5002 */ 5003 this.$nav.on('mousedown', function(event) { 5004 if (event.which === 3) { 5005 self.$nav.css('pointer-events', 'none'); 5006 5007 self.$lightbox.one('contextmenu', function() { 5008 setTimeout(function() { 5009 this.$nav.css('pointer-events', 'auto'); 5010 }.bind(self), 0); 5011 }); 5012 } 5013 }); 5014 5015 5016 this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { 5017 self.end(); 5018 return false; 5019 }); 5020 }; 5021 5022 // Show overlay and lightbox. If the image is part of a set, add siblings to album array. 5023 Lightbox.prototype.start = function($link) { 5024 var self = this; 5025 var $window = $(window); 5026 5027 $window.on('resize', $.proxy(this.sizeOverlay, this)); 5028 5029 $('select, object, embed').css({ 5030 visibility: 'hidden' 5031 }); 5032 5033 this.sizeOverlay(); 5034 5035 this.album = []; 5036 var imageNumber = 0; 5037 5038 function addToAlbum($link) { 5039 self.album.push({ 5040 link: $link.attr('href'), 5041 title: $link.attr('data-title') || $link.attr('title') 5042 }); 5043 } 5044 5045 // Support both data-lightbox attribute and rel attribute implementations 5046 var dataLightboxValue = $link.attr('data-lightbox'); 5047 var $links; 5048 5049 if (dataLightboxValue) { 5050 $links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]'); 5051 for (var i = 0; i < $links.length; i = ++i) { 5052 addToAlbum($($links[i])); 5053 if ($links[i] === $link[0]) { 5054 imageNumber = i; 5055 } 5056 } 5057 } else { 5058 if ($link.attr('rel') === 'lightbox') { 5059 // If image is not part of a set 5060 addToAlbum($link); 5061 } else { 5062 // If image is part of a set 5063 $links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]'); 5064 for (var j = 0; j < $links.length; j = ++j) { 5065 addToAlbum($($links[j])); 5066 if ($links[j] === $link[0]) { 5067 imageNumber = j; 5068 } 5069 } 5070 } 5071 } 5072 5073 // Position Lightbox 5074 var top = $window.scrollTop() + this.options.positionFromTop; 5075 var left = $window.scrollLeft(); 5076 this.$lightbox.css({ 5077 top: top + 'px', 5078 left: left + 'px' 5079 }).fadeIn(this.options.fadeDuration); 5080 5081 // Disable scrolling of the page while open 5082 if (this.options.disableScrolling) { 5083 $('body').addClass('lb-disable-scrolling'); 5084 } 5085 5086 this.changeImage(imageNumber); 5087 }; 5088 5089 // Hide most UI elements in preparation for the animated resizing of the lightbox. 5090 Lightbox.prototype.changeImage = function(imageNumber) { 5091 var self = this; 5092 5093 this.disableKeyboardNav(); 5094 var $image = this.$lightbox.find('.lb-image'); 5095 5096 this.$overlay.fadeIn(this.options.fadeDuration); 5097 5098 $('.lb-loader').fadeIn('slow'); 5099 this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); 5100 5101 this.$outerContainer.addClass('animating'); 5102 5103 // When image to show is preloaded, we send the width and height to sizeContainer() 5104 var preloader = new Image(); 5105 preloader.onload = function() { 5106 var $preloader; 5107 var imageHeight; 5108 var imageWidth; 5109 var maxImageHeight; 5110 var maxImageWidth; 5111 var windowHeight; 5112 var windowWidth; 5113 5114 $image.attr('src', self.album[imageNumber].link); 5115 5116 $preloader = $(preloader); 5117 5118 $image.width(preloader.width); 5119 $image.height(preloader.height); 5120 5121 if (self.options.fitImagesInViewport) { 5122 // Fit image inside the viewport. 5123 // Take into account the border around the image and an additional 10px gutter on each side. 5124 5125 windowWidth = $(window).width(); 5126 windowHeight = $(window).height(); 5127 maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20; 5128 maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120; 5129 5130 // Check if image size is larger then maxWidth|maxHeight in settings 5131 if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) { 5132 maxImageWidth = self.options.maxWidth; 5133 } 5134 if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) { 5135 maxImageHeight = self.options.maxHeight; 5136 } 5137 5138 // Is the current image's width or height is greater than the maxImageWidth or maxImageHeight 5139 // option than we need to size down while maintaining the aspect ratio. 5140 if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { 5141 if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { 5142 imageWidth = maxImageWidth; 5143 imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); 5144 $image.width(imageWidth); 5145 $image.height(imageHeight); 5146 } else { 5147 imageHeight = maxImageHeight; 5148 imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); 5149 $image.width(imageWidth); 5150 $image.height(imageHeight); 5151 } 5152 } 5153 } 5154 self.sizeContainer($image.width(), $image.height()); 5155 }; 5156 5157 preloader.src = this.album[imageNumber].link; 5158 this.currentImageIndex = imageNumber; 5159 }; 5160 5161 // Stretch overlay to fit the viewport 5162 Lightbox.prototype.sizeOverlay = function() { 5163 this.$overlay 5164 .width($(document).width()) 5165 .height($(document).height()); 5166 }; 5167 5168 // Animate the size of the lightbox to fit the image we are showing 5169 Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { 5170 var self = this; 5171 5172 var oldWidth = this.$outerContainer.outerWidth(); 5173 var oldHeight = this.$outerContainer.outerHeight(); 5174 var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right; 5175 var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom; 5176 5177 function postResize() { 5178 self.$lightbox.find('.lb-dataContainer').width(newWidth); 5179 self.$lightbox.find('.lb-prevLink').height(newHeight); 5180 self.$lightbox.find('.lb-nextLink').height(newHeight); 5181 self.showImage(); 5182 } 5183 5184 if (oldWidth !== newWidth || oldHeight !== newHeight) { 5185 this.$outerContainer.animate({ 5186 width: newWidth, 5187 height: newHeight 5188 }, this.options.resizeDuration, 'swing', function() { 5189 postResize(); 5190 }); 5191 } else { 5192 postResize(); 5193 } 5194 }; 5195 5196 // Display the image and its details and begin preload neighboring images. 5197 Lightbox.prototype.showImage = function() { 5198 this.$lightbox.find('.lb-loader').stop(true).hide(); 5199 this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration); 5200 5201 this.updateNav(); 5202 this.updateDetails(); 5203 this.preloadNeighboringImages(); 5204 this.enableKeyboardNav(); 5205 }; 5206 5207 // Display previous and next navigation if appropriate. 5208 Lightbox.prototype.updateNav = function() { 5209 // Check to see if the browser supports touch events. If so, we take the conservative approach 5210 // and assume that mouse hover events are not supported and always show prev/next navigation 5211 // arrows in image sets. 5212 var alwaysShowNav = false;
5213 try { 5214 document.createEvent('TouchEvent'); 5215 alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false; 5216 } catch (e) {} 5217 5218 this.$lightbox.find('.lb-nav').show(); 5219 5220 if (this.album.length > 1) { 5221 if (this.options.wrapAround) { 5222 if (alwaysShowNav) { 5223 this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); 5224 } 5225 this.$lightbox.find('.lb-prev, .lb-next').show(); 5226 } else { 5227 if (this.currentImageIndex > 0) { 5228 this.$lightbox.find('.lb-prev').show(); 5229 if (alwaysShowNav) { 5230 this.$lightbox.find('.lb-prev').css('opacity', '1'); 5231 } 5232 } 5233 if (this.currentImageIndex < this.album.length - 1) { 5234 this.$lightbox.find('.lb-next').show(); 5235 if (alwaysShowNav) { 5236 this.$lightbox.find('.lb-next').css('opacity', '1'); 5237 } 5238 } 5239 } 5240 } 5241 }; 5242 5243 // Display caption, image number, and closing button. 5244 Lightbox.prototype.updateDetails = function() { 5245 var self = this; 5246 5247 // Enable anchor clicks in the injected caption html. 5248 // Thanks Nate Wright for the fix. @https://github.com/NateWr 5249 if (typeof this.album[this.currentImageIndex].title !== 'undefined' && 5250 this.album[this.currentImageIndex].title !== '') { 5251 var $caption = this.$lightbox.find('.lb-caption'); 5252 if (this.options.sanitizeTitle) { 5253 $caption.text(this.album[this.currentImageIndex].title); 5254 } else { 5255 $caption.html(this.album[this.currentImageIndex].title); 5256 } 5257 $caption.fadeIn('fast') 5258 .find('a').on('click', function(event) { 5259 if ($(this).attr('target') !== undefined) { 5260 window.open($(this).attr('href'), $(this).attr('target')); 5261 } else { 5262 location.href = $(this).attr('href'); 5263 } 5264 }); 5265 } 5266 5267 if (this.album.length > 1 && this.options.showImageNumberLabel) { 5268 var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length); 5269 this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast'); 5270 } else { 5271 this.$lightbox.find('.lb-number').hide(); 5272 } 5273 5274 this.$outerContainer.removeClass('animating'); 5275 5276 this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { 5277 return self.sizeOverlay(); 5278 }); 5279 }; 5280 5281 // Preload previous and next images in set. 5282 Lightbox.prototype.preloadNeighboringImages = function() { 5283 if (this.album.length > this.currentImageIndex + 1) { 5284 var preloadNext = new Image(); 5285 preloadNext.src = this.album[this.currentImageIndex + 1].link; 5286 } 5287 if (this.currentImageIndex > 0) { 5288 var preloadPrev = new Image(); 5289 preloadPrev.src = this.album[this.currentImageIndex - 1].link; 5290 } 5291 }; 5292 5293 Lightbox.prototype.enableKeyboardNav = function() { 5294 $(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); 5295 }; 5296 5297 Lightbox.prototype.disableKeyboardNav = function() { 5298 $(document).off('.keyboard'); 5299 }; 5300 5301 Lightbox.prototype.keyboardAction = function(event) { 5302 var KEYCODE_ESC = 27; 5303 var KEYCODE_LEFTARROW = 37; 5304 var KEYCODE_RIGHTARROW = 39; 5305 5306 var keycode = event.keyCode; 5307 var key = String.fromCharCode(keycode).toLowerCase(); 5308 if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { 5309 this.end(); 5310 } else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { 5311 if (this.currentImageIndex !== 0) { 5312 this.changeImage(this.currentImageIndex - 1); 5313 } else if (this.options.wrapAround && this.album.length > 1) { 5314 this.changeImage(this.album.length - 1); 5315 } 5316 } else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { 5317 if (this.currentImageIndex !== this.album.length - 1) { 5318 this.changeImage(this.currentImageIndex + 1); 5319 } else if (this.options.wrapAround && this.album.length > 1) { 5320 this.changeImage(0); 5321 } 5322 } 5323 }; 5324 5325 // Closing time. :-( 5326 Lightbox.prototype.end = function() { 5327 this.disableKeyboardNav(); 5328 $(window).off('resize', this.sizeOverlay); 5329 this.$lightbox.fadeOut(this.options.fadeDuration); 5330 this.$overlay.fadeOut(this.options.fadeDuration); 5331 $('select, object, embed').css({ 5332 visibility: 'visible' 5333 }); 5334 if (this.options.disableScrolling) { 5335 $('body').removeClass('lb-disable-scrolling'); 5336 } 5337 }; 5338 5339 return new Lightbox(); 5340})); 5341 5342/* End */ 5343; 5344; /* Start:"a:4:{s:4:"full";s:73:"/local/templates/voenchast/js/colorbox/jquery.colorbox.js?166624702429169";s:6:"source";s:57:"/local/templates/voenchast/js/colorbox/jquery.colorbox.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 5345/*! 5346 Colorbox 1.6.4 5347 license: MIT 5348 http://www.jacklmoore.com/colorbox 5349*/ 5350(function ($, document, window) { 5351 var 5352 // Default settings object. 5353 // See http://jacklmoore.com/colorbox for details. 5354 defaults = { 5355 // data sources 5356 html: false, 5357 photo: false, 5358 iframe: false, 5359 inline: false, 5360 5361 // behavior and appearance 5362 transition: "elastic", 5363 speed: 300, 5364 fadeOut: 300, 5365 width: false, 5366 initialWidth: "600", 5367 innerWidth: false, 5368 maxWidth: false, 5369 height: false, 5370 initialHeight: "450", 5371 innerHeight: false, 5372 maxHeight: false, 5373 scalePhotos: true, 5374 scrolling: true, 5375 opacity: 0.9, 5376 preloading: true, 5377 className: false, 5378 overlayClose: true, 5379 escKey: true, 5380 arrowKey: true, 5381 top: false, 5382 bottom: false, 5383 left: false, 5384 right: false, 5385 fixed: false, 5386 data: undefined, 5387 closeButton: true, 5388 fastIframe: true, 5389 open: false, 5390 reposition: true, 5391 loop: true, 5392 slideshow: false, 5393 slideshowAuto: true, 5394 slideshowSpeed: 2500, 5395 slideshowStart: "start slideshow", 5396 slideshowStop: "stop slideshow", 5397 photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i, 5398 5399 // alternate image paths for high-res displays 5400 retinaImage: false, 5401 retinaUrl: false, 5402 retinaSuffix: '@2x.$1', 5403 5404 // internationalization 5405 current: "image {current} of {total}", 5406 previous: "previous", 5407 next: "next", 5408 close: "close", 5409 xhrError: "This content failed to load.", 5410 imgError: "This image failed to load.", 5411 5412 // accessbility 5413 returnFocus: true, 5414 trapFocus: true, 5415 5416 // callbacks 5417 onOpen: false, 5418 onLoad: false, 5419 onComplete: false, 5420 onCleanup: false,
vendor: 1,752 bytes, lines 5421-5502
5421 onClosed: false, 5422 5423 rel: function() { 5424 return this.rel; 5425 }, 5426 href: function() { 5427 // using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container') 5428 return $(this).attr('href'); 5429 }, 5430 title: function() { 5431 return this.title; 5432 }, 5433 createImg: function() { 5434 var img = new Image(); 5435 var attrs = $(this).data('cbox-img-attrs'); 5436 5437 if (typeof attrs === 'object') { 5438 $.each(attrs, function(key, val){ 5439 img[key] = val; 5440 }); 5441 } 5442 5443 return img; 5444 }, 5445 createIframe: function() { 5446 var iframe = document.createElement('iframe'); 5447 var attrs = $(this).data('cbox-iframe-attrs'); 5448 5449 if (typeof attrs === 'object') { 5450 $.each(attrs, function(key, val){ 5451 iframe[key] = val; 5452 }); 5453 } 5454 5455 if ('frameBorder' in iframe) { 5456 iframe.frameBorder = 0; 5457 } 5458 if ('allowTransparency' in iframe) { 5459 iframe.allowTransparency = "true"; 5460 } 5461 iframe.name = (new Date()).getTime(); // give the iframe a unique name to prevent caching 5462 iframe.allowFullscreen = true; 5463 5464 return iframe; 5465 } 5466 }, 5467 5468 // Abstracting the HTML and event identifiers for easy rebranding 5469 colorbox = 'colorbox', 5470 prefix = 'cbox', 5471 boxElement = prefix + 'Element', 5472 5473 // Events 5474 event_open = prefix + '_open', 5475 event_load = prefix + '_load', 5476 event_complete = prefix + '_complete', 5477 event_cleanup = prefix + '_cleanup', 5478 event_closed = prefix + '_closed', 5479 event_purge = prefix + '_purge', 5480 5481 // Cached jQuery Object Variables 5482 $overlay, 5483 $box, 5484 $wrap, 5485 $content, 5486 $topBorder, 5487 $leftBorder, 5488 $rightBorder, 5489 $bottomBorder, 5490 $related, 5491 $window, 5492 $loaded, 5493 $loadingBay, 5494 $loadingOverlay, 5495 $title, 5496 $current, 5497 $slideshow, 5498 $next, 5499 $prev, 5500 $close, 5501 $groupControls, 5502 $events = $('<a/>'), // $({}) would be prefer
vendor: 22,638 bytes, lines 5502-6329
5502red, but there is an issue with jQuery 1.4.2 5503 5504 // Variables for cached values or use across multiple functions 5505 settings, 5506 interfaceHeight, 5507 interfaceWidth, 5508 loadedHeight, 5509 loadedWidth, 5510 index, 5511 photo, 5512 open, 5513 active, 5514 closing, 5515 loadingTimer, 5516 publicMethod, 5517 div = "div", 5518 requests = 0, 5519 previousCSS = {}, 5520 init; 5521 5522 // **************** 5523 // HELPER FUNCTIONS 5524 // **************** 5525 5526 // Convenience function for creating new jQuery objects 5527 function $tag(tag, id, css) { 5528 var element = document.createElement(tag); 5529 5530 if (id) { 5531 element.id = prefix + id; 5532 } 5533 5534 if (css) { 5535 element.style.cssText = css; 5536 } 5537 5538 return $(element); 5539 } 5540 5541 // Get the window height using innerHeight when available to avoid an issue with iOS 5542 // http://bugs.jquery.com/ticket/6724 5543 function winheight() { 5544 return window.innerHeight ? window.innerHeight : $(window).height(); 5545 } 5546 5547 function Settings(element, options) { 5548 if (options !== Object(options)) { 5549 options = {}; 5550 } 5551 5552 this.cache = {}; 5553 this.el = element; 5554 5555 this.value = function(key) { 5556 var dataAttr; 5557 5558 if (this.cache[key] === undefined) { 5559 dataAttr = $(this.el).attr('data-cbox-'+key); 5560 5561 if (dataAttr !== undefined) { 5562 this.cache[key] = dataAttr; 5563 } else if (options[key] !== undefined) { 5564 this.cache[key] = options[key]; 5565 } else if (defaults[key] !== undefined) { 5566 this.cache[key] = defaults[key]; 5567 } 5568 } 5569 5570 return this.cache[key]; 5571 }; 5572 5573 this.get = function(key) { 5574 var value = this.value(key); 5575 return $.isFunction(value) ? value.call(this.el, this) : value; 5576 }; 5577 } 5578 5579 // Determine the next and previous members in a group. 5580 function getIndex(increment) { 5581 var 5582 max = $related.length, 5583 newIndex = (index + increment) % max; 5584 5585 return (newIndex < 0) ? max + newIndex : newIndex; 5586 } 5587 5588 // Convert '%' and 'px' values to integers 5589 function setSize(size, dimension) { 5590 return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10)); 5591 } 5592 5593 // Checks an href to see if it is a photo. 5594 // There is a force photo option (photo: true) for hrefs that cannot be matched by the regex. 5595 function isImage(settings, url) { 5596 return settings.get('photo') || settings.get('photoRegex').test(url); 5597 } 5598 5599 function retinaUrl(settings, url) { 5600 return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url; 5601 } 5602 5603 function trapFocus(e) { 5604 if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) { 5605 e.stopPropagation(); 5606 $box.focus(); 5607 } 5608 } 5609 5610 function setClass(str) { 5611 if (setClass.str !== str) { 5612 $box.add($overlay).removeClass(setClass.str).addClass(str); 5613 setClass.str = str; 5614 } 5615 } 5616 5617 function getRelated(rel) { 5618 index = 0; 5619 5620 if (rel && rel !== false && rel !== 'nofollow') { 5621 $related = $('.' + boxElement).filter(function () { 5622 var options = $.data(this, colorbox); 5623 var settings = new Settings(this, options); 5624 return (settings.get('rel') === rel); 5625 }); 5626 index = $related.index(settings.el); 5627 5628 // Check direct calls to Colorbox. 5629 if (index === -1) { 5630 $related = $related.add(settings.el); 5631 index = $related.length - 1; 5632 } 5633 } else { 5634 $related = $(settings.el); 5635 } 5636 } 5637 5638 function trigger(event) { 5639 // for external use 5640 $(document).trigger(event); 5641 // for internal use 5642 $events.triggerHandler(event); 5643 } 5644 5645 var slideshow = (function(){ 5646 var active, 5647 className = prefix + "Slideshow_", 5648 click = "click." + prefix, 5649 timeOut; 5650 5651 function clear () { 5652 clearTimeout(timeOut); 5653 } 5654 5655 function set() { 5656 if (settings.get('loop') || $related[index + 1]) { 5657 clear(); 5658 timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed')); 5659 } 5660 } 5661 5662 function start() { 5663 $slideshow 5664 .html(settings.get('slideshowStop')) 5665 .unbind(click) 5666 .one(click, stop); 5667 5668 $events 5669 .bind(event_complete, set) 5670 .bind(event_load, clear); 5671 5672 $box.removeClass(className + "off").addClass(className + "on"); 5673 } 5674 5675 function stop() { 5676 clear(); 5677 5678 $events 5679 .unbind(event_complete, set) 5680 .unbind(event_load, clear); 5681 5682 $slideshow 5683 .html(settings.get('slideshowStart')) 5684 .unbind(click) 5685 .one(click, function () { 5686 publicMethod.next(); 5687 start(); 5688 }); 5689 5690 $box.removeClass(className + "on").addClass(className + "off"); 5691 } 5692 5693 function reset() { 5694 active = false; 5695 $slideshow.hide(); 5696 clear(); 5697 $events 5698 .unbind(event_complete, set) 5699 .unbind(event_load, clear); 5700 $box.removeClass(className + "off " + className + "on"); 5701 } 5702 5703 return function(){ 5704 if (active) { 5705 if (!settings.get('slideshow')) { 5706 $events.unbind(event_cleanup, reset); 5707 reset(); 5708 } 5709 } else { 5710 if (settings.get('slideshow') && $related[1]) { 5711 active = true; 5712 $events.one(event_cleanup, reset); 5713 if (settings.get('slideshowAuto')) { 5714 start(); 5715 } else { 5716 stop(); 5717 } 5718 $slideshow.show(); 5719 } 5720 } 5721 }; 5722 5723 }()); 5724 5725 5726 function launch(element) { 5727 var options; 5728 5729 if (!closing) { 5730 5731 options = $(element).data(colorbox); 5732 5733 settings = new Settings(element, options); 5734 5735 getRelated(settings.get('rel')); 5736 5737 if (!open) { 5738 open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys. 5739 5740 setClass(settings.get('className')); 5741 5742 // Show colorbox so the sizes can be calculated in older versions of jQuery 5743 $box.css({visibility:'hidden', display:'block', opacity:''}); 5744 5745 $loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden'); 5746 $content.css({width:'', height:''}).append($loaded); 5747 5748 // Cache values needed for size calculations 5749 interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height(); 5750 interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width(); 5751 loadedHeight = $loaded.outerHeight(true); 5752 loadedWidth = $loaded.outerWidth(true); 5753 5754 // Opens inital empty Colorbox prior to content being loaded. 5755 var initialWidth = setSize(settings.get('initialWidth'), 'x'); 5756 var initialHeight = setSize(settings.get('initialHeight'), 'y'); 5757 var maxWidth = settings.get('maxWidth'); 5758 var maxHeight = settings.get('maxHeight'); 5759 5760 settings.w = Math.max((maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth, 0); 5761 settings.h = Math.max((maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight, 0); 5762 5763 $loaded.css({width:'', height:settings.h}); 5764 publicMethod.position(); 5765 5766 trigger(event_open); 5767 settings.get('onOpen'); 5768 5769 $groupControls.add($title).hide(); 5770 5771 $box.focus(); 5772 5773 if (settings.get('trapFocus')) { 5774 // Confine focus to the modal 5775 // Uses event capturing that is not supported in IE8- 5776 if (document.addEventListener) { 5777 5778 document.addEventListener('focus', trapFocus, true); 5779 5780 $events.one(event_closed, function () { 5781 document.removeEventListener('focus', trapFocus, true); 5782 }); 5783 } 5784 } 5785 5786 // Return focus on closing 5787 if (settings.get('returnFocus')) { 5788 $events.one(event_closed, function () { 5789 $(settings.el).focus(); 5790 }); 5791 } 5792 } 5793 5794 var opacity = parseFloat(settings.get('opacity')); 5795 $overlay.css({ 5796 opacity: opacity === opacity ? opacity : '', 5797 cursor: settings.get('overlayClose') ? 'pointer' : '', 5798 visibility: 'visible' 5799 }).show(); 5800 5801 if (settings.get('closeButton')) { 5802 $close.html(settings.get('close')).appendTo($content); 5803 } else { 5804 $close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4 5805 } 5806 5807 load(); 5808 } 5809 } 5810 5811 // Colorbox's markup needs to be added to the DOM prior to being called 5812 // so that the browser will go ahead and load the CSS background images. 5813 function appendHTML() { 5814 if (!$box) { 5815 init = false; 5816 $window = $(window); 5817 $box = $tag(div).attr({ 5818 id: colorbox, 5819 'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS. 5820 role: 'dialog', 5821 tabindex: '-1' 5822 }).hide(); 5823 $overlay = $tag(div, "Overlay").hide(); 5824 $loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]); 5825 $wrap = $tag(div, "Wrapper"); 5826 $content = $tag(div, "Content").append( 5827 $title = $tag(div, "Title"), 5828 $current = $tag(div, "Current"), 5829 $prev = $('<button type="button"/>').attr({id:prefix+'Previous'}), 5830 $next = $('<button type="button"/>').attr({id:prefix+'Next'}), 5831 $slideshow = $('<button type="button"/>').attr({id:prefix+'Slideshow'}), 5832 $loadingOverlay 5833 ); 5834 5835 $close = $('<button type="button"/>').attr({id:prefix+'Close'}); 5836 5837 $wrap.append( // The 3x3 Grid that makes up Colorbox 5838 $tag(div).append( 5839 $tag(div, "TopLeft"), 5840 $topBorder = $tag(div, "TopCenter"), 5841 $tag(div, "TopRight") 5842 ), 5843 $tag(div, false, 'clear:left').append( 5844 $leftBorder = $tag(div, "MiddleLeft"), 5845 $content, 5846 $rightBorder = $tag(div, "MiddleRight") 5847 ), 5848 $tag(div, false, 'clear:left').append( 5849 $tag(div, "BottomLeft"), 5850 $bottomBorder = $tag(div, "BottomCenter"), 5851 $tag(div, "BottomRight") 5852 ) 5853 ).find('div div').css({'float': 'left'}); 5854 5855 $loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;'); 5856 5857 $groupControls = $next.add($prev).add($current).add($slideshow); 5858 } 5859 if (document.body && !$box.parent().length) { 5860 $(document.body).append($overlay, $box.append($wrap, $loadingBay)); 5861 } 5862 } 5863 5864 // Add Colorbox's event bindings 5865 function addBindings() { 5866 function clickHandler(e) { 5867 // ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt. 5868 // See: http://jacklmoore.com/notes/click-events/ 5869 if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) { 5870 e.preventDefault(); 5871 launch(this); 5872 } 5873 } 5874 5875 if ($box) { 5876 if (!init) { 5877 init = true; 5878 5879 // Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly. 5880 $next.click(function () { 5881 publicMethod.next(); 5882 }); 5883 $prev.click(function () { 5884 publicMethod.prev(); 5885 }); 5886 $close.click(function () { 5887 publicMethod.close(); 5888 }); 5889 $overlay.click(function () { 5890 if (settings.get('overlayClose')) { 5891 publicMethod.close(); 5892 } 5893 }); 5894 5895 // Key Bindings 5896 $(document).bind('keydown.' + prefix, function (e) { 5897 var key = e.keyCode; 5898 if (open && settings.get('escKey') && key === 27) { 5899 e.preventDefault(); 5900 publicMethod.close(); 5901 } 5902 if (open && settings.get('arrowKey') && $related[1] && !e.altKey) { 5903 if (key === 37) { 5904 e.preventDefault(); 5905 $prev.click(); 5906 } else if (key === 39) { 5907 e.preventDefault(); 5908 $next.click(); 5909 } 5910 } 5911 }); 5912 5913 if ($.isFunction($.fn.on)) { 5914 // For jQuery 1.7+ 5915 $(document).on('click.'+prefix, '.'+boxElement, clickHandler); 5916 } else { 5917 // For jQuery 1.3.x -> 1.6.x 5918 // This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed. 5919 // This is not here for jQuery 1.9, it's here for legacy users. 5920 $('.'+boxElement).live('click.'+prefix, clickHandler); 5921 } 5922 } 5923 return true; 5924 } 5925 return false; 5926 } 5927 5928 // Don't do anything if Colorbox already exists. 5929 if ($[colorbox]) { 5930 return; 5931 } 5932 5933 // Append the HTML when the DOM loads 5934 $(appendHTML); 5935 5936 5937 // **************** 5938 // PUBLIC FUNCTIONS 5939 // Usage format: $.colorbox.close(); 5940 // Usage from within an iframe: parent.jQuery.colorbox.close(); 5941 // **************** 5942 5943 publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) { 5944 var settings; 5945 var $obj = this; 5946 5947 options = options || {}; 5948 5949 if ($.isFunction($obj)) { // assume a call to $.colorbox 5950 $obj = $('<a/>'); 5951 options.open = true; 5952 } 5953 5954 if (!$obj[0]) { // colorbox being applied to empty collection 5955 return $obj; 5956 } 5957 5958 appendHTML(); 5959 5960 if (addBindings()) { 5961 5962 if (callback) { 5963 options.onComplete = callback; 5964 } 5965 5966 $obj.each(function () { 5967 var old = $.data(this, colorbox) || {}; 5968 $.data(this, colorbox, $.extend(old, options)); 5969 }).addClass(boxElement); 5970 5971 settings = new Settings($obj[0], options); 5972 5973 if (settings.get('open')) { 5974 launch($obj[0]); 5975 } 5976 } 5977 5978 return $obj; 5979 }; 5980 5981 publicMethod.position = function (speed, loadedCallback) { 5982 var 5983 css, 5984 top = 0, 5985 left = 0, 5986 offset = $box.offset(), 5987 scrollTop, 5988 scrollLeft; 5989 5990 $window.unbind('resize.' + prefix); 5991 5992 // remove the modal so that it doesn't influence the document width/height 5993 $box.css({top: -9e4, left: -9e4}); 5994 5995 scrollTop = $window.scrollTop(); 5996 scrollLeft = $window.scrollLeft(); 5997 5998 if (settings.get('fixed')) { 5999 offset.top -= scrollTop; 6000 offset.left -= scrollLeft; 6001 $box.css({position: 'fixed'}); 6002 } else { 6003 top = scrollTop; 6004 left = scrollLeft; 6005 $box.css({position: 'absolute'}); 6006 } 6007 6008 // keeps the top and left positions within the browser's viewport. 6009 if (settings.get('right') !== false) { 6010 left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0); 6011 } else if (settings.get('left') !== false) { 6012 left += setSize(settings.get('left'), 'x'); 6013 } else { 6014 left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2); 6015 } 6016 6017 if (settings.get('bottom') !== false) { 6018 top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0); 6019 } else if (settings.get('top') !== false) { 6020 top += setSize(settings.get('top'), 'y'); 6021 } else { 6022 top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2); 6023 } 6024 6025 $box.css({top: offset.top, left: offset.left, visibility:'visible'}); 6026 6027 // this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly, 6028 // but it has to be shrank down around the size of div#colorbox when it's done. If not, 6029 // it can invoke an obscure IE bug when using iframes. 6030 $wrap[0].style.width = $wrap[0].style.height = "9999px"; 6031 6032 function modalDimensions() { 6033 $topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px'; 6034 $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px'; 6035 } 6036 6037 css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left}; 6038 6039 // setting the speed to 0 if the content hasn't changed size or position 6040 if (speed) { 6041 var tempSpeed = 0; 6042 $.each(css, function(i){ 6043 if (css[i] !== previousCSS[i]) { 6044 tempSpeed = speed; 6045 return; 6046 } 6047 }); 6048 speed = tempSpeed; 6049 } 6050 6051 previousCSS = css; 6052 6053 if (!speed) { 6054 $box.css(css); 6055 } 6056 6057 $box.dequeue().animate(css, { 6058 duration: speed || 0, 6059 complete: function () { 6060 modalDimensions(); 6061 6062 active = false; 6063 6064 // shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation. 6065 $wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px"; 6066 $wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px"; 6067 6068 if (settings.get('reposition')) { 6069 setTimeout(function () { // small delay before binding onresize due to an IE8 bug. 6070 $window.bind('resize.' + prefix, publicMethod.position); 6071 }, 1); 6072 } 6073 6074 if ($.isFunction(loadedCallback)) { 6075 loadedCallback(); 6076 } 6077 }, 6078 step: modalDimensions 6079 }); 6080 }; 6081 6082 publicMethod.resize = function (options) { 6083 var scrolltop; 6084 6085 if (open) { 6086 options = options || {}; 6087 6088 if (options.width) { 6089 settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth; 6090 } 6091 6092 if (options.innerWidth) { 6093 settings.w = setSize(options.innerWidth, 'x'); 6094 } 6095 6096 $loaded.css({width: settings.w}); 6097 6098 if (options.height) { 6099 settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight; 6100 } 6101 6102 if (options.innerHeight) { 6103 settings.h = setSize(options.innerHeight, 'y'); 6104 } 6105 6106 if (!options.innerHeight && !options.height) { 6107 scrolltop = $loaded.scrollTop(); 6108 $loaded.css({height: "auto"}); 6109 settings.h = $loaded.height(); 6110 } 6111 6112 $loaded.css({height: settings.h}); 6113 6114 if(scrolltop) { 6115 $loaded.scrollTop(scrolltop); 6116 } 6117 6118 publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed')); 6119 } 6120 }; 6121 6122 publicMethod.prep = function (object) { 6123 if (!open) { 6124 return; 6125 } 6126 6127 var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed'); 6128 6129 $loaded.remove(); 6130 6131 $loaded = $tag(div, 'LoadedContent').append(object); 6132 6133 function getWidth() { 6134 settings.w = settings.w || $loaded.width(); 6135 settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w; 6136 return settings.w; 6137 } 6138 function getHeight() { 6139 settings.h = settings.h || $loaded.height(); 6140 settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h; 6141 return settings.h; 6142 } 6143 6144 $loaded.hide() 6145 .appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations. 6146 .css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'}) 6147 .css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height. 6148 .prependTo($content); 6149 6150 $loadingBay.hide(); 6151 6152 // floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width. 6153 6154 $(photo).css({'float': 'none'}); 6155 6156 setClass(settings.get('className')); 6157 6158 callback = function () { 6159 var total = $related.length, 6160 iframe, 6161 complete; 6162 6163 if (!open) { 6164 return; 6165 } 6166 6167 function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2 6168 if ($.support.opacity === false) { 6169 $box[0].style.removeAttribute('filter'); 6170 } 6171 } 6172 6173 complete = function () { 6174 clearTimeout(loadingTimer); 6175 $loadingOverlay.hide(); 6176 trigger(event_complete); 6177 settings.get('onComplete'); 6178 }; 6179 6180 6181 $title.html(settings.get('title')).show(); 6182 $loaded.show(); 6183 6184 if (total > 1) { // handle grouping 6185 if (typeof settings.get('current') === "string") { 6186 $current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show(); 6187 } 6188 6189 $next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next')); 6190 $prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous')); 6191 6192 slideshow(); 6193 6194 // Preloads images within a rel group 6195 if (settings.get('preloading')) { 6196 $.each([getIndex(-1), getIndex(1)], function(){ 6197 var img, 6198 i = $related[this], 6199 settings = new Settings(i, $.data(i, colorbox)), 6200 src = settings.get('href'); 6201 6202 if (src && isImage(settings, src)) { 6203 src = retinaUrl(settings, src); 6204 img = document.createElement('img'); 6205 img.src = src; 6206 } 6207 }); 6208 } 6209 } else { 6210 $groupControls.hide(); 6211 } 6212 6213 if (settings.get('iframe')) { 6214 6215 iframe = settings.get('createIframe'); 6216 6217 if (!settings.get('scrolling')) { 6218 iframe.scrolling = "no"; 6219 } 6220 6221 $(iframe) 6222 .attr({ 6223 src: settings.get('href'), 6224 'class': prefix + 'Iframe' 6225 }) 6226 .one('load', complete) 6227 .appendTo($loaded); 6228 6229 $events.one(event_purge, function () { 6230 iframe.src = "//about:blank"; 6231 }); 6232 6233 if (settings.get('fastIframe')) { 6234 $(iframe).trigger('load'); 6235 } 6236 } else { 6237 complete(); 6238 } 6239 6240 if (settings.get('transition') === 'fade') { 6241 $box.fadeTo(speed, 1, removeFilter); 6242 } else { 6243 removeFilter(); 6244 } 6245 }; 6246 6247 if (settings.get('transition') === 'fade') { 6248 $box.fadeTo(speed, 0, function () { 6249 publicMethod.position(0, callback); 6250 }); 6251 } else { 6252 publicMethod.position(speed, callback); 6253 } 6254 }; 6255 6256 function load () { 6257 var href, setResize, prep = publicMethod.prep, $inline, request = ++requests; 6258 6259 active = true; 6260 6261 photo = false; 6262 6263 trigger(event_purge); 6264 trigger(event_load); 6265 settings.get('onLoad'); 6266 6267 settings.h = settings.get('height') ? 6268 setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight : 6269 settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y'); 6270 6271 settings.w = settings.get('width') ? 6272 setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth : 6273 settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x'); 6274 6275 // Sets the minimum dimensions for use in image scaling 6276 settings.mw = settings.w; 6277 settings.mh = settings.h; 6278 6279 // Re-evaluate the minimum width and height based on maxWidth and maxHeight values. 6280 // If the width or height exceed the maxWidth or maxHeight, use the maximum values instead. 6281 if (settings.get('maxWidth')) { 6282 settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth; 6283 settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw; 6284 } 6285 if (settings.get('maxHeight')) { 6286 settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight; 6287 settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh; 6288 } 6289 6290 href = settings.get('href'); 6291 6292 loadingTimer = setTimeout(function () { 6293 $loadingOverlay.show(); 6294 }, 100); 6295 6296 if (settings.get('inline')) { 6297 var $target = $(href).eq(0); 6298 // Inserts an empty placeholder where inline content is being pulled from. 6299 // An event is bound to put inline content back when Colorbox closes or loads new content. 6300 $inline = $('<div>').hide().insertBefore($target); 6301 6302 $events.one(event_purge, function () { 6303 $inline.replaceWith($target); 6304 }); 6305 6306 prep($target); 6307 } else if (settings.get('iframe')) { 6308 // IFrame element won't be added to the DOM until it is ready to be displayed, 6309 // to avoid problems with DOM-ready JS that might be trying to run in that iframe. 6310 prep(" "); 6311 } else if (settings.get('html')) { 6312 prep(settings.get('html')); 6313 } else if (isImage(settings, href)) { 6314 6315 href = retinaUrl(settings, href); 6316 6317 photo = settings.get('createImg'); 6318 6319 $(photo) 6320 .addClass(prefix + 'Photo') 6321 .bind('error.'+prefix,function () { 6322 prep($tag(div, 'Error').html(settings.get('imgError'))); 6323 }) 6324 .one('load', function () { 6325 if (request !== requests) { 6326 return; 6327 } 6328 6329 // A small pause because some browsers will occas
6329ionally report a 6330 // img.width and img.height of zero immediately after the img.onload fires 6331 setTimeout(function(){ 6332 var percent; 6333 6334 if (settings.get('retinaImage') && window.devicePixelRatio > 1) { 6335 photo.height = photo.height / window.devicePixelRatio; 6336 photo.width = photo.width / window.devicePixelRatio; 6337 } 6338 6339 if (settings.get('scalePhotos')) { 6340 setResize = function () {
6341 photo.height -= photo.height * percent; 6342 photo.width -= photo.width * percent; 6343 }; 6344 if (settings.mw && photo.width > settings.mw) { 6345 percent = (photo.width - settings.mw) / photo.width; 6346 setResize(); 6347 } 6348 if (settings.mh && photo.height > settings.mh) { 6349 percent = (photo.height - settings.mh) / photo.height; 6350 setResize(); 6351 } 6352 } 6353 6354 if (settings.h) { 6355 photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px'; 6356 } 6357 6358 if ($related[1] && (settings.get('loop') || $related[index + 1])) { 6359 photo.style.cursor = 'pointer'; 6360 6361 $(photo).bind('click.'+prefix, function () { 6362 publicMethod.next(); 6363 }); 6364 } 6365 6366 photo.style.width = photo.width + 'px'; 6367 photo.style.height = photo.height + 'px'; 6368 prep(photo); 6369 }, 1); 6370 }); 6371 6372 photo.src = href; 6373 6374 } else if (href) { 6375 $loadingBay.load(href, settings.get('data'), function (data, status) { 6376 if (request === requests) { 6377 prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents()); 6378 } 6379 }); 6380 } 6381 } 6382 6383 // Navigates to the next page/image in a set. 6384 publicMethod.next = function () { 6385 if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) { 6386 index = getIndex(1); 6387 launch($related[index]); 6388 } 6389 }; 6390 6391 publicMethod.prev = function () { 6392 if (!active && $related[1] && (settings.get('loop') || index)) { 6393 index = getIndex(-1); 6394 launch($related[index]); 6395 } 6396 }; 6397 6398 // Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close(); 6399 publicMethod.close = function () { 6400 if (open && !closing) { 6401 6402 closing = true; 6403 open = false; 6404 trigger(event_cleanup); 6405 settings.get('onCleanup'); 6406 $window.unbind('.' + prefix); 6407 $overlay.fadeTo(settings.get('fadeOut') || 0, 0); 6408 6409 $box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () { 6410 $box.hide(); 6411 $overlay.hide(); 6412 trigger(event_purge); 6413 $loaded.remove(); 6414 6415 setTimeout(function () { 6416 closing = false; 6417 trigger(event_closed); 6418 settings.get('onClosed'); 6419 }, 1); 6420 }); 6421 } 6422 }; 6423 6424 // Removes changes Colorbox made to the document, but does not remove the plugin. 6425 publicMethod.remove = function () { 6426 if (!$box) { return; } 6427 6428 $box.stop(); 6429 $[colorbox].close(); 6430 $box.stop(false, true).remove(); 6431 $overlay.remove(); 6432 closing = false; 6433 $box = null; 6434 $('.' + boxElement) 6435 .removeData(colorbox) 6436 .removeClass(boxElement); 6437 6438 $(document).unbind('click.'+prefix).unbind('keydown.'+prefix); 6439 }; 6440 6441 // A method for fetching the current element Colorbox is referencing. 6442 // returns a jQuery object. 6443 publicMethod.element = function () { 6444 return $(settings.el); 6445 }; 6446 6447 publicMethod.settings = defaults; 6448 6449}(jQuery, document, window)); 6450 6451/* End */ 6452; 6453; /* Start:"a:4:{s:4:"full";s:51:"/local/templates/voenchast/js/fix.js?16662470241537";s:6:"source";s:36:"/local/templates/voenchast/js/fix.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6454//пÑи изменении конÑенÑа в ленÑе вÑÑÑавлÑÐµÑ ÐºÐ¾ÑÑекÑное ÑиÑло комменÑÑаивев 6455 6456$(function() 6457{ 6458 6459 var err_obs = $('.obsugden').html(); 6460 if(err_obs){ 6461 var regex = /(?:ÐдеÑÑ Ð¿Ð¾ÐºÐ° Ð½ÐµÑ Ð½Ð¸ одной ÑемÑ.)/gi; 6462 var dd=err_obs.match(regex); 6463 if(dd){ 6464 $('.obsugden .forum-block-container').hide(); 6465 $('.obsugden .forum-page-navigation').hide(); 6466 } 6467 } 6468 6469 var err_users = $('.hide_if_empty').html(); 6470 if(err_users) { 6471 var regex = /(?:ÐÑÑппа не найдена..)/gi; 6472 var dd = err_users.match(regex); 6473 if (dd) $('.hide_if_empty').hide(); 6474 } 6475 var err_users = $('.center_content').html(); 6476 if(err_users) { 6477 var regex = /(?:ÐÑÑппа не найдена..)/gi; 6478 var dd = err_users.match(regex); 6479 if (dd) $('.center_content .errortext').hide(); 6480 } 6481 $('body #log_internal_container').on('DOMSubtreeModified', function () { 6482 var id = $('#postId').val(); 6483 if (id) { 6484 BX.ajax({ 6485 dataType: 'json', 6486 method: 'POST', 6487 url: '/ajax/get_post_comments.php', 6488 data: { 6489 id: id 6490 }, 6491 onsuccess: function (data) { 6492 if (data.count > 0&&data.count!=$('#C_C_PID_' + id).html()) $('#C_C_PID_' + id).html(data.count); 6493 } 6494 }) 6495 } 6496 });
6497}); 6498 6499/* End */ 6500; 6501; /* Start:"a:4:{s:4:"full";s:53:"/local/js/group.join.popup.functions.js?1666247023272";s:6:"source";s:39:"/local/js/group.join.popup.functions.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6502function onJoinPopupShow() { 6503 var voenId = this.getAttribute("data-id"); 6504 var voenName = this.getAttribute("data-name"); 6505 $("#vch_enter_form input[name='SLUGBA[MILITARY_UNIT][]']").val(voenName); 6506 $("#vch_enter_form input[name='group_id']").val(voenId); 6507} 6508/* End */ 6509; 6510; /* Start:"a:4:{s:4:"full";s:71:"/bitrix/components/niges/scbtns/templates/ajax/script.js?16662470611799";s:6:"source";s:56:"/bitrix/components/niges/scbtns/templates/ajax/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 6511/* NIGES.SCBTNS / SOCIAL NETWORKS and MESSENGERS */ 6512 6513function shakeAnimation(obj, event) { 6514 if (event.type == "mouseover") {obj.setAttribute("style", "left: 8px;"); setTimeout(function(){obj.setAttribute("style", "left: -6px;"); setTimeout(function(){obj.setAttribute("style", "left: 4px;"); setTimeout(function(){obj.setAttribute("style", "left: 2px;"); setTimeout(function(){obj.setAttribute("style", "left: 0px;"); }, 70); }, 80); }, 90); }, 100); 6515 } else { obj.setAttribute("style", "left: 0px;");; 6516 } 6517} 6518 6519function transferNSM () { 6520 var objDonor = document.getElementById("nsm-position-indiv"); 6521 if (objDonor) { 6522 var objRecipient = document.getElementById("niges-scbtns"); 6523 if (objRecipient) { 6524 while (objDonor.lastChild) { 6525 objRecipient.insertBefore(objDonor.lastChild, objRecipient.firstChild); 6526 } 6527 } 6528 var elements = document.querySelectorAll(".niges-scbtns"); 6529 if (elements) { 6530 for (var i = 0; i < elements.length; i++) { 6531 if (i+1 == elements.length) { 6532 elements[i].appendChild(objDonor); 6533 } else { 6534 var objDonorCopy = objDonor.cloneNode(true); 6535 elements[i].appendChild(objDonorCopy); 6536 } 6537 } 6538 } 6539 } else { 6540 var objDonor = document.getElementById("nsm-position-right"); 6541 if (!objDonor) { 6542 var objDonor = document.getElementById("nsm-position-left"); 6543 } 6544 if (objDonor) { 6545 while (objDonor.lastChild) { 6546 document.body.insertBefore(objDonor.lastChild, document.body.firstChild); 6547 } 6548 } 6549 } 6550} 6551 6552document.addEventListener("DOMContentLoaded", transferNSM); 6553/* End */ 6554;; /* /local/templates/voenchast/js/jquery-1.11.1.min.js?178893535595786*/ 6555; /* /local/templates/voenchast/js/scrol/jquery.jscrollpane.js?166624702442660*/ 6556; /* /local/templates/voenchast/js/fancybox/jquery.fancybox.pack.js?166624702423242*/ 6557; /* /local/templates/voenchast/js/jquery.maskedinput.js?16662470247207*/ 6558; /* /local/templates/voenchast/js/placeholders.min.js?16662470245103*/ 6559; /* /local/templates/voenchast/js/formstyler/jquery.formstyler.min.js?166624702418798*/ 6560; /* /local/templates/voenchast/js/magnific-popup/jquery.magnific-popup.min.js?166624702420216*/ 6561; /* /local/templates/voenchast/js/tcal/tcal.js?166624702411829*/ 6562; /* /local/templates/voenchast/js/main.js?178652102823763*/ 6563; /* /local/templates/voenchast/js/jquery-upload-file/js/jquery.uploadfile.min.js?166624702415058*/ 6564; /* /local/templates/voenchast/js/common.js?178652164561024*/ 6565; /* /local/templates/voenchast/js/lightbox/js/lightbox.js?166624702418250*/ 6566; /* /local/templates/voenchast/js/colorbox/jquery.colorbox.js?166624702429169*/ 6567; /* /local/templates/voenchast/js/fix.js?16662470241537*/ 6568; /* /local/js/group.join.popup.functions.js?1666247023272*/ 6569; /* /bitrix/components/niges/scbtns/templates/ajax/script.js?16662470611799*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.