1/*! 2 * jQuery Form Plugin 3 * version: 3.51.0-2014.06.20 4 * Requires jQuery v1.5 or later 5 * Copyright (c) 2014 M. Alsup 6 * Examples and documentation at: http://malsup.com/jquery/form/ 7 * Project repository: https://github.com/malsup/form 8 * Dual licensed under the MIT and GPL licenses. 9 * https://github.com/malsup/form#copyright-and-license 10 */ 11(function(e){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],e)} 12else{e((typeof(jQuery)!='undefined')?jQuery:window.Zepto)}}(function(e){'use strict';var r={};r.fileapi=e('<input type=\'file\'/>').get(0).files!==undefined;r.formdata=window.FormData!==undefined;var n=!!e.fn.prop;e.fn.attr2=function(){if(!n){return this.attr.apply(this,arguments)};var e=this.prop.apply(this,arguments);if((e&&e.jquery)||typeof e==='string'){return e};return this.attr.apply(this,arguments)};e.fn.ajaxSubmit=function(a){if(!this.length){t('ajaxSubmit: skipping submit process - no element selected');return this};var o,x,s,i=this;if(typeof a=='function'){a={success:a}} 13else if(a===undefined){a={}};o=a.type||this.attr2('method');x=a.url||this.attr2('action');s=(typeof x==='string')?e.trim(x):'';s=s||window.location.href||'';if(s){s=(s.match(/^([^#]+)/)||[])[1]};a=e.extend(!0,{url:s,success:e.ajaxSettings.success,type:o||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},a);var h={};this.trigger('form-pre-serialize',[this,a,h]);if(h.veto){t('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this};if(a.beforeSerialize&&a.beforeSerialize(this,a)===!1){t('ajaxSubmit: submit aborted via beforeSerialize callback');return this};var p=a.traditional;if(p===undefined){p=e.ajaxSettings.traditional};var d=[],m,u=this.formToArray(a.semantic,d);if(a.data){a.extraData=a.data;m=e.param(a.data,p)};if(a.beforeSubmit&&a.beforeSubmit(u,this,a)===!1){t('ajaxSubmit: submit aborted via beforeSubmit callback');return this};this.trigger('form-submit-validate',[u,this,a,h]);if(h.veto){t('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this};var c=e.param(u,p);if(m){c=(c?(c+'&'+m):m)};if(a.type.toUpperCase()=='GET'){a.url+=(a.url.indexOf('?')>=0?'&':'?')+c;a.data=null} 14else{a.data=c};var f=[];if(a.resetForm){f.push(function(){i.resetForm()})};if(a.clearForm){f.push(function(){i.clearForm(a.includeHidden)})};if(!a.dataType&&a.target){var A=a.success||function(){};f.push(function(t){var r=a.replaceTarget?'replaceWith':'html';e(a.target)[r](t).each(A,arguments)})} 15else if(a.success){f.push(a.success)};a.success=function(e,t,r){var s=a.context||this;for(var n=0,o=f.length;n<o;n++){f[n].apply(s,[e,t,r||i,i])}};if(a.error){var k=a.error;a.error=function(e,t,r){var n=a.context||this;k.apply(n,[e,t,r,i])}};if(a.complete){var D=a.complete;a.complete=function(e,t){var r=a.context||this;D.apply(r,[e,t,i])}};var S=e('input[type=file]:enabled',this).filter(function(){return e(this).val()!==''}),y=S.length>0,b='multipart/form-data',T=(i.attr('enctype')==b||i.attr('encoding')==b),g=r.fileapi&&r.formdata;t('fileAPI :'+g);var w=(y||T)&&!g,l;if(a.iframe!==!1&&(a.iframe||w)){if(a.closeKeepAlive){e.get(a.closeKeepAlive,function(){l=j(u)})} 16else{l=j(u)}} 17else if((y||T)&&g){l=E(u)} 18else{l=e.ajax(a)};i.removeData('jqxhr').data('jqxhr',l);for(var v=0;v<d.length;v++){d[v]=null};this.trigger('form-submit-notify',[this,a]);return this;function L(t){var i=e.param(t,a.traditional).split('&'),s=i.length,o=[],r,n;for(r=0;r<s;r++){i[r]=i[r].replace(/\+/g,' ');n=i[r].split('=');o.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])])};return o};function E(t){var s=new FormData();for(var r=0;r<t.length;r++){s.append(t[r].name,t[r].value)};if(a.extraData){var n=L(a.extraData);for(r=0;r<n.length;r++){if(n[r]){s.append(n[r][0],n[r][1])}}};a.data=null;var i=e.extend(!0,{},e.ajaxSettings,a,{contentType:!1,processData:!1,cache:!1,type:o||'POST'});if(a.uploadProgress){i.xhr=function(){var t=e.ajaxSettings.xhr();if(t.upload){t.upload.addEventListener('progress',function(e){var t=0,r=e.loaded||e.position,i=e.total;if(e.lengthComputable){t=Math.ceil(r/i*100)};a.uploadProgress(e,r,i,t)},!1)};return t}};i.data=null;var f=i.beforeSend;i.beforeSend=function(e,t){if(a.formData){t.data=a.formData} 19else{t.data=s};if(f){f.call(this,e,t)}};return e.ajax(i)};function j(f){var l=i[0],w,T,r,h,y,m,c,s,x,v,S,b,p=e.Deferred();p.abort=function(e){s.abort(e)};if(f){for(T=0;T<d.length;T++){w=e(d[T]);if(n){w.prop('disabled',!1)} 20else{w.removeAttr('disabled')}}};r=e.extend(!0,{},e.ajaxSettings,a);r.context=r.context||r;y='jqFormIO'+(new Date().getTime());if(r.iframeTarget){m=e(r.iframeTarget);v=m.attr2('name');if(!v){m.attr2('name',y)} 21else{y=v}} 22else{m=e('<iframe name="'+y+'" src="'+r.iframeSrc+'" />');m.css({position:'absolute',top:'-1000px',left:'-1000px'})};c=m[0];s={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(a){var n=(a==='timeout'?'timeout':'aborted');t('aborting upload... '+n);this.aborted=1;try{if(c.contentWindow.document.execCommand){c.contentWindow.document.execCommand('Stop')}}catch(i){};m.attr('src',r.iframeSrc);s.error=n;
22if(r.error){r.error.call(r.context,s,n,a)};if(h){e.event.trigger('ajaxError',[s,r,n])};if(r.complete){r.complete.call(r.context,s,n)}}};h=r.global;if(h&&0===e.active++){e.event.trigger('ajaxStart')};if(h){e.event.trigger('ajaxSend',[s,r])};if(r.beforeSend&&r.beforeSend.call(r.context,s,r)===!1){if(r.global){e.active--};p.reject();return p};if(s.aborted){p.reject();return p};x=l.clk;if(x){v=x.name;if(v&&!x.disabled){r.extraData=r.extraData||{};r.extraData[v]=x.value;if(x.type=='image'){r.extraData[v+'.x']=l.clk_x;r.extraData[v+'.y']=l.clk_y}}};var E=1,j=2;function M(e){var a=null;try{if(e.contentWindow){a=e.contentWindow.document}}catch(r){t('cannot get iframe.contentWindow document: '+r)};if(a){return a};try{a=e.contentDocument?e.contentDocument:e.document}catch(r){t('cannot get iframe.contentDocument: '+r);a=e.document};return a};var A=e('meta[name=csrf-token]').attr('content'),L=e('meta[name=csrf-param]').attr('content');if(L&&A){r.extraData=r.extraData||{};r.extraData[L]=A};function F(){var f=i.attr2('target'),u=i.attr2('action'),h='multipart/form-data',v=i.attr('enctype')||i.attr('encoding')||h;l.setAttribute('target',y);if(!o||/post/i.test(o)){l.setAttribute('method','POST')};if(u!=r.url){l.setAttribute('action',r.url)};if(!r.skipEncodingOverride&&(!o||/post/i.test(o))){i.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'})};if(r.timeout){b=setTimeout(function(){S=!0;g(E)},r.timeout)};function d(){try{var r=M(c).readyState;t('state = '+r);if(r&&r.toLowerCase()=='uninitialized'){setTimeout(d,50)}}catch(e){t('Server abort: ',e,' (',e.name,')');g(j);if(b){clearTimeout(b)};b=undefined}};var s=[];try{if(r.extraData){for(var a in r.extraData){if(r.extraData.hasOwnProperty(a)){if(e.isPlainObject(r.extraData[a])&&r.extraData[a].hasOwnProperty('name')&&r.extraData[a].hasOwnProperty('value')){s.push(e('<input type="hidden" name="'+r.extraData[a].name+'">').val(r.extraData[a].value).appendTo(l)[0])} 23else{s.push(e('<input type="hidden" name="'+a+'">').val(r.extraData[a]).appendTo(l)[0])}}}};if(!r.iframeTarget){m.appendTo('body')};if(c.attachEvent){c.attachEvent('onload',g)} 24else{c.addEventListener('load',g,!1)};setTimeout(d,15);try{l.submit()}catch(n){var p=document.createElement('form').submit;p.apply(l)}}finally{l.setAttribute('action',u);l.setAttribute('enctype',v);if(f){l.setAttribute('target',f)} 25else{i.removeAttr('target')};e(s).remove()}};if(r.forceSync){F()} 26else{setTimeout(F,10)};var D,u,N=50,k;function g(a){if(s.aborted||k){return};u=M(c);if(!u){t('cannot access response document');a=j};if(a===E&&s){s.abort('timeout');p.reject(s,'timeout');return} 27else if(a==j&&s){s.abort('server abort');p.reject(s,'error','server abort');return};if(!u||u.location.href==r.iframeSrc){if(!S){return}};if(c.detachEvent){c.detachEvent('onload',g)} 28else{c.removeEventListener('load',g,!1)};var i='success',o;try{if(S){throw'timeout'};var y=r.dataType=='xml'||u.XMLDocument||e.isXMLDoc(u);t('isXml='+y);if(!y&&window.opera&&(u.body===null||!u.body.innerHTML)){if(--N){t('requeing onLoad callback, DOM not available');setTimeout(g,250);return}};var f=u.body?u.body:u.documentElement;s.responseText=f?f.innerHTML:null;s.responseXML=u.XMLDocument?u.XMLDocument:u;if(y){r.dataType='xml'};s.getResponseHeader=function(e){var t={'content-type':r.dataType};return t[e.toLowerCase()]};if(f){s.status=Number(f.getAttribute('status'))||s.status;s.statusText=f.getAttribute('statusText')||s.statusText};var x=(r.dataType||'').toLowerCase(),T=/(json|script|text)/.test(x);if(T||r.textarea){var v=u.getElementsByTagName('textarea')[0];if(v){s.responseText=v.value;s.status=Number(v.getAttribute('status'))||s.status;s.statusText=v.getAttribute('statusText')||s.statusText} 29else if(T){var l=u.getElementsByTagName('pre')[0],d=u.getElementsByTagName('body')[0];if(l){s.responseText=l.textContent?l.textContent:l.innerText} 30else if(d){s.responseText=d.textContent?d.textContent:d.innerText}}} 31else if(x=='xml'&&!s.responseXML&&s.responseText){s.responseXML=O(s.responseText)};try{D=C(s,x,r)}catch(n){i='parsererror';s.error=o=(n||i)}}catch(n){t('error caught: ',n);i='error';s.error=o=(n||i)};if(s.aborted){t('upload aborted');i=null};if(s.status){i=(s.status>=200&&s.status<300||s.status===304)?'success':'error'};if(i==='success'){if(r.success){r.success.call(r.context,D,'success',s)};p.resolve(s.responseText,'success',s);
31if(h){e.event.trigger('ajaxSuccess',[s,r])}} 32else if(i){if(o===undefined){o=s.statusText};if(r.error){r.error.call(r.context,s,i,o)};p.reject(s,'error',o);if(h){e.event.trigger('ajaxError',[s,r,o])}};if(h){e.event.trigger('ajaxComplete',[s,r])};if(h&&!--e.active){e.event.trigger('ajaxStop')};if(r.complete){r.complete.call(r.context,s,i)};k=!0;if(r.timeout){clearTimeout(b)};setTimeout(function(){if(!r.iframeTarget){m.remove()} 33else{m.attr('src',r.iframeSrc)};s.responseXML=null},100)};var O=e.parseXML||function(e,t){if(window.ActiveXObject){t=new ActiveXObject('Microsoft.XMLDOM');t.async='false';t.loadXML(e)} 34else{t=(new DOMParser()).parseFromString(e,'text/xml')};return(t&&t.documentElement&&t.documentElement.nodeName!='parsererror')?t:null},X=e.parseJSON||function(e){return window['eval']('('+e+')')},C=function(t,r,i){var n=t.getResponseHeader('content-type')||'',o=r==='xml'||!r&&n.indexOf('xml')>=0,a=o?t.responseXML:t.responseText;if(o&&a.documentElement.nodeName==='parsererror'){if(e.error){e.error('parsererror')}};if(i&&i.dataFilter){a=i.dataFilter(a,r)};if(typeof a==='string'){if(r==='json'||!r&&n.indexOf('json')>=0){a=X(a)} 35else if(r==='script'||!r&&n.indexOf('javascript')>=0){e.globalEval(a)}};return a};return p}};e.fn.ajaxForm=function(r){r=r||{};r.delegation=r.delegation&&e.isFunction(e.fn.on);if(!r.delegation&&this.length===0){var n={s:this.selector,c:this.context};if(!e.isReady&&n.s){t('DOM not ready, queuing ajaxForm');e(function(){e(n.s,n.c).ajaxForm(r)});return this};t('terminating; zero elements found by selector'+(e.isReady?'':' (DOM not ready)'));return this};if(r.delegation){e(document).off('submit.form-plugin',this.selector,a).off('click.form-plugin',this.selector,i).on('submit.form-plugin',this.selector,r,a).on('click.form-plugin',this.selector,r,i);return this};return this.ajaxFormUnbind().bind('submit.form-plugin',r,a).bind('click.form-plugin',r,i)};function a(t){var r=t.data;if(!t.isDefaultPrevented()){t.preventDefault();e(t.target).ajaxSubmit(r)}};function i(t){var a=t.target,i=e(a);if(!(i.is('[type=submit],[type=image]'))){var o=i.closest('[type=submit]');if(o.length===0){return};a=o[0]};var r=this;r.clk=a;if(a.type=='image'){if(t.offsetX!==undefined){r.clk_x=t.offsetX;r.clk_y=t.offsetY} 36else if(typeof e.fn.offset=='function'){var n=i.offset();r.clk_x=t.pageX-n.left;r.clk_y=t.pageY-n.top} 37else{r.clk_x=t.pageX-a.offsetLeft;r.clk_y=t.pageY-a.offsetTop}};setTimeout(function(){r.clk=r.clk_x=r.clk_y=null},100)};e.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin')};e.fn.formToArray=function(t,n){var o=[];if(this.length===0){return o};var s=this[0],x=this.attr('id'),f=t?s.getElementsByTagName('*'):s.elements,p;if(f&&!/MSIE [678]/.test(navigator.userAgent)){f=e(f).get()};if(x){p=e(':input[form="'+x+'"]').get();if(p.length){f=(f||[]).concat(p)}};if(!f||!f.length){return o};var c,u,i,l,a,v,g;for(c=0,v=f.length;c<v;c++){a=f[c];i=a.name;if(!i||a.disabled){continue};if(t&&s.clk&&a.type=='image'){if(s.clk==a){o.push({name:i,value:e(a).val(),type:a.type});o.push({name:i+'.x',value:s.clk_x},{name:i+'.y',value:s.clk_y})};continue};l=e.fieldValue(a,!0);if(l&&l.constructor==Array){if(n){n.push(a)};for(u=0,g=l.length;u<g;u++){o.push({name:i,value:l[u]})}} 38else if(r.fileapi&&a.type=='file'){if(n){n.push(a)};var m=a.files;if(m.length){for(u=0;u<m.length;u++){o.push({name:i,value:m[u],type:a.type})}} 39else{o.push({name:i,value:'',type:a.type})}} 40else if(l!==null&&typeof l!='undefined'){if(n){n.push(a)};o.push({name:i,value:l,type:a.type,required:a.required})}};if(!t&&s.clk){var h=e(s.clk),d=h[0];i=d.name;if(i&&!d.disabled&&d.type=='image'){o.push({name:i,value:h.val()});o.push({name:i+'.x',value:s.clk_x},{name:i+'.y',value:s.clk_y})}};return o};e.fn.formSerialize=function(t){return e.param(this.formToArray(t))};e.fn.fieldSerialize=function(t){var r=[];this.each(function(){var n=this.name;if(!n){return};var a=e.fieldValue(this,t);if(a&&a.constructor==Array){for(var i=0,o=a.length;i<o;i++){r.push({name:n,value:a[i]})}} 41else if(a!==null&&typeof a!='undefined'){r.push({name:this.name,value:a})}});return e.param(r)};e.fn.fieldValue=function(t){for(var a=[],i=0,o=this.length;i<o;i++){var n=this[i],r=e.fieldValue(n,t);if(r===null||typeof r=='undefined'||(r.constructor==Array&&!r.length)){continue};if(r.constructor==Array){e.merge(a,r)} 42else{a.push(r)}};return a};
42e.fieldValue=function(t,r){var m=t.name,i=t.type,c=t.tagName.toLowerCase();if(r===undefined){r=!0};if(r&&(!m||t.disabled||i=='reset'||i=='button'||(i=='checkbox'||i=='radio')&&!t.checked||(i=='submit'||i=='image')&&t.form&&t.form.clk!=t||c=='select'&&t.selectedIndex==-1)){return null};if(c=='select'){var f=t.selectedIndex;if(f<0){return null};var u=[],l=t.options,s=(i=='select-one'),d=(s?f+1:l.length);for(var o=(s?f:0);o<d;o++){var a=l[o];if(a.selected){var n=a.value;if(!n){n=(a.attributes&&a.attributes.value&&!(a.attributes.value.specified))?a.text:a.value};if(s){return n};u.push(n)}};return u};return e(t).val()};e.fn.clearForm=function(t){return this.each(function(){e('input,select,textarea',this).clearFields(t)})};e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,i=this.tagName.toLowerCase();if(r.test(a)||i=='textarea'){this.value=''} 43else if(a=='checkbox'||a=='radio'){this.checked=!1} 44else if(i=='select'){this.selectedIndex=-1} 45else if(a=='file'){if(/MSIE/.test(navigator.userAgent)){e(this).replaceWith(e(this).clone(!0))} 46else{e(this).val('')}} 47else if(t){if((t===!0&&/hidden/.test(a))||(typeof t=='string'&&e(this).is(t))){this.value=''}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(e){if(e===undefined){e=!0};return this.each(function(){this.disabled=!e})};e.fn.selected=function(t){if(t===undefined){t=!0};return this.each(function(){var a=this.type;if(a=='checkbox'||a=='radio'){this.checked=t} 48else if(this.tagName.toLowerCase()=='option'){var r=e(this).parent('select');if(t&&r[0]&&r[0].type=='select-one'){r.find('option').selected(!1)};this.selected=t}})};e.fn.ajaxSubmit.debug=!1;function t(){if(!e.fn.ajaxSubmit.debug){return};var t='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log){window.console.log(t)} 49else if(window.opera&&window.opera.postError){window.opera.postError(t)}}})); 50/*! 51 * jQuery Cookie Plugin v1.4.1 52 * https://github.com/carhartl/jquery-cookie 53 * 54 * Copyright 2006, 2014 Klaus Hartl 55 * Released under the MIT license 56 */ 57(function(e){if(typeof define==='function'&&define.amd){define(['jquery'],e)} 58else if(typeof exports==='object'){module.exports=e(require('jquery'))} 59else{e(jQuery)}}(function(e){var r=/\+/g;function i(e){return n.raw?e:encodeURIComponent(e)};function t(e){return n.raw?e:decodeURIComponent(e)};function u(e){return i(n.json?JSON.stringify(e):String(e))};function c(e){if(e.indexOf('"')===0){e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\')};try{e=decodeURIComponent(e.replace(r,' '));return n.json?JSON.parse(e):e}catch(i){}};function o(i,o){var r=n.raw?i:c(i);return e.isFunction(o)?o(r):r};var n=e.cookie=function(r,f,c){if(arguments.length>1&&!e.isFunction(f)){c=e.extend({},n.defaults,c);if(typeof c.expires==='number'){var j=c.expires,x=c.expires=new Date();x.setMilliseconds(x.getMilliseconds()+j*864e+5)};return(document.cookie=[i(r),'=',u(f),c.expires?'; expires='+c.expires.toUTCString():'',c.path?'; path='+c.path:'',c.domain?'; domain='+c.domain:'',c.secure?'; secure':''].join(''))};var d=r?undefined:{},m=document.cookie?document.cookie.split('; '):[],a=0,g=m.length;for(;a<g;a++){var p=m[a].split('='),l=t(p.shift()),s=p.join('=');if(r===l){d=o(s,f);break};if(!r&&(s=o(s))!==undefined){d[l]=s}};return d};n.defaults={};e.removeCookie=function(n,i){e.cookie(n,'',e.extend({},i,{expires:-1}));return!e.cookie(n)}})); 60;var Editor=function(t){var e=this;e.area=typeof t!='undefined'?t:document.getElementsById('forum_message');e.selection=function(){var t=e.area.selectionStart,n=e.area.selectionEnd,o=e.area.value.substring(t,n),i=e.area.value.substring(0,t),a=e.area.value.substring(n),l={start:t,end:n,value:o,before:i,after:a};return l};e.select=function(t,n,o){e.area.focus();e.area.setSelectionRange(t,n);if(typeof o=='function')o()};e.replace=function(t,n,o){var i=e.selection(),a=i.start,r=i.end,l=i.value.replace(t,n);e.area.value=i.before+l+i.after;e.select(a,a+l.length);if(typeof o=='function'){o()}};e.insert=function(t,n){var o=e.selection(),i=o.start,a=o.end;e.area.value=o.before+t+o.after;e.select(i+t.length,i+t.length);if(typeof n=='function'){n()}};e.wrap=function(t,n,o){var i=e.selection(),l=i.value,a=i.before,r=i.after;e.area.value=a+t+l+n+r;e.select(a.length+t.length,a.length+t.length+l.length);if(typeof o=='function'){o()}};e.indent=function(t,n){var o=e.selection();if(o.value.length>0){e.replace(/(^|\n)([^\n])/gm,'$1'+t+'$2',n)} 61else{e.area.value=o.before+t+o.value+o.after;e.select(o.start+t.length,o.start+t.length);if(typeof n=='function'){n()}}};e.outdent=function(t,n){var o=e.selection();if(o.value.length>0){e.replace(new RegExp('(^|\n)'+t,'gm'),'$1',n)} 62else{var i=o.before.replace(new RegExp(t+'$'),'');e.area.value=i+o.value+o.after;e.select(i.length,i.length);if(typeof n=='function'){n()}}}};window.editor_handle=function(e,o,n){String.prototype.capitalize=function(e){return(e?this.toLowerCase():this).replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})};var u=document.getElementById(e),l=document.getElementById(o).getElementsByTagName('a'),t=new Editor(u);$(n+' #b-bold').on('click',function(){t.wrap('[b]','[/b]')});
62$(n+' #b-italic').on('click',function(){t.wrap('[i]','[/i]')});$(n+' #b-underline').on('click',function(){t.wrap('[u]','[/u]')});$(n+' #b-strikethrough').on('click',function(){t.wrap('[s]','[/s]')});$(n+' #b-chain').on('click',function(){var e=t.selection(),n=null,o=null;if(e.value.length>0){i('ÐдÑÐµÑ ÑÑÑлки (URL):','http://',!0,function(n){o=n;t.insert('[url='+n+']'+e.value+'[/url]')})} 63else{i('Ðазвание ÑÑÑлки:','ÐÐ°Ñ ÑекÑÑ ÑÑÑлки...',!1,function(e){n=e;i('ÐдÑÐµÑ ÑÑÑлки (URL):','http://',!0,function(e){o=e;t.insert('[url='+e+']'+n+'[/url]')})})}});$(n+' #b-right').on('click',function(){var e=t.selection();if(e.start==e.end){t.insert('[quote]ÐÑÑавÑÑе ÑиÑаÑÑ ÑÑда[/quote]')} 64else{t.wrap('[quote]','[/quote]')}});$(n+' #b-video').on('click',function(){var e=t.selection();i('ÐдÑÐµÑ ÑÑÑлки (URL):','http:// ( Video.sibnet.ru или Youtube )',!1,function(e){var o=s(e);if(o){t.insert('[youtube]'+o+'[/youtube]')} 65else{var n=f(e);if(n){t.insert('[video] '+n+' [/video]')} 66else{alert('Ðе пÑавилÑÐ½Ð°Ñ ÑÑÑлка')}}})});$('#b-image').on('click',function(){$('#upload_img_modal').show();$('.custom-modal-overlay').show()});var r={'select':function(){t.select(0,u.value.length)},'return':function(){t.insert('\n')},'link':function(){var e=t.selection(),n=null,o=null;if(e.value.length>0){i('ÐдÑÐµÑ ÑÑÑлки (URL):','http://',!0,function(n){o=n;t.insert('[url='+n+']'+e.value+'[/url]')})} 67else{i('Ðазвание ÑÑÑлки:','ÐÐ°Ñ ÑекÑÑ ÑÑÑлки...',!1,function(e){n=e;i('ÐдÑÐµÑ ÑÑÑлки (URL):','http://',!0,function(e){o=e;t.insert('[url='+e+']'+n+'[/url]')})})}},};function s(e){var n=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,t=e.match(n);return(t&&t[7].length==11)?t[7]:!1};function f(e){var n=/^.*\/video([0-9]+)-.*/,t=e.match(n);return(t&&t[1].length>4&&t[1].length<12)?t[1]:!1};function i(e,t,n,a){$('.custom-modal-overlay').show();var o=document.createElement('div');o.className='custom-modal custom-modal-prompt';o.innerHTML='<div class="custom-modal-header">'+e+'</div><div class="custom-modal-content"></div><div class="custom-modal-action"></div>';var u=function(e){$('.custom-modal-overlay').hide();o.parentNode.removeChild(o);if(typeof a=='function')a(e)},i=document.createElement('input');i.type='text';i.placeholder=t;var r=document.createElement('button');r.innerHTML='OK';r.onclick=function(){if(n){if(i.value!==''&&i.value!==t){u(i.value)}} 68else{u(i.value==t?'':i.value)}};var l=document.createElement('button');l.innerHTML='ÐÑмена';l.onclick=function(){$('.custom-modal-overlay').hide();o.parentNode.removeChild(o)};document.body.appendChild(o);o.children[1].appendChild(i);o.children[2].appendChild(r);o.children[2].appendChild(l)};function d(e){var t=e.hash.replace('#','');if(r[t]){e.onclick=function(){r[t]();return!1}}};for(var a=0,c=l.length;a<c;++a){d(l[a]);l[a].href='#'};function m(e){if(t.selection().value.length>0){t.wrap('<'+e+'>','</'+e+'>')} 69else{var n='<'+e+'>Heading '+e.substr(1)+'</'+e+'>';t.insert(n,function(){var e=t.selection().start;t.select(e-n.length+4,e-5)})}};$('#upload_img_modal_ok_button').unbind().click(function(){$('#upload_img_modal').hide();$('.custom-modal-overlay').hide();var e=$('#hand_put_url').val();if(!e||0===e.length){t.insert('[img][/img]')} 70else if(e.indexOf('photo.sibnet.ru')>-1){t.insert('[img]'+e+'[/img]')} 71else{$.ajaxSetup({xhrFields:{'withCredentials':!0}});$.post('http://photo.sibnet.ru/ajax_upload_file_for_info.php?bylink',{link:$('#hand_put_url').val(),auth:$('#upload_form input[name="auth"]').val()},function(e){t.insert('[img]'+e+'[/img]')})};$('#hand_put_url').val('')});$('#upload_img_modal_cansel_button').click(function(){$('#upload_img_modal').hide();$('.custom-modal-overlay').hide();$('#hand_put_url').val('')});$('#upload_img_modal').on('submit',function(){$('#upload_img_modal').hide()});$('#upload_form input[name=\'comment_img\']').unbind().change(function(){$('#upload_form').submit();$(this).val('')});$('#upload_form').ajaxForm({xhrFields:{'withCredentials':!0},beforeSend:function(){var e='0%';console.log(e)},uploadProgress:function(e,t,n,o){var i=o+'%';console.log(i)},success:function(){var e='100%';console.log(e)}
71,complete:function(e){t.insert('[img]'+e.responseText+'[/img]');$('.custom-modal-overlay').hide()}});$(n+' #preview_comment_eye').click(function(){var i=document.querySelector('#'+e),o=i.value.replace(/(\r\n|\n|\r)/gm,'<br>').replace(/\[b\]/g,'<b>').replace(/\[\/b\]/g,'</b>').replace(/\[i\]/g,'<i>').replace(/\[\/i\]/g,'</i>').replace(/\[u\]/g,'<u>').replace(/\[\/u\]/g,'</u>').replace(/\[s\]/g,'<strike>').replace(/\[\/s\]/g,'</strike>').replace(/\[quote\]/g,'<div class="quotetop">ЦиÑаÑа</div><div class="quotemain">').replace(/\[\/quote\]/g,'</div>'),t=i.value.match(/(\[img\])([^\[]*)(\[\/img\])/g);if(t){t.forEach(function(e,t,n){var i=e.match(/(\[img\])([^\[]*)(\[\/img\])/);if(i&&i[1]=='[img]'&&i[3]=='[/img]'){var a=('[img]'+i[2]+'[/img]');o=o.replace(a,'<img src="'+i[2]+'" style="max-width:100%;"/>')}})};var t=i.value.match(/(\[video\] )([^\[]*)( \[\/video\])/g);if(t){t.forEach(function(e,t,n){var i=e.match(/(\[video\] )([^\[]*)( \[\/video\])/);if(i&&i[1]=='[video] '&&i[3]==' [/video]'){var a=('[video] '+i[2]+' [/video]');o=o.replace(a,'<iframe height="384" src="//video.sibnet.ru/shell.php?videoid='+i[2]+'" frameborder="0" scrolling="no" allowfullscreen></iframe>')}})};var t=i.value.match(/(\[youtube\])([^\[]*)(\[\/youtube\])/g);if(t){t.forEach(function(e,t,n){var i=e.match(/(\[youtube\])([^\[]*)(\[\/youtube\])/);if(i&&i[1]=='[youtube]'&&i[3]=='[/youtube]'){var a=('[youtube]'+i[2]+'[/youtube]');o=o.replace(a,'<iframe height="315" src="https://www.youtube.com/embed/'+i[2]+'" frameborder="0" allowfullscreen></iframe>')}})};var t=i.value.match(/(\[url=([^\]]*)\])([^\[]*)(\[\/url\])/g);if(t){t.forEach(function(e,t,n){var i=e.match(/(\[url=([^\]]*)\])([^\[]*)(\[\/url\])/);if(i){console.log(i);o=o.replace(i[0],'<a href="'+i[2]+'">'+i[3]+'</a>')}})};$(n+' #comment_result').html(o);$(n+' #comment_result').toggle('slow')})}; 72(function(){var o={$root:{},comments:[],last_cc_select:{},};var e,t={init:function(r){e=$.extend({},o,e,r);e.$root=$(this);$.cookie.json=!0;$(document).ready(function(){e.obj={arr:[]};e.page_id=$('#FRM_Area').data('page-id');e.user_id=$('#FRM_Area').data('userid');e.element_top=$('.main-content-left').offset().top;t.create_new_comment();t.scroll_after_refresh();if(document.location.hash.indexOf('#cmt')+1||document.location.hash=='#comments'||document.location.hash=='#updated'||document.location.hash=='#up'||/\#fpst_(\d+)/i.test(document.location.hash)){t.show_comments_block()};if($('#forum_message').get(0)!==undefined){editor_handle('forum_message','editor-control','#forumFormArea')};if($('.m').css('display')=='block'){t.set_cookie()};$('.reply_comment').on('click',t.replay);$('#cwp-to-first-comment').on('click',function(){t.show_comments_block();t.scrollByName('#up');return!1});$('#cw-updater').on('click',function(){$.cookie('window_scroll_position',$(window).scrollTop())})})},scrollByName:function(e){$('html, body').animate({scrollTop:$(e).offset().top},500)},create_new_comment:function(){e.$new_comment=$('#new-comment-place');$('.fcm__add-comment').on('click',function(){t.add_comments()});$('.cwh-addcomment, #cwp-addcomment').on('click',function(){t.show_comments_block();if($('.cc').length>0){t.newcomment(!0)} 73else{t.scrollByName('.cwh-discussion')};return!1});e.$new_comment.hide()},show_comments_block:function(){if($('#comments-wrap').is(':hidden')){$('#comments-wrap').show();t.set_cookie();return isr_cmt_redir()}},scroll_after_refresh:function(){var e=$.cookie('window_scroll_position');if(e&&e>0){$('html, body').animate({scrollTop:e},1000);$.cookie('window_scroll_position',0)}},set_cookie:function(){$.cookie('visit_date',e.obj,{expires:30,path:'/'})},replay:function(){$('#forumFormAreaReply').remove();if(e.last_cc_select.rebut){e.last_cc_select.rebut.css('visibility','visible')};e.last_cc_select=t.cc_prepare(this);e.last_cc_select.rebut.css('visibility','hidden');var n=$('#forumFormArea');$form_area_reply=n.clone().insertBefore(e.last_cc_select.f);$form_area_reply.prop('id','forumFormAreaReply');$form_area_reply.find('#forum_message').val('').prop('id','forum_message_reply');if($('#forum_message_reply').get(0)!==undefined){editor_handle('forum_message_reply','editor-control','#forumFormAreaReply')};var o=e.last_cc_select.cc.data('reply-for'),r=$('#FRM_Area').data('user-login'),c=e.last_cc_select.cc.data('author_name');
73$form=$form_area_reply.find('form[name="forumForm"]');$form.find('.hdr').html('ÐÑÐ²ÐµÑ <span class="from">'+r+'</span> длÑ: <span class="to">'+c+'</span> ( <a href="" title="ÐÑмениÑÑ Ð¾ÑвеÑ" class="cansel_replay">ÐÑмениÑÑ</a> )');$form.find('.but').html('<input type="submit" value="ÐÑпÑавиÑÑ" class="submit short"><a class="commenting-rules" href="/article/305745/" target="_blank">ÐÑавила комменÑиÑованиÑ</a>');$replay_field=$form.find('input[name="replay"]');if($replay_field.get(0)===undefined){$('<input>').attr({type:'hidden',name:'replay',value:o}).appendTo($form)} 74else{$replay_field.val(o)};e.$new_comment.show();$form_area_reply.find('.cansel_replay').on('click',function(){t.newcomment(!1);return!1});return!1},add_comments:function(){var t=$('#forumFormArea'),e=$('.fcm__add-comment');if(e.attr('data-location')==='down'){e.attr('data-location','up');t.detach().insertAfter($('#cw-updater'));e.detach().insertAfter($('.cw-head'))} 75else{e.attr('data-location','down');t.detach().insertAfter($('#cmt'));e.detach().insertAfter($('#cw-updater'))}},newcomment:function(t){var r=e.$new_comment;if(e.last_cc_select.rebut){e.last_cc_select.rebut.css('visibility','visible')};r.hide();var o=$('#forumFormAreaReply');o.remove();return!1},cc_prepare:function(t){var e={};e.cc=$(t).parents('.cc');e.f=e.cc.find('> .f');e.rebut=e.f.children().find('> .rebut');return e},};$.fn.sibnet_float_comment_form=function(e){if(t[e]){return t[e].apply(this,Array.prototype.slice.call(arguments,1))} 76else if(typeof e==='object'||!e){return t.init.apply(this,arguments)} 77else{$.error('Method '+e+' not exist')}}})(); 78;isr_frm=(typeof(isr_frm)!='undefined')?isr_frm:{};isr_frm.script_dir=(function(){var e=document.getElementsByTagName('script'),t=e[e.length-1].src;return t.substring(0,t.lastIndexOf('/'))+'/'}());isr_frm.root_domain=(function(){var e=isr_frm.script_dir.substring(isr_frm.script_dir.indexOf('.'),isr_frm.script_dir.lastIndexOf('/')),t=e.substring(0,e.indexOf('/'));return t}());(function(e){var r={control_url:'/fcm/control/',script_dir:isr_frm.script_dir,root_domain:isr_frm.root_domain,loader_selector:'.fcm .isr_loader',loader_delay:900,vote_plus_selector:'.fcm .cc .f .l.vote .vp',vote_minus_selector:'.fcm .cc .f .l.vote .vm',date_selector:'.fcm .cc .c .d',auth_selector:'.fcm .login .link',print_debug:!1};var t,o={init:function(n){t=e.extend({},r,t,n);e('.fcm').append(e('<div class="isr_loader"><span>ÐÐ´ÐµÑ Ð·Ð°Ð³ÑÑзка... [x]</span></div>'));e(document).ajaxSend(function(o,r,n){if(n.url.indexOf(t.control_url)!=-1){t.loaderTm=setTimeout(function(){e(t.loader_selector).show()},t.loader_delay);t.busy=!0}});e(document).ajaxStop(function(){clearTimeout(t.loaderTm);e(t.loader_selector).hide();t.busy=!1});e(t.loader_selector).click(function(){e(this).hide()});o.hover_vote_label(t.vote_plus_selector,'ÐдобÑÑÑ! +1');o.hover_vote_label(t.vote_minus_selector,'ÐÑÑждаÑ. -1');o.click_vote_label(t.vote_plus_selector);o.click_vote_label(t.vote_minus_selector);e(t.date_selector).click(o.edit_to_forum);e(t.auth_selector).click(o.click_auth);var s=document.getElementById('isr_speech');if(s){s.onfocus=s.blur;s.onwebkitspeechchange=function(e){o.insertArea(document.getElementById('forum_message'),s.value);s.value=''}};e(t.loader_selector).hide();t.busy=!1},insertArea:function(e,t){if(document.selection)e.value+=t;else if(typeof(e.selectionStart)=='number'){var o=e.selectionStart,n=e.selectionEnd,r=e.value;e.select();if(o!=n){e.value=r.substr(0,o)+t+r.substr(n);e.setSelectionRange(o,o+t.length);e.focus()} 79else{t=(e.value.length&&t.length)?' '+t:t;e.value=r.substr(0,o)+t+r.substr(o);e.setSelectionRange(o+t.length,o+t.length);e.focus()}}},hover_vote_label:function(t,o){e(t).hover(function(){e(this).append(e('<div class="glabel"><span>'+o+'</span></div>').delay(200).fadeIn(200))},function(){e(this).find('div:last').remove()})},click_vote_label:function(r){e(r).click(function(){var n=e(this).parents('.cc').attr('id'),r=(e(this).attr('class')==='vp')?'+1':'';r=(e(this).attr('class')==='vm')?'-1':r;e.post(t.control_url,{id:n,use:'vote',value:r,print_debug:1},o.result_vote)})}
79,click_auth:function(e){Sibnet.Login.showForm();return!1},result_vote:function(t){if(t.vote.success!==!0){if(typeof(t.vote.auth_error)!='undefined'){alert(t.vote.error_message);return!1};if(typeof(t.vote.error_message)!='undefined'){alert(t.vote.error_message)};return!1};if(!t.vote.data.isvt){return!1};var o='#'+t.vote.data.id+' .vp',r='#'+t.vote.data.id+' .vm';e(o).html((t.vote.data.wp)?'+ '+t.vote.data.wp:' ');e(r).html((t.vote.data.wm)?'- '+t.vote.data.wm:' ');e(o).off('click mouseenter mouseleave');e(r).off('click mouseenter mouseleave');e('#'+t.vote.data.id+' .l.vote').attr('class','l')},edit_to_forum:function(o){if(o.altKey||o.ctrlKey){var l=e(this).parents('.cc').attr('id'),r=l.match(/^FRM_(\d+)_(\d+)_(\d+)$/);if(!r)return!1;var n=r[1],s=r[2],i=r[3],a='http://forum'+t.root_domain+'/index.php?act=post&do=edit_post&f='+n+'&t='+s+'&p='+i;if(t.root_domain=='.norilsk-sibnet.ru'){a='http://forum'+t.root_domain+'/index.php?app=forums&module=post§ion=post&do=edit_post&f='+n+'&t='+s+'&p='+i};window.open(a)}}};e.fn.fcmControl=function(t){if(o[t]){return o[t].apply(this,Array.prototype.slice.call(arguments,1))} 80else if(typeof t==='object'||!t){return o.init.apply(this,arguments)} 81else{e.error('ÐеÑод '+t+' не ÑÑÑеÑÑвÑеÑ')}}})(jQuery);$(function(){$().fcmControl()});function openClose(e){var t=(document.getElementById)?document.getElementById(e):document.all[e];if(!t){this.style.display='none';return!1};t.style.display=(t.style.display=='none')?'block':'none'};function forum_messages_submit(e,t){e.preventDefault();const messageField=t.forum_message||t.forum_message_reply;if(!messageField||messageField.value.trim().length===0){alert('ÐведиÑе комменÑаÑий!');messageField?.focus();return!1};sendKibanaAction('commented');const formData=new FormData(t);fetch(t.action,{method:'POST',body:formData,headers:{'X-Requested-With':'XMLHttpRequest'}}).then(response=>response.json()).then(data=>{if(data.success){window.location.replace(data.redirect);window.location.reload()} 82else{alert('ÐÑибка пÑи добавлении комменÑаÑиÑ')}}).catch(()=>{alert('ÐÑибка ÑоединениÑ')});return!1};function sendKibanaAction(e){try{$.ajax({url:'//cvt1.sibnet.ru/time',data:{type:e,data:1,pid:24,cudid:window.__counter_doc_uid?window.__counter_doc_uid:'',rnd:Math.random(),},cache:!1,})}catch(t){console.error(t)}}; 83;$('#FRM_Area').sibnet_float_comment_form();$(document).ready(function(){$('.isr_img_spoiler').fancybox()}); 84/*! 85* 11.10.2013 14:26:17 86* send error script Ctrl+Enter 87* jQuery v1.6.4-2.0.2 tested 88* Rinet - Dmirty Kravchuk 89*/ 90(function(n){var t={oID:'isr_send_error_utf8',zindex:101,send_url:'/send_error_utf8',result_field:{page_url:'',l_str:'',wrong_str:'',r_str:'',comment:''},send_result_map:{url:'page_url',pre_mst:'l_str',mst:'wrong_str',post_mst:'r_str',comment:'comment'},slen:40,maxText:256,lspan:'<span class="str_error">',rspan:'</span>',lng:{header_text:'ÐÑÑогÑаÑиÑеÑÐºÐ°Ñ Ð¾Ñибка в ÑекÑÑе:',alert_many_text:'ÐÑ Ð²Ñделили ÑлиÑком много ÑекÑÑа',cap_text:'ÐоÑлаÑÑ ÑообÑение об оÑибке модеÑаÑоÑÑ?<br />ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ Ð¾ÑÑанеÑÑÑ Ð½Ð° Ñой же ÑÑÑаниÑе.',loader_text:'ÐÐ´ÐµÑ Ð·Ð°Ð³ÑÑзка... [x]',comment_placeholder:'ÐомменÑаÑий Ð´Ð»Ñ Ð¼Ð¾Ð´ÐµÑаÑоÑа (необÑзаÑелÑно)',send_button:'ÐТÐÐ ÐÐÐТЬ',not_supported:'ÐÐ°Ñ Ð±ÑаÑÐ·ÐµÑ Ð½Ðµ поддеÑживаеÑÑÑ',send_success:'ÐаÑе ÑообÑение оÑпÑавлено!',thank:'ÐолÑÑое ÑпаÑибо.'}};var e,r={init:function(o){e=n.extend({},t,e,o);n(document).ready(function(){var e=n('#article-container');e.bind('keypress',function(e){if((e.ctrlKey==!0)&&(e.keyCode==13||e.keyCode==10)){r.error_open(e)}})})},error_win:function(o,s,l){var c=!1,i=(''+o+e.lspan+s+e.rspan+l);if(i.length>e.maxText){i='<span class="scr_error">'+e.lng.alert_many_text+'</span>';c=!0} 91else{i='«â¦'+i+'â¦Â»';c=!1};var a=e.oID,t='.'+a,u=n(t);if(!u.length){var p='\n<style type="text\/css">\r\n'+t+' {\ndisplay:none; z-index:'+e.zindex+'; width:620px; height:300px;\nposition:fixed; left:50%; top:100%; margin-top:-325px; margin-left:-310px;\nbackground-color: rgb(246, 246, 246);\nborder: 1px solid #AFB2B7;\nbox-shadow: 0px 0px 12px #AFB2B7;\nborder-radius: 2px 2px 2px 2px;\n}\n'+t+' div {\nfont-size:10px; color: #151515; font-family: "PT Serif",Georgia,"Times New Roman",Times,serif;\n}\n'+t+' .hdr {\npadding:12px; letter-spacing:1px;background-color: #D5D5D5;
91\nfont-weight:bold; font-size:14px; text-transform:uppercase;\n}\n'+t+' .x {\nowerflow:hidden; position:absolute; top:10px; right:10px; width:21px; height:21px; cursor:pointer;\nborder-radius: 10px 10px 10px 10px; background-color:#888888;\n}\n'+t+' .x div {\nfont-family: "Trebuchet MS"; line-height:14px; font-size:14px; width:14px; height:14px; font-weight:bold; color:#D5D5D5;margin-left:7px; margin-top:2px;\n}\n'+t+' .x:hover {\nbackground-color:#CF4040; box-shadow: 0px 0px 18px #FFFFFF; \n}\n'+t+' .x:hover div {\ncolor:#FFFFFF;\n}\n'+t+' .txt {\nheight:80px; font-size:14px; color:#444444; font-weight:bold; margin:15px; margin-bottom:0; \n}\n'+t+' .txt .str_error {\ncolor:red; text-decoration:underline;\n}\n'+t+' .txt .scr_error {\ncolor:red; font-size:18px;\n}\n'+t+' .cap {\nfont-size:14px; color:#444444; margin:15px; margin-top:6px;\n}\n'+t+' form {\nmargin:15px;\n}\n'+t+' .inptext {\npadding: 5px 2px; line-height: normal; font-size:14px; vertical-align: middle;\nborder:1px solid #D5D5D5; width:99%;\n}\n'+t+' .send_but {\ncursor:pointer; margin:15px; padding:8px; font-size:12px; display:inline-block;\nborder:1px solid #D5D5D5; float:right; letter-spacing:1px;\n}\n'+t+' .send_but:hover {\ncolor:red;\n}\n'+t+' .send_but:hover {\ncolor:red;\n}\n'+t+'_loader {\nz-index:'+(e.zindex+10)+'; position:fixed; display:none; top:0; left:0;\nheight:100%; width:100%; background:#CCCCCC; opacity:.9;\nfont-size:12px;\n}\n'+t+'_loader span {\ndisplay:block; position:absolute; right:50%; top:50%;\ncolor:#FFFFFF; background:#79B835; padding:5px 10px;\n-webkit-border-radius: 5px; -moz-border-radius: 5px;\nborder-radius: 5px; cursor:default;\n}\n<\/style>\n\n';n('head').append(p);var d='<div class="'+a+'"></div><div class="'+a+'_loader"><span>'+e.lng.loader_text+'</span></div>';n('body').append(d);n('.'+e.oID+'_loader').click(function(){n(this).hide()})};var d='<div class="'+a+'"><div class="hdr">'+e.lng.header_text+'</div><div class="x"><div>x</div></div><div class="txt">'+i+'</div><div class="area">'+((!c)?'<div class="cap">'+e.lng.cap_text+'</div><form><input class="inptext" type="text" placeholder="'+e.lng.comment_placeholder+'" /></form><div class="send_but">'+e.lng.send_button+'</div>':'')+'</div></div>';e.result_field.page_url=document.location.href;e.result_field.l_str=o;e.result_field.wrong_str=s;e.result_field.r_str=l;n(t).html(d);n(t).css('display','block');n('.'+e.oID+' .x').click(r.error_close);n('.'+e.oID+' .send_but').click(r.error_submit);n('.'+e.oID+' form').submit(function(e){e.preventDefault();return r.error_submit()});n('.'+e.oID+' .inptext').focus()},error_submit:function(){e.result_field.comment=n('.'+e.oID+' .inptext').val();n('.'+e.oID+'_loader').css('display','block');var t={};n.each(e.send_result_map,function(n,r){t[n]=e.result_field[r]});n.ajax({url:e.send_url,type:'GET',async:!1,dataType:'script',cache:!1,data:t,success:function(){r.error_close();r.send_kibana_action('send_error')},error:function(r,t,o){alert('networking error: '+o+'\n'+t+'\n'+r.statusText);n('.'+e.oID+'_loader').css('display','none')}});return!1},send_kibana_action:function(e){try{n.ajax({url:'//cvt1.sibnet.ru/time',data:{type:e,data:1,pid:24,cudid:window.__counter_doc_uid?window.__counter_doc_uid:'',rnd:Math.random(),},cache:!1,})}catch(r){console.error(r)}},error_send_result:function(){n('.'+e.oID+' .hdr').html(e.lng.send_success);n('.'+e.oID+' .txt').html(e.lng.thank);n('.'+e.oID+' .area').html('');n('.'+e.oID+'_loader').css('display','none');n('body').bind('click',r.error_close)},error_close:function(){n('.'+e.oID+'_loader').css('display','none');n('.'+e.oID).css('display','none');n('body').unbind('click',r.error_close)},error_open:function(n){var t=r.getSel();if(!t){return};with(t){pre=pre.substring(pre.length-e.slen,pre.length).replace(/^\S{1,10}\s+/,'');suf=suf.substring(0,e.slen).replace(/\s+\S{1,10}$/,'')};var o=t.pre,i=t.text,s=t.suf;r.error_win(o,i,s)},getSel:function(){try{var n=null,r=null,p=e.slen;if(window.getSelection){r=window.getSelection()} 92else{if(window.document.getSelection){r=window.document.getSelection()} 93else{r=window.document.selection}};if(r!=null){var s='',n=null,a='',u=-1;if(r.getRangeAt){var t=r.getRangeAt(0);n=t.toString();var i=window.document.createRange();i.setStartBefore(t.startContainer.ownerDocument.body);i.setEnd(t.startContainer,t.startOffset);s=i.toString();var o=t.cloneRange();o.setStart(t.endContainer,t.endOffset);o.setEndAfter(t.endContainer.ownerDocument.body);a=o.toString()} 94else{if(r.createRange){var t=r.createRange();n=t.text;var i=r.createRange();i.moveStart('character',-p);i.moveEnd('character',-n.length);s=i.text;var o=r.createRange();o.moveEnd('character',p);o.moveStart('character',n.length);a=o.text} 95else{n=''+r}};var l,d=(l=n.match(/^(\s*)/))&&l[0].length,c=(l=n.match(/(\s*)$/))&&l[0].length;s=s+n.substring(0,d);a=n.substring(n.length-c,n.length)+a;n=n.substring(d,n.length-c);if(n==''){return!1};return{pre:s,text:n,suf:a,pos:u}} 96else{alert(e.lng.not_supported);return!1}}catch(x){return!1};return!1}};n.fn.isr_send_error=function(e){if(r[e]){return r[e].apply(this,Array.prototype.slice.call(arguments,1
96))} 97else if(typeof e==='object'||!e){return r.init.apply(this,arguments)} 98else{n.error('Method '+e+' not exist')}}})(jQuery);$(function(){$().isr_send_error()}); 99(function(t){var o={control_url:'/news_rate_panel/control/',like_url:'/news_rate_panel/like/',loader_selector:'.isr_nrp .isr_loader',loader_delay:900,fav_text_selector:'.swbutton-fav',fav_c_selector:'.isr_nrp .fav .c_fav',fav_bullet_selector:'.isr_nrp .fav .isr_icons.bullet',fav_bullet_class:'isr_icons bullet',fav_bullet_on_class:'isr_icons bullet on',vote_plus_selector:'.swbutton-like-ico',vote_minus_selector:'.swbutton-dislike-ico',print_debug:!1};var e,r={init:function(s){e=t.extend({},o,e,s);t('.isr_nrp').append(t('<div class="isr_loader"><span>ÐÐ´ÐµÑ Ð·Ð°Ð³ÑÑзка... [x]</span></div>'));t(document).ajaxSend(function(r,s,o){if(o.url.indexOf(e.control_url)!=-1){e.loaderTm=setTimeout(function(){t(e.loader_selector).show()},e.loader_delay);e.busy=!0}});t(document).ajaxStop(function(){clearTimeout(e.loaderTm);t(e.loader_selector).hide();e.busy=!1});t(e.loader_selector).click(function(){t(this).hide()});r.click_fav(e.fav_text_selector);t(document).ready(function(){r.click_rate(e.vote_plus_selector);r.click_rate(e.vote_minus_selector)});t(e.loader_selector).hide();e.busy=!1},click_fav:function(o){t(o).click(function(){var o=t('.isr_nrp').attr('id');t.post(e.control_url,{id:o,use:'favorite',print_debug:1},r.result_fav)})},result_fav:function(r){if(r.vote.success!==!0){if(typeof(r.vote.auth_error)!='undefined'){alert(r.vote.error_message);return!1};if(typeof(r.vote.error_message)!='undefined'){alert(r.vote.error_message)};return!1};if(!r.vote.data.id){return!1};t(e.fav_text_selector).attr('class',(r.vote.data.exists)?'swbutton-ico swbutton-fav swbutton-fav-hl':'swbutton-ico swbutton-fav');t(e.fav_text_selector).attr('title',r.vote.data.title);t(e.fav_c_selector).html(r.vote.data.c_fav);t(e.fav_bullet_selector).attr('class',(r.vote.data.exists)?e.fav_bullet_on_class:e.fav_bullet_class)},click_rate:function(o){t(o).click(function(){var s=t('.isr_nrp').attr('id'),o=(t(this).attr('class')==='swbutton-ico swbutton-like-ico')?'+1':'';o=(t(this).attr('class')==='swbutton-ico swbutton-dislike-ico')?'-1':o;t.ajax({url:e.like_url,type:'POST',data:{id:s,value:o},success:function(t){r.success_rate(t)},error:function(t){r.fail_rate(t)}})})},fail_rate:function(t){alert(t.responseJSON.error_message)},success_rate:function(r){t(e.vote_plus_selector+' ~ .swbutton-counter').html(r.vp);t(e.vote_minus_selector+' ~ .swbutton-counter').html(r.vm);if(r.sibnet_club_response){Sibnet.Notification.show({icon:'piggy',preTitle:'ÐÑ Ð·Ð°ÑабоÑали',title:'+'+r.sibnet_club_response.rewards[0].amount+' ÐÐÐУСÐÐ',text:'ÐаÑабоÑаÑÑ Ð¸ поÑÑаÑиÑÑ Ð±Ð¾Ð½ÑÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ в Sibnet-клÑбе',link:'http://club.sibnet.ru/'})}}};
99t.fn.nrpControl=function(e){if(r[e]){return r[e].apply(this,Array.prototype.slice.call(arguments,1))} 100else if(typeof e==='object'||!e){return r.init.apply(this,arguments)} 101else{t.error('ÐеÑод '+e+' не ÑÑÑеÑÑвÑеÑ')}}})(jQuery);$(function(){$().nrpControl()}); 102;$(document).keydown(function(e){if(e.keyCode==69&&e.ctrlKey){var n=$('.article').data('id');if(typeof n!='undefined'&&n){e.preventDefault();window.open('/adminjs/?id='+n,'_blank')};return}}); 103;document.addEventListener('DOMContentLoaded',()=>{const body=document.querySelector('body');const openBtn=document.querySelector('#socials-open-btn');const shareBlock=document.querySelector('#share-block');const closeBtn=document.querySelector('#share-block-close-btn');const copyUrlBtn=document.querySelector('#social-copy-url');const activeClassForCopyUrlBtn='article__social_copy-btn-wrap--active';const elInCopyUrlBtnWithTitle=copyUrlBtn.querySelector('.article__social_copy-btn-title');const showClassForShareBlock='article__social-wrap--show';openBtn.addEventListener('click',()=>{shareBlock.style.opacity=0;shareBlock.classList.add(showClassForShareBlock);body.style.overflow='hidden';setTimeout(()=>{shareBlock.style.opacity=1},10)});closeBtn.addEventListener('click',()=>{shareBlock.classList.remove(showClassForShareBlock);body.style.overflow='auto';copyUrlBtn.classList.remove(activeClassForCopyUrlBtn);elInCopyUrlBtnWithTitle.textContent='ÐопиÑоваÑÑ ÑÑÑлкÑ'});copyUrlBtn.addEventListener('click',()=>{if(navigator.clipboard){navigator.clipboard.writeText(window.location.href)} 104else{const copyText=window.location.href;const tempInput=document.createElement('input');tempInput.value=copyText;document.body.appendChild(tempInput);tempInput.select();tempInput.setSelectionRange(0,99999);document.execCommand('copy');document.body.removeChild(tempInput)};copyUrlBtn.classList.add(activeClassForCopyUrlBtn);elInCopyUrlBtnWithTitle.textContent='СÑÑлка ÑкопиÑована'})}) 105/*! 106 * fancyBox - jQuery Plugin 107 * version: 2.1.5 (Fri, 14 Jun 2013) 108 * @requires jQuery v1.6 or later 109 * 110 * Examples at http://fancyapps.com/fancybox/ 111 * License: www.fancyapps.com/fancybox/#license 112 * 113 * Copyright 2012 Janis Skarnelis - [email protected] 114 * 115 */ 116(function(i,o,t,c){'use strict';var g=t('html'),a=t(i),r=t(o),e=t.fancybox=function(){e.open.apply(this,arguments)},u=navigator.userAgent.match(/msie/i),h=null,s=o.createTouch!==c,p=function(e){return e&&e.hasOwnProperty&&e instanceof t},f=function(e){return e&&t.type(e)==='string'},d=function(e){return f(e)&&e.indexOf('%')>0},m=function(e){return(e&&!(e.style.overflow&&e.style.overflow==='hidden')&&((e.clientWidth&&e.scrollWidth>e.clientWidth)||(e.clientHeight&&e.scrollHeight>e.clientHeight)))},n=function(t,i){var n=parseInt(t,10)||0;if(i&&d(t)){n=e.getViewport()[i]/100*n};return Math.ceil(n)},l=function(e,t){return n(e,t)+'px'};t.extend(e,{version:'2.1.5',defaults:{padding:15,margin:20,width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:14999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!s,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:3000,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'},keys:{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'+(u?' 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,openMethod:'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:t.noop,beforeLoad:t.noop,afterLoad:t.noop,beforeShow:t.noop,afterShow:t.noop,beforeChange:t.noop,beforeClose:t.noop,afterClose:t.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1,isOpen:!1,isOpened:!1,wrap:null,
116skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(i,n){if(!i){return};if(!t.isPlainObject(n)){n={}};if(!1===e.close(!0)){return};if(!t.isArray(i)){i=p(i)?t(i).get():[i]};t.each(i,function(o,a){var l={},s,g,d,r,h,u,m;if(t.type(a)==='object'){if(a.nodeType){a=t(a)};if(p(a)){l={href:a.data('fancybox-href')||a.attr('href'),title:a.data('fancybox-title')||a.attr('title'),isDom:!0,element:a};if(t.metadata){t.extend(!0,l,a.metadata())}} 117else{l=a}};s=n.href||l.href||(f(a)?a:null);g=n.title!==c?n.title:l.title||'';d=n.content||l.content;r=d?'html':(n.type||l.type);if(!r&&l.isDom){r=a.data('fancybox-type');if(!r){h=a.prop('class').match(/fancybox\.(\w+)/);r=h?h[1]:null}};if(f(s)){if(!r){if(e.isImage(s)){r='image'} 118else if(e.isSWF(s)){r='swf'} 119else if(s.charAt(0)==='#'){r='inline'} 120else if(f(a)){r='html';d=a}};if(r==='ajax'){u=s.split(/\s+/,2);s=u.shift();m=u.shift()}};if(!d){if(r==='inline'){if(s){d=t(f(s)?s.replace(/.*(?=#[^\s]+$)/,''):s)} 121else if(l.isDom){d=a}} 122else if(r==='html'){d=s} 123else if(!r&&!s&&l.isDom){r='inline';d=a}};t.extend(l,{href:s,type:r,content:d,title:g,selector:m});i[o]=l});e.opts=t.extend(!0,{},e.defaults,n);if(n.keys!==c){e.opts.keys=n.keys?t.extend({},e.defaults.keys,n.keys):!1};e.group=i;return e._start(e.opts.index)},cancel:function(){var t=e.coming;if(!t||!1===e.trigger('onCancel')){return};e.hideLoading();if(e.ajaxLoad){e.ajaxLoad.abort()};e.ajaxLoad=null;if(e.imgPreload){e.imgPreload.onload=e.imgPreload.onerror=null};if(t.wrap){t.wrap.stop(!0,!0).trigger('onReset').remove()};e.coming=null;if(!e.current){e._afterZoomOut(t)}},close:function(i){e.cancel();if(!1===e.trigger('beforeClose')){return};e.unbindEvents();if(!e.isActive){return};if(!e.isOpen||i===!0){t('.fancybox-wrap').stop(!0).trigger('onReset').remove();e._afterZoomOut()} 124else{e.isOpen=e.isOpened=!1;e.isClosing=!0;t('.fancybox-item, .fancybox-nav').remove();e.wrap.stop(!0,!0).removeClass('fancybox-opened');e.transitions[e.current.closeMethod]()}},play:function(t){var i=function(){clearTimeout(e.player.timer)},n=function(){i();if(e.current&&e.player.isActive){e.player.timer=setTimeout(e.next,e.current.playSpeed)}},o=function(){i();r.unbind('.player');e.player.isActive=!1;e.trigger('onPlayEnd')},a=function(){if(e.current&&(e.current.loop||e.current.index<e.group.length-1)){e.player.isActive=!0;r.bind({'onCancel.player beforeClose.player':o,'onUpdate.player':n,'beforeLoad.player':i});n();e.trigger('onPlayStart')}};if(t===!0||(!e.player.isActive&&t!==!1)){a()} 125else{o()}},next:function(t){var i=e.current;if(i){if(!f(t)){t=i.direction.next};e.jumpto(i.index+1,t,'next')}},prev:function(t){var i=e.current;if(i){if(!f(t)){t=i.direction.prev};e.jumpto(i.index-1,t,'prev')}},jumpto:function(t,i,a){var o=e.current;if(!o){return};t=n(t);e.direction=i||o.direction[(t>=o.index?'next':'prev')];e.router=a||'jumpto';if(o.loop){if(t<0){t=o.group.length+(t%o.group.length)};t=t%o.group.length};if(o.group[t]!==c){e.cancel();e._start(t)}},reposition:function(i,n){var a=e.current,r=a?a.wrap:null,o;if(r){o=e._getPosition(n);if(i&&i.type==='scroll'){delete o.position;r.stop(!0,!0).animate(o,200)} 126else{r.css(o);a.pos=t.extend({},a.dim,o)}}},update:function(t){var i=(t&&t.type),n=!i||i==='orientationchange';if(n){clearTimeout(h);h=null};if(!e.isOpen||h){return};h=setTimeout(function(){var o=e.current;if(!o||e.isClosing){return};e.wrap.removeClass('fancybox-tmp');if(n||i==='load'||(i==='resize'&&o.autoResize)){e._setDimension()};if(!(i==='scroll'&&o.canShrink)){e.reposition(t)};e.trigger('onUpdate');h=null},(n&&!s?0:300))},toggle:function(i){if(e.isOpen){e.current.fitToView=t.type(i)==='boolean'?i:!e.current.fitToView;if(s){e.wrap.removeAttr('style').addClass('fancybox-tmp');e.trigger('onUpdate')};e.update()}},hideLoading:function(){r.unbind('.loading');t('#fancybox-loading').remove()},showLoading:function(){var n,i;e.hideLoading();n=t('<div id="fancybox-loading"><div></div></div>').click(e.cancel).appendTo('body');r.bind('keydown.loading',function(t){if((t.which||t.keyCode)===27){t.preventDefault();e.cancel()}});if(!e.defaults.fixed){i=e.getViewport();n.css({position:'absolute',top:(i.h*0.5)+i.y,left:(i.w*0.5)+i.x})}},getViewport:function(){var n=(e.current&&e.current.locked)||!1,t={x:a.scrollLeft(),y:a.scrollTop()};if(n){t.w=n[0].clientWidth;t.h=n[0].clientHeight} 127else{t.w=s&&i.innerWidth?i.innerWidth:a.width();t.h=s&&i.innerHeight?i.innerHeight:a.height()};return t},unbindEvents:function(){if(e.wrap&&p(e.wrap)){e.wrap.unbind('.fb')};r.unbind('.fb');a.unbind('.fb')},bindEvents:function(){var i=e.current,n;if(!i){return};a.bind('orientationchange.fb'+(s?'':' resize.fb')+(i.autoCenter&&!i.locked?' scroll.fb':''),e.update);n=i.keys;if(n){r.bind('keydown.fb',function(o){var a=o.which||o.keyCode,r=o.target||o.srcElement;if(a===27&&e.coming){return!1};
127if(!o.ctrlKey&&!o.altKey&&!o.shiftKey&&!o.metaKey&&!(r&&(r.type||t(r).is('[contenteditable]')))){t.each(n,function(n,r){if(i.group.length>1&&r[a]!==c){e[n](r[a]);o.preventDefault();return!1};if(t.inArray(a,r)>-1){e[n]();o.preventDefault();return!1}})}})};if(t.fn.mousewheel&&i.mouseWheel){e.wrap.bind('mousewheel.fb',function(n,o,s,r){var f=n.target||null,a=t(f),l=!1;while(a.length){if(l||a.is('.fancybox-skin')||a.is('.fancybox-wrap')){break};l=m(a[0]);a=t(a).parent()};if(o!==0&&!l){if(e.group.length>1&&!i.canShrink){if(r>0||s>0){e.prev(r>0?'down':'left')} 128else if(r<0||s<0){e.next(r<0?'up':'right')};n.preventDefault()}}})}},trigger:function(i,n){var a,o=n||e.coming||e.current;if(!o){return};if(t.isFunction(o[i])){a=o[i].apply(o,Array.prototype.slice.call(arguments,1))};if(a===!1){return!1};if(o.helpers){t.each(o.helpers,function(n,a){if(a&&e.helpers[n]&&t.isFunction(e.helpers[n][i])){e.helpers[n][i](t.extend(!0,{},e.helpers[n].defaults,a),o)}})};r.trigger(i)},isImage:function(e){return f(e)&&e.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(e){return f(e)&&e.match(/\.(swf)((\?|#).*)?$/i)},_start:function(i){var o={},c,d,a,r,f;i=n(i);c=e.group[i]||null;if(!c){return!1};o=t.extend(!0,{}
128,e.opts,c);r=o.margin;f=o.padding;if(t.type(r)==='number'){o.margin=[r,r,r,r]};if(t.type(f)==='number'){o.padding=[f,f,f,f]};if(o.modal){t.extend(!0,o,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}})};if(o.autoSize){o.autoWidth=o.autoHeight=!0};if(o.width==='auto'){o.autoWidth=!0};if(o.height==='auto'){o.autoHeight=!0};o.group=e.group;o.index=i;e.coming=o;if(!1===e.trigger('beforeLoad')){e.coming=null;return};a=o.type;d=o.href;if(!a){e.coming=null;if(e.current&&e.router&&e.router!=='jumpto'){e.current.index=i;return e[e.router](e.direction)};return!1};e.isActive=!0;if(a==='image'||a==='swf'){o.autoHeight=o.autoWidth=!1;o.scrolling='visible'};if(a==='image'){o.aspectRatio=!0};if(a==='iframe'&&s){o.scrolling='scroll'};o.wrap=t(o.tpl.wrap).addClass('fancybox-'+(s?'mobile':'desktop')+' fancybox-type-'+a+' fancybox-tmp '+o.wrapCSS).appendTo(o.parent||'body');t.extend(o,{skin:t('.fancybox-skin',o.wrap),outer:t('.fancybox-outer',o.wrap),inner:t('.fancybox-inner',o.wrap)});t.each(['Top','Right','Bottom','Left'],function(e,t){o.skin.css('padding'+t,l(o.padding[e]))});e.trigger('onReady');if(a==='inline'||a==='html'){if(!o.content||!o.content.length){return e._error('content')}} 129else if(!d){return e._error('href')};if(a==='image'){e._loadImage()} 130else if(a==='ajax'){e._loadAjax()} 131else if(a==='iframe'){e._loadIframe()} 132else{e._afterLoad()}},_error:function(i){t.extend(e.coming,{type:'html',autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:'no',hasError:i,content:e.coming.tpl.error});e._afterLoad()},_loadImage:function(){var t=e.imgPreload=new Image();t.onload=function(){this.onload=this.onerror=null;e.coming.width=this.width/e.opts.pixelRatio;e.coming.height=this.height/e.opts.pixelRatio;e._afterLoad()};t.onerror=function(){this.onload=this.onerror=null;e._error('image')};t.src=e.coming.href;if(t.complete!==!0){e.showLoading()}},_loadAjax:function(){var i=e.coming;e.showLoading();e.ajaxLoad=t.ajax(t.extend({},i.ajax,{url:i.href,error:function(t,i){if(e.coming&&i!=='abort'){e._error('ajax',t)} 133else{e.hideLoading()}},success:function(t,n){if(n==='success'){i.content=t;e._afterLoad()}}}))},_loadIframe:function(){var i=e.coming,n=t(i.tpl.iframe.replace(/\{rnd\}/g,new Date().getTime())).attr('scrolling',s?'auto':i.iframe.scrolling).attr('src',i.href);t(i.wrap).bind('onReset',function(){try{t(this).find('iframe').hide().attr('src','//about:blank').end().empty()}catch(e){}});if(i.iframe.preload){e.showLoading();n.one('load',function(){t(this).data('ready',1);if(!s){t(this).bind('load.fb',e.update)};t(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show();e._afterLoad()})};i.content=n.appendTo(i.inner);if(!i.iframe.preload){e._afterLoad()}},_preloadImages:function(){var o=e.group,n=e.current,a=o.length,r=n.preload?Math.min(n.preload,a-1):0,t,i;for(i=1;i<=r;i+=1){t=o[(n.index+i)%a];if(t.type==='image'&&t.href){new Image().src=t.href}}},_afterLoad:function(){var o=e.coming,a=e.current,r='fancybox-placeholder',n,i,c,s,l,f;e.hideLoading();if(!o||e.isActive===!1){return};if(!1===e.trigger('afterLoad',o,a)){o.wrap.stop(!0).trigger('onReset').remove();e.coming=null;return};if(a){e.trigger('beforeChange',a);a.wrap.stop(!0).removeClass('fancybox-opened').find('.fancybox-item, .fancybox-nav').remove()};e.unbindEvents();n=o;i=o.content;c=o.type;s=o.scrolling;t.extend(e,{wrap:n.wrap,skin:n.skin,outer:n.outer,inner:n.inner,current:n,previous:a});l=n.href;switch(c){case'inline':case'ajax':case'html':if(n.selector){i=t('<div>').html(i).find(n.selector)} 134else if(p(i)){if(!i.data(r)){i.data(r,t('<div class="'+r+'"></div>').insertAfter(i).hide())};i=i.show().detach();n.wrap.bind('onReset',function(){if(t(this).find(i).length){i.hide().replaceAll(i.data(r)).data(r,!1)}})};break;case'image':i=n.tpl.image.replace('{href}',l);break;case'swf':i='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+l+'"></param>';f='';t.each(n.swf,function(e,t){i+='<param name="'+e+'" value="'+t+'"></param>';f+=' '+e+'="'+t+'"'});i+='<embed src="'+l+'" type="application/x-shockwave-flash" width="100%" height="100%"'+f+'></embed></object>';break};if(!(p(i)&&i.parent().is(n.inner))){n.inner.append(i)};e.trigger('beforeShow');
134n.inner.css('overflow',s==='yes'?'scroll':(s==='no'?'hidden':s));e._setDimension();e.reposition();e.isOpen=!1;e.coming=null;e.bindEvents();if(!e.isOpened){t('.fancybox-wrap').not(n.wrap).stop(!0).trigger('onReset').remove()} 135else if(a.prevMethod){e.transitions[a.prevMethod]()};e.transitions[e.isOpened?n.nextMethod:n.openMethod]();e._preloadImages()},_setDimension:function(){var b=e.getViewport(),D=0,M=!1,E=!1,h=e.wrap,x=e.skin,r=e.inner,a=e.current,i=a.width,o=a.height,s=a.minWidth,f=a.minHeight,c=a.maxWidth,p=a.maxHeight,z=a.scrolling,S=a.scrollOutside?a.scrollbarWidth:0,T=a.margin,A=n(T[1]+T[3]),I=n(T[0]+T[2]),v,R,k,C,g,u,P,j,m,w,y,O,L,W,H;h.add(x).add(r).width('auto').height('auto').removeClass('fancybox-tmp');v=n(x.outerWidth(!0)-x.width());R=n(x.outerHeight(!0)-x.height());k=A+v;C=I+R;g=d(i)?(b.w-k)*n(i)/100:i;u=d(o)?(b.h-C)*n(o)/100:o;if(a.type==='iframe'){W=a.content;if(a.autoHeight&&W.data('ready')===1){try{if(W[0].contentWindow.document.location){r.width(g).height(9999);H=W.contents().find('body');if(S){H.css('overflow-x','hidden')};u=H.outerHeight(!0)}}catch(V){}}} 136else if(a.autoWidth||a.autoHeight){r.addClass('fancybox-tmp');if(!a.autoWidth){r.width(g)};if(!a.autoHeight){r.height(u)};if(a.autoWidth){g=r.width()};if(a.autoHeight){u=r.height()};r.removeClass('fancybox-tmp')};i=n(g);o=n(u);m=g/u;s=n(d(s)?n(s,'w')-k:s);c=n(d(c)?n(c,'w')-k:c);f=n(d(f)?n(f,'h')-C:f);p=n(d(p)?n(p,'h')-C:p);P=c;j=p;if(a.fitToView){c=Math.min(b.w-k,c);p=Math.min(b.h-C,p)};O=b.w-A;L=b.h-I;if(a.aspectRatio){if(i>c){i=c;o=n(i/m)};if(o>p){o=p;i=n(o*m)};if(i<s){i=s;o=n(i/m)};if(o<f){o=f;i=n(o*m)}} 137else{i=Math.max(s,Math.min(i,c));if(a.autoHeight&&a.type!=='iframe'){r.width(i);o=r.height()};o=Math.max(f,Math.min(o,p))};if(a.fitToView){r.width(i).height(o);h.width(i+v);w=h.width();y=h.height();if(a.aspectRatio){while((w>O||y>L)&&i>s&&o>f){if(D++>19){break};o=Math.max(f,Math.min(p,o-10));i=n(o*m);if(i<s){i=s;o=n(i/m)};if(i>c){i=c;o=n(i/m)};r.width(i).height(o);h.width(i+v);w=h.width();y=h.height()}} 138else{i=Math.max(s,Math.min(i,i-(w-O)));o=Math.max(f,Math.min(o,o-(y-L)))}};if(S&&z==='auto'&&o<u&&(i+v+S)<O){i+=S};r.width(i).height(o);h.width(i+v);w=h.width();y=h.height();M=(w>O||y>L)&&i>s&&o>f;E=a.aspectRatio?(i<P&&o<j&&i<g&&o<u):((i<P||o<j)&&(i<g||o<u));t.extend(a,{dim:{width:l(w),height:l(y)},origWidth:g,origHeight:u,canShrink:M,canExpand:E,wPadding:v,hPadding:R,wrapSpace:y-x.outerHeight(!0),skinSpace:x.height()-o});if(!W&&a.autoHeight&&o>f&&o<p&&!E){r.height('auto')}},_getPosition:function(t){var n=e.current,o=e.getViewport(),a=n.margin,r=e.wrap.width()+a[1]+a[3],s=e.wrap.height()+a[0]+a[2],i={position:'absolute',top:a[0],left:a[3]};if(n.autoCenter&&n.fixed&&!t&&s<=o.h&&r<=o.w){i.position='fixed'} 139else if(!n.locked){i.top+=o.y;i.left+=o.x};i.top=l(Math.max(i.top,i.top+((o.h-s)*n.topRatio)));i.left=l(Math.max(i.left,i.left+((o.w-r)*n.leftRatio)));return i},_afterZoomIn:function(){var i=e.current;if(!i){return};e.isOpen=e.isOpened=!0;e.wrap.css('overflow','visible').addClass('fancybox-opened');e.update();if(i.closeClick||(i.nextClick&&e.group.length>1)){e.inner.css('cursor','pointer').bind('click.fb',function(n){if(!t(n.target).is('a')&&!t(n.target).parent().is('a')){n.preventDefault();e[i.closeClick?'close':'next']()}})};if(i.closeBtn){t(i.tpl.closeBtn).appendTo(e.skin).bind('click.fb',function(t){t.preventDefault();e.close()})};if(i.arrows&&e.group.length>1){if(i.loop||i.index>0){t(i.tpl.prev).appendTo(e.outer).bind('click.fb',e.prev)};if(i.loop||i.index<e.group.length-1){t(i.tpl.next).appendTo(e.outer).bind('click.fb',e.next)}};e.trigger('afterShow');if(!i.loop&&i.index===i.group.length-1){e.play(!1)} 140else if(e.opts.autoPlay&&!e.player.isActive){e.opts.autoPlay=!1;e.play()}},_afterZoomOut:function(i){i=i||e.current;t('.fancybox-wrap').trigger('onReset').remove();t.extend(e,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});e.trigger('afterClose',i)}});e.transitions={getOrigPosition:function(){var t=e.current,a=t.element,i=t.orig,n={},r=50,s=50,f=t.hPadding,c=t.wPadding,o=e.getViewport();if(!i&&t.isDom&&a.is(':visible')){i=a.find('img:first');if(!i.length){i=a}};if(p(i)){n=i.offset();if(i.is('img')){r=i.outerWidth();s=i.outerHeight()}} 141else{n.top=o.y+(o.h-s)*t.topRatio;n.left=o.x+(o.w-r)*t.leftRatio};if(e.wrap.css('position')==='fixed'||t.locked){n.top-=o.y;n.left-=o.x};
141n={top:l(n.top-f*t.topRatio),left:l(n.left-c*t.leftRatio),width:l(r+c),height:l(s+f)};return n},step:function(t,i){var a,l,r,o=i.prop,s=e.current,f=s.wrapSpace,c=s.skinSpace;if(o==='width'||o==='height'){a=i.end===i.start?1:(t-i.start)/(i.end-i.start);if(e.isClosing){a=1-a};l=o==='width'?s.wPadding:s.hPadding;r=t-l;e.skin[o](n(o==='width'?r:r-(f*a)));e.inner[o](n(o==='width'?r:r-(f*a)-(c*a)))}},zoomIn:function(){var i=e.current,n=i.pos,o=i.openEffect,a=o==='elastic',r=t.extend({opacity:1},n);delete r.position;if(a){n=this.getOrigPosition();if(i.openOpacity){n.opacity=0.1}} 142else if(o==='fade'){n.opacity=0.1};e.wrap.css(n).animate(r,{duration:o==='none'?0:i.openSpeed,easing:i.openEasing,step:a?this.step:null,complete:e._afterZoomIn})},zoomOut:function(){var t=e.current,n=t.closeEffect,o=n==='elastic',i={opacity:0.1};if(o){i=this.getOrigPosition();if(t.closeOpacity){i.opacity=0.1}};e.wrap.animate(i,{duration:n==='none'?0:t.closeSpeed,easing:t.closeEasing,step:o?this.step:null,complete:e._afterZoomOut})},changeIn:function(){var o=e.current,f=o.nextEffect,i=o.pos,s={opacity:1},a=e.direction,r=200,t;i.opacity=0.1;if(f==='elastic'){t=a==='down'||a==='up'?'top':'left';if(a==='down'||a==='right'){i[t]=l(n(i[t])-r);s[t]='+='+r+'px'} 143else{i[t]=l(n(i[t])+r);s[t]='-='+r+'px'}};if(f==='none'){e._afterZoomIn()} 144else{e.wrap.css(i).animate(s,{duration:o.nextSpeed,easing:o.nextEasing,complete:e._afterZoomIn})}},changeOut:function(){var i=e.previous,o=i.prevEffect,a={opacity:0.1},n=e.direction,r=200;if(o==='elastic'){a[n==='down'||n==='up'?'top':'left']=(n==='up'||n==='left'?'-':'+')+'='+r+'px'};i.wrap.animate(a,{duration:o==='none'?0:i.prevSpeed,easing:i.prevEasing,complete:function(){t(this).trigger('onReset').remove()}})}};e.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!s,fixed:!0},overlay:null,fixed:!1,el:t('html'),create:function(i){i=t.extend({},this.defaults,i);if(this.overlay){this.close()};this.overlay=t('<div class="fancybox-overlay"></div>').appendTo(e.coming?e.coming.parent:i.parent);this.fixed=!1;if(i.fixed&&e.defaults.fixed){this.overlay.addClass('fancybox-overlay-fixed');this.fixed=!0}},open:function(i){var n=this;i=t.extend({},this.defaults,i);if(this.overlay){this.overlay.unbind('.overlay').width('auto').height('auto')} 145else{this.create(i)};if(!this.fixed){a.bind('resize.overlay',t.proxy(this.update,this));this.update()};if(i.closeClick){this.overlay.bind('click.overlay',function(i){if(t(i.target).hasClass('fancybox-overlay')){if(e.isActive){e.close()} 146else{n.close()};return!1}})};this.overlay.css(i.css).show()},close:function(){var e,i;a.unbind('resize.overlay');if(this.el.hasClass('fancybox-lock')){t('.fancybox-margin').removeClass('fancybox-margin');e=a.scrollTop();i=a.scrollLeft();this.el.removeClass('fancybox-lock');a.scrollTop(e).scrollLeft(i)};t('.fancybox-overlay').remove().hide();t.extend(this,{overlay:null,fixed:!1})},update:function(){var e='100%',t;this.overlay.width(e).height('100%');if(u){t=Math.max(o.documentElement.offsetWidth,o.body.offsetWidth);if(r.width()>t){e=r.width()}} 147else if(r.width()>a.width()){e=r.width()};this.overlay.width(e).height(r.height())},onReady:function(e,i){var n=this.overlay;t('.fancybox-overlay').stop(!0,!0);if(!n){this.create(e)};if(e.locked&&this.fixed&&i.fixed){if(!n){this.margin=r.height()>a.height()?t('html').css('margin-right').replace('px',''):!1};i.locked=this.overlay.append(i.wrap);i.fixed=!1};if(e.showEarly===!0){this.beforeShow.apply(this,arguments)}},beforeShow:function(e,i){var n,o;if(i.locked){if(this.margin!==!1){t('*').filter(function(){return(t(this).css('position')==='fixed'&&!t(this).hasClass('fancybox-overlay')&&!t(this).hasClass('fancybox-wrap'))}).addClass('fancybox-margin');this.el.addClass('fancybox-margin')};n=a.scrollTop();o=a.scrollLeft();this.el.addClass('fancybox-lock');a.scrollTop(n).scrollLeft(o)};this.open(e)},onUpdate:function(){if(!this.fixed){this.update()}},afterClose:function(i){if(this.overlay&&!e.coming){this.overlay.fadeOut(i.speedOut,t.proxy(this.close,this))}}};e.helpers.title={defaults:{type:'float',position:'bottom'},beforeShow:function(i){var s=e.current,a=s.title,l=i.type,o,r;if(t.isFunction(a)){a=a.call(s.element,s)};if(!f(a)||t.trim(a)===''){return};o=t('<div class="fancybox-title fancybox-title-'+l+'-wrap">'+a+'</div>');switch(l){case'inside':r=e.skin;break;case'outside':r=e.wrap;break;case'over':r=e.inner;break;default:r=e.skin;o.appendTo('body');if(u){o.width(o.width())};o.wrapInner('<span class="child"></span>');e.current.margin[2]+=Math.abs(n(o.css('margin-bottom')));break};o[(i.position==='top'?'prependTo':'appendTo')](r)}};t.fn.fancybox=function(i){var o,a=t(this),n=this.selector||'',s=function(r){var s=t(this).blur(),c=o,f,l;if(!(r.ctrlKey||r.altKey||r.shiftKey||r.metaKey)&&!s.is('.fancybox-wrap')){f=i.groupAttr||'data-fancybox-group';l=s.attr(f);if(!l){f='rel';l=s.get(0)[f]};if(l&&l!==''&&l!=='nofollow'){s=n.length?t(n):a;s=s.filter('['+f+'="'+l+'"]');c=s.index(this)};i.index=c;if(e.open(s,i)!==!1){r.preventDefault()}}};i=i||{};o=i.index||0;if(!n||i.live===!1){a.unbind('click.fb-start').bind('click.fb-start',s)} 148else{r.undelegate(n,'click.fb-start').delegate(n+':not(\'.fancybox-item, .fancybox-nav\')','click.fb-start',s)};this.filter('[data-fancybox-start=1]').trigger('click');return this};r.ready(function(){var n,o;if(t.scrollbarWidth===c){t.scrollbarWidth=function(){var e=t('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'),i=e.children(),n=i.innerWidth()-i.height(99).innerWidth();e.remove();return n}};
148if(t.support.fixedPosition===c){t.support.fixedPosition=(function(){var e=t('<div style="position:fixed;top:20px;"></div>').appendTo('body'),i=(e[0].offsetTop===20||e[0].offsetTop===15);e.remove();return i}())};t.extend(e.defaults,{scrollbarWidth:t.scrollbarWidth(),fixed:t.support.fixedPosition,parent:t('body')});n=t(i).width();g.addClass('fancybox-lock-test');o=t(i).width();g.removeClass('fancybox-lock-test');t('<style type=\'text/css\'>.fancybox-margin{margin-right:'+(o-n)+'px;}</style>').appendTo('head')})}(window,document,jQuery)); 149/*! 150 * Buttons helper for fancyBox 151 * version: 1.0.5 (Mon, 15 Oct 2012) 152 * @requires fancyBox v2.0 or later 153 * 154 * Usage: 155 * $(".fancybox").fancybox({ 156 * helpers : { 157 * buttons: { 158 * position : 'top' 159 * } 160 * } 161 * }); 162 * 163 */ 164(function(s){var t=s.fancybox;t.helpers.buttons={defaults:{skipSingle:!1,position:'top',tpl:'<div id="fancybox-buttons"><ul><li><a class="btnPrev" title="Previous" href="javascript:;"></a></li><li><a class="btnPlay" title="Start slideshow" href="javascript:;"></a></li><li><a class="btnNext" title="Next" href="javascript:;"></a></li><li><a class="btnToggle" title="Toggle size" href="javascript:;"></a></li><li><a class="btnClose" title="Close" href="javascript:;"></a></li></ul></div>'},list:null,buttons:null,beforeLoad:function(s,t){if(s.skipSingle&&t.group.length<2){t.helpers.buttons=!1;t.closeBtn=!0;return};t.margin[s.position==='bottom'?2:0]+=30},onPlayStart:function(){if(this.buttons){this.buttons.play.attr('title','Pause slideshow').addClass('btnPlayOn')}},onPlayEnd:function(){if(this.buttons){this.buttons.play.attr('title','Start slideshow').removeClass('btnPlayOn')}},afterShow:function(e,i){var l=this.buttons;if(!l){this.list=s(e.tpl).addClass(e.position).appendTo('body');l={prev:this.list.find('.btnPrev').click(t.prev),next:this.list.find('.btnNext').click(t.next),play:this.list.find('.btnPlay').click(t.play),toggle:this.list.find('.btnToggle').click(t.toggle),close:this.list.find('.btnClose').click(t.close)}};if(i.index>0||i.loop){l.prev.removeClass('btnDisabled')} 165else{l.prev.addClass('btnDisabled')};if(i.loop||i.index<i.group.length-1){l.next.removeClass('btnDisabled');l.play.removeClass('btnDisabled')} 166else{l.next.addClass('btnDisabled');l.play.addClass('btnDisabled')};this.buttons=l;this.onUpdate(e,i)},onUpdate:function(s,t){var l;if(!this.buttons){return};l=this.buttons.toggle.removeClass('btnDisabled btnToggleOn');if(t.canShrink){l.addClass('btnToggleOn')} 167else if(!t.canExpand){l.addClass('btnDisabled')}},beforeClose:function(){if(this.list){this.list.remove()};this.list=null;this.buttons=null}}}(jQuery)); 168/*! 169 * Thumbnail helper for fancyBox 170 * version: 1.0.7 (Mon, 01 Oct 2012) 171 * @requires fancyBox v2.0 or later 172 * 173 * Usage: 174 * $(".fancybox").fancybox({ 175 * helpers : { 176 * thumbs: { 177 * width : 50, 178 * height : 50 179 * } 180 * } 181 * }); 182 * 183 */ 184(function(t){var i=t.fancybox;i.helpers.thumbs={defaults:{width:50,height:50,position:'bottom',source:function(i){var h;if(i.element){h=t(i.element).find('img').attr('src')};if(!h&&i.type==='image'&&i.href){h=i.href};return h}},wrap:null,list:null,width:0,init:function(i,h){var r=this,n,e=i.width,s=i.height,l=i.source;n='';for(var o=0;o<h.group.length;o++){n+='<li><a style="width:'+e+'px;height:'+s+'px;" href="javascript:jQuery.fancybox.jumpto('+o+');"></a></li>'};this.wrap=t('<div id="fancybox-thumbs"></div>').addClass(i.position).appendTo('body');this.list=t('<ul>'+n+'</ul>').appendTo(this.wrap);t.each(h.group,function(i){var o=l(h.group[i]);if(!o){return};t('<img />').load(function(){var h=this.width,o=this.height,n,l,a;if(!r.list||!h||!o){return};n=h/e;l=o/s;a=r.list.children().eq(i).find('a');if(n>=1&&l>=1){if(n>l){h=Math.floor(h/l);o=s} 185else{h=e;o=Math.floor(o/n)}};t(this).css({width:h,height:o,top:Math.floor(s/2-o/2),left:Math.floor(e/2-h/2)});a.width(e).height(s);t(this).hide().appendTo(a).fadeIn(300)}).attr('src',o)});this.width=this.list.children().eq(0).outerWidth(!0);this.list.width(this.width*(h.group.length+1)).css('left',Math.floor(t(window).width()*0.5-(h.index*this.width+this.width*0.5)))},beforeLoad:function(t,i){if(i.group.length<2){i.helpers.thumbs=!1;return};i.margin[t.position==='top'?0:2]+=((t.height)+15)},afterShow:function(t,i){if(this.list){this.onUpdate(t,i)} 186else{this.init(t,i)};this.list.children().removeClass('active').eq(i.index).addClass('active')}
186,onUpdate:function(i,h){if(this.list){this.list.stop(!0).animate({'left':Math.floor(t(window).width()*0.5-(h.index*this.width+this.width*0.5))},150)}},beforeClose:function(){if(this.wrap){this.wrap.remove()};this.wrap=null;this.list=null;this.width=0}}}(jQuery)); 187/*! 188 * Media helper for fancyBox 189 * version: 1.0.6 (Fri, 14 Jun 2013) 190 * @requires fancyBox v2.0 or later 191 * 192 * Usage: 193 * $(".fancybox").fancybox({ 194 * helpers : { 195 * media: true 196 * } 197 * }); 198 * 199 * Set custom URL parameters: 200 * $(".fancybox").fancybox({ 201 * helpers : { 202 * media: { 203 * youtube : { 204 * params : { 205 * autoplay : 0 206 * } 207 * } 208 * } 209 * } 210 * }); 211 * 212 * Or: 213 * $(".fancybox").fancybox({, 214 * helpers : { 215 * media: true 216 * }, 217 * youtube : { 218 * autoplay: 0 219 * } 220 * }); 221 * 222 * Supports: 223 * 224 * Youtube 225 * http://www.youtube.com/watch?v=opj24KnzrWo 226 * http://www.youtube.com/embed/opj24KnzrWo 227 * http://youtu.be/opj24KnzrWo 228 * http://www.youtube-nocookie.com/embed/opj24KnzrWo 229 * Vimeo 230 * http://vimeo.com/40648169 231 * http://vimeo.com/channels/staffpicks/38843628 232 * http://vimeo.com/groups/surrealism/videos/36516384 233 * http://player.vimeo.com/video/45074303 234 * Metacafe 235 * http://www.metacafe.com/watch/7635964/dr_seuss_the_lorax_movie_trailer/ 236 * http://www.metacafe.com/watch/7635964/ 237 * Dailymotion 238 * http://www.dailymotion.com/video/xoytqh_dr-seuss-the-lorax-premiere_people 239 * Twitvid 240 * http://twitvid.com/QY7MD 241 * Twitpic 242 * http://twitpic.com/7p93st 243 * Instagram 244 * http://instagr.am/p/IejkuUGxQn/ 245 * http://instagram.com/p/IejkuUGxQn/ 246 * Google maps 247 * http://maps.google.com/maps?q=Eiffel+Tower,+Avenue+Gustave+Eiffel,+Paris,+France&t=h&z=17 248 * http://maps.google.com/?ll=48.857995,2.294297&spn=0.007666,0.021136&t=m&z=16 249 * http://maps.google.com/?ll=48.859463,2.292626&spn=0.000965,0.002642&t=m&z=19&layer=c&cbll=48.859524,2.292532&panoid=YJ0lq28OOy3VT2IqIuVY0g&cbp=12,151.58,,0,-15.56 250 */ 251(function(e){'use strict';var a=e.fancybox,t=function(a,i,t){t=t||'';if(e.type(t)==='object'){t=e.param(t,!0)};e.each(i,function(e,t){a=a.replace('$'+e,t||'')});if(t.length){a+=(a.indexOf('?')>0?'&':'?')+t};return a};a.helpers.media={defaults:{youtube:{matcher:/(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:'opaque',enablejsapi:1},type:'iframe',url:'//www.youtube.com/embed/$3'},vimeo:{matcher:/(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},type:'iframe',url:'//player.vimeo.com/video/$1'},metacafe:{matcher:/metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/,params:{autoPlay:'yes'},type:'swf',url:function(a,t,i){i.swf.flashVars='playerVars='+e.param(t,!0);return'//www.metacafe.com/fplayer/'+a[1]+'/.swf'}},dailymotion:{matcher:/dailymotion.com\/video\/(.*)\/?(.*)/,params:{additionalInfos:0,autoStart:1},type:'swf',url:'//www.dailymotion.com/swf/video/$1'},twitvid:{matcher:/twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i,params:{autoplay:0},type:'iframe',url:'//www.twitvid.com/embed.php?guid=$1'},twitpic:{matcher:/twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i,type:'image',url:'//twitpic.com/show/full/$1/'},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:'image',url:'//$1/p/$2/media/?size=l'},google_maps:{matcher:/maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i,type:'iframe',url:function(e){return'//maps.google.'+e[1]+'/'+e[3]+''+e[4]+'&output='+(e[4].indexOf('layer=c')>0?'svembed':'embed')}}},beforeLoad:function(a,i){var l=i.href||'',c=!1,r,o,m,p;for(r in a){if(a.hasOwnProperty(r)){o=a[r];m=l.match(o.matcher);if(m){c=o.type;p=e.extend(!0,{},o.params,i[r]||(e.isPlainObject(a[r])?a[r].params:null));l=e.type(o.url)==='function'?o.url.call(this,m,p,i):t(o.url,m,p);break}}};if(c){i.href=l;i.type=c;i.autoHeight=!1}}}}(jQuery)); 252/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 253 * Licensed under the MIT License (LICENSE.txt). 254 * 255 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 256 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 257 * Thanks to: Seamus Leahy for adding deltaX and deltaY 258 * 259 * Version: 3.0.6 260 * 261 * Requires: 1.2.2+ 262 */ 263(function(e){function n(n){var t=n||window.event,o=[].slice.call(arguments,1
263),i=0,s=0,l=0,n=e.event.fix(t);n.type='mousewheel';t.wheelDelta&&(i=t.wheelDelta/120);t.detail&&(i=-t.detail/3);l=i;t.axis!==void 0&&t.axis===t.HORIZONTAL_AXIS&&(l=0,s=-1*i);t.wheelDeltaY!==void 0&&(l=t.wheelDeltaY/120);t.wheelDeltaX!==void 0&&(s=-1*t.wheelDeltaX/120);o.unshift(n,i,s,l);return(e.event.dispatch||e.event.handle).apply(this,o)};var t=['DOMMouseScroll','mousewheel'];if(e.event.fixHooks)for(var i=t.length;i;)e.event.fixHooks[t[--i]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],n,!1);else this.onmousewheel=n},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],n,!1);else this.onmousewheel=null}};e.fn.extend({mousewheel:function(e){return e?this.bind('mousewheel',e):this.trigger('mousewheel')},unmousewheel:function(e){return this.unbind('mousewheel',e)}})})(jQuery);
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.