
!function(e){function o(o){"use strict";var i=e(o),r=["powermail_input","powermail_textarea","powermail_select","powermail_radio","powermail_checkbox"];this.ajaxListener=function(){t(),e(_()).on("change",function(){t()})};var n=function(o){if(void 0!==o.todo){for(var i in o.todo){var r=e(".powermail_form_"+i);for(var n in o.todo[i]){r.find(".powermail_fieldset_"+n);"hide"===o.todo[i][n]["#action"]&&f(m(n,r)),"un_hide"===o.todo[i][n]["#action"]&&p(m(n,r));for(var t in o.todo[i][n])"hide"===o.todo[i][n][t]["#action"]&&c(t,r),"un_hide"===o.todo[i][n][t]["#action"]&&u(t,r)}}h()}},t=function(){var o=e(i.get(0)),r=o.find(":disabled").prop("disabled",!1),t=new FormData(i.get(0));r.prop("disabled",!0),e.ajax({type:"POST",url:l(),data:t,contentType:!1,processData:!1,success:function(e){100===e.loops&&q("100 loops reached by parsing conditions and rules. Maybe there are conflicting conditions."),n(e)}})},a=function(e){(e.prop("required")||e.data("parsley-required"))&&(e.prop("required",!1),e.removeAttr("data-parsley-required"),e.data("powermailcond-required","required"))},d=function(e){"required"===e.data("powermailcond-required")&&(y()?e.prop("required","required"):v()&&e.prop("required","required")),e.removeData("powermailcond-required")},u=function(e,o){var i=o.find(".powermail_fieldwrap_"+e);i.show();var r=s(e,o);r.prop("disabled",!1),d(r)},c=function(e,o){var i=o.find(".powermail_fieldwrap_"+e);i.hide();var r=s(e,o);r.prop("disabled",!0),a(r)},p=function(e){e.show()},f=function(e){e.hide()},l=function(){var o=e("*[data-condition-uri]").data("condition-uri");return void 0===o&&q("Tag with data-condition-uri not found. Maybe TypoScript was not included."),o},s=function(e,o){return o.find('[name^="tx_powermail_pi1[field]['+e+']"]').not('[type="hidden"]')},m=function(e,o){return o.find(".powermail_fieldset_"+e)},w=function(e,o,i){o="undefined"!=typeof o?o:"",i="undefined"!=typeof i?i:",";for(var r="",n=0;n<e.length;n++)n>0&&(r+=i),r+=o+e[n];return r},_=function(){return w(r,".")},v=function(){return"data-parsley-validate"===i.data("parsley-validate")},y=function(){return"html5"===i.data("validate")},h=function(){v()&&(i.parsley().destroy(),i.parsley())},q=function(e){"object"==typeof console&&("string"==typeof e&&(e="powermail_cond: "+e),console.log(e))}}e(document).ready(function(){e("form.powermail_form").each(function(){new o(this).ajaxListener()})})}(jQuery);
/*!
 * shariff - v3.2.1 - Mon, 27 May 2019 08:23:32 GMT
 * https://github.com/heiseonline/shariff
 * Copyright (c) 2019 Ines Pauer, Philipp Busse, Sebastian Hilbig, Erich Kramer, Deniz Sesli
 * Licensed under the MIT license
 */
!function(e){function t(a){if(r[a])return r[a].exports;var n=r[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,a){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}([function(e,t,r){"use strict";function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(e,t,r){if(e&&p.isObject(e)&&e instanceof a)return e;var n=new a;return n.parse(e,t,r),n}function i(e){return p.isString(e)&&(e=n(e)),e instanceof a?e.format():a.prototype.format.call(e)}function o(e,t){return n(e,!1,!0).resolve(t)}function s(e,t){return e?n(e,!1,!0).resolveObject(t):t}var l=r(10),p=r(12);t.parse=n,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=a;var u=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(c),m=["'"].concat(f),b=["%","/","?",";","#"].concat(m),g=["/","?","#"],v=/^[+a-z0-9A-Z_-]{0,63}$/,k=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,j={javascript:!0,"javascript:":!0},z={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=r(13);a.prototype.parse=function(e,t,r){if(!p.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),n=-1!==a&&a<e.indexOf("#")?"?":"#",i=e.split(n),o=/\\/g;i[0]=i[0].replace(o,"/"),e=i.join(n);var s=e;if(s=s.trim(),!r&&1===e.split("#").length){var h=d.exec(s);if(h)return this.path=s,this.href=s,this.pathname=h[1],h[2]?(this.search=h[2],this.query=t?P.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=u.exec(s);if(c){c=c[0];var f=c.toLowerCase();this.protocol=f,s=s.substr(c.length)}if(r||c||s.match(/^\/\/[^@\/]+@[^@\/]+/)){var T="//"===s.substr(0,2);!T||c&&z[c]||(s=s.substr(2),this.slashes=!0)}if(!z[c]&&(T||c&&!y[c])){for(var w=-1,x=0;x<g.length;x++){var U=s.indexOf(g[x]);-1!==U&&(-1===w||U<w)&&(w=U)}var C,R;R=-1===w?s.lastIndexOf("@"):s.lastIndexOf("@",w),-1!==R&&(C=s.slice(0,R),s=s.slice(R+1),this.auth=decodeURIComponent(C)),w=-1;for(var x=0;x<b.length;x++){var U=s.indexOf(b[x]);-1!==U&&(-1===w||U<w)&&(w=U)}-1===w&&(w=s.length),this.host=s.slice(0,w),s=s.slice(w),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var D=this.hostname.split(/\./),x=0,S=D.length;x<S;x++){var L=D[x];if(L&&!L.match(v)){for(var N="",O=0,F=L.length;O<F;O++)L.charCodeAt(O)>127?N+="x":N+=L[O];if(!N.match(v)){var A=D.slice(0,x),q=D.slice(x+1),M=L.match(k);M&&(A.push(M[1]),q.unshift(M[2])),q.length&&(s="/"+q.join(".")+s),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=l.toASCII(this.hostname));var J=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+J,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!j[f])for(var x=0,S=m.length;x<S;x++){var W=m[x];if(-1!==s.indexOf(W)){var G=encodeURIComponent(W);G===W&&(G=escape(W)),s=s.split(W).join(G)}}var Q=s.indexOf("#");-1!==Q&&(this.hash=s.substr(Q),s=s.slice(0,Q));var B=s.indexOf("?");if(-1!==B?(this.search=s.substr(B),this.query=s.substr(B+1),t&&(this.query=P.parse(this.query)),s=s.slice(0,B)):t&&(this.search="",this.query={}),s&&(this.pathname=s),y[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var J=this.pathname||"",X=this.search||"";this.path=J+X}return this.href=this.format(),this},a.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",a=this.hash||"",n=!1,i="";this.host?n=e+this.host:this.hostname&&(n=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&p.isObject(this.query)&&Object.keys(this.query).length&&(i=P.stringify(this.query));var o=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),a&&"#"!==a.charAt(0)&&(a="#"+a),o&&"?"!==o.charAt(0)&&(o="?"+o),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace("#","%23"),t+n+r+o+a},a.prototype.resolve=function(e){return this.resolveObject(n(e,!1,!0)).format()},a.prototype.resolveObject=function(e){if(p.isString(e)){var t=new a;t.parse(e,!1,!0),e=t}for(var r=new a,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),l=0;l<s.length;l++){var u=s[l];"protocol"!==u&&(r[u]=e[u])}return y[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!y[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var c=h[d];r[c]=e[c]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||z[e.protocol])r.pathname=e.pathname;else{for(var f=(e.pathname||"").split("/");f.length&&!(e.host=f.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==f[0]&&f.unshift(""),f.length<2&&f.unshift(""),r.pathname=f.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var m=r.pathname||"",b=r.search||"";r.path=m+b}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=v||g||r.host&&e.pathname,j=k,P=r.pathname&&r.pathname.split("/")||[],f=e.pathname&&e.pathname.split("/")||[],T=r.protocol&&!y[r.protocol];if(T&&(r.hostname="",r.port=null,r.host&&(""===P[0]?P[0]=r.host:P.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===f[0]?f[0]=e.host:f.unshift(e.host)),e.host=null),k=k&&(""===f[0]||""===P[0])),v)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,P=f;else if(f.length)P||(P=[]),P.pop(),P=P.concat(f),r.search=e.search,r.query=e.query;else if(!p.isNullOrUndefined(e.search)){if(T){r.hostname=r.host=P.shift();var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return r.search=e.search,r.query=e.query,p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!P.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=P.slice(-1)[0],U=(r.host||e.host||P.length>1)&&("."===x||".."===x)||""===x,C=0,R=P.length;R>=0;R--)x=P[R],"."===x?P.splice(R,1):".."===x?(P.splice(R,1),C++):C&&(P.splice(R,1),C--);if(!k&&!j)for(;C--;C)P.unshift("..");!k||""===P[0]||P[0]&&"/"===P[0].charAt(0)||P.unshift(""),U&&"/"!==P.join("/").substr(-1)&&P.push("");var I=""===P[0]||P[0]&&"/"===P[0].charAt(0);if(T){r.hostname=r.host=I?"":P.length?P.shift():"";var w=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");w&&(r.auth=w.shift(),r.host=r.hostname=w.shift())}return k=k||r.host&&P.length,k&&!I&&P.unshift(""),P.length?r.pathname=P.join("/"):(r.pathname=null,r.path=null),p.isNull(r.pathname)&&p.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";r(3),e.exports=r(4)},function(e,t){},function(e,t,r){"use strict";(function(t){function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}(),o=r(5),s=r(6),l=r(0),p={theme:"color",backendUrl:null,infoUrl:"http://ct.de/-2467514",infoDisplay:"blank",lang:"de",langFallback:"en",mailUrl:function(){var e=l.parse(this.getURL(),!0);return e.query.view="mail",delete e.search,l.format(e)},mailBody:function(){return this.getURL()},mediaUrl:null,orientation:"horizontal",buttonStyle:"standard",referrerTrack:null,services:["twitter","facebook","info"],title:t.document.title,twitterVia:null,flattrUser:null,flattrCategory:null,url:function(){var e=t.document.location.href,r=o("link[rel=canonical]").attr("href")||this.getMeta("og:url")||"";return r.length>0&&(r.indexOf("http")<0&&(r=0!==r.indexOf("//")?t.document.location.protocol+"//"+t.document.location.host+r:t.document.location.protocol+r),e=r),e}},u=function(){function e(t,r){var n=this;a(this,e),this.element=t,o(t).empty(),this.options=o.extend({},p,r,o(t).data()),this.services=Object.keys(s).filter(function(e){return n.isEnabledService(e)}).sort(function(e,t){var r=n.options.services;return r.indexOf(e)-r.indexOf(t)}).map(function(e){return s[e](n)}),this._addButtonList(),null!==this.options.backendUrl&&"icon"!==this.options.buttonStyle&&this.getShares(this._updateCounts.bind(this))}return i(e,[{key:"isEnabledService",value:function(e){return this.options.services.indexOf(e)>-1}},{key:"$socialshareElement",value:function(){return o(this.element)}},{key:"getLocalized",value:function(e,t){return"object"===n(e[t])?void 0===e[t][this.options.lang]?e[t][this.options.langFallback]:e[t][this.options.lang]:"string"==typeof e[t]?e[t]:void 0}},{key:"getMeta",value:function(e){return o('meta[name="'+e+'"],[property="'+e+'"]').attr("content")||""}},{key:"getInfoUrl",value:function(){return this.options.infoUrl}},{key:"getInfoDisplayPopup",value:function(){return"popup"===this.options.infoDisplay}},{key:"getInfoDisplayBlank",value:function(){return"popup"!==this.options.infoDisplay&&"self"!==this.options.infoDisplay}},{key:"getURL",value:function(){return this.getOption("url")}},{key:"getOption",value:function(e){var t=this.options[e];return"function"==typeof t?t.call(this):t}},{key:"getTitle",value:function(){var e=this.getOption("title");if(o(this.element).data().title)return e;e=e||this.getMeta("DC.title");var t=this.getMeta("DC.creator");return e&&t?e+" - "+t:e}},{key:"getReferrerTrack",value:function(){return this.options.referrerTrack||""}},{key:"getShares",value:function(e){var t=l.parse(this.options.backendUrl,!0);return t.query.url=this.getURL(),delete t.search,o.getJSON(l.format(t),e)}},{key:"_updateCounts",value:function(e,t,r){var a=this;e&&o.each(e,function(e,t){a.isEnabledService(e)&&(t>=1e3&&(t=Math.round(t/1e3)+"k"),o(a.element).find("."+e+" a").append(o("<span/>").addClass("share_count").text(t)))})}},{key:"_addButtonList",value:function(){var e=this,r=o("<ul/>").addClass(["theme-"+this.options.theme,"orientation-"+this.options.orientation,"button-style-"+this.options.buttonStyle,"shariff-col-"+this.options.services.length].join(" "));this.services.forEach(function(t){var a=o("<li/>").addClass("shariff-button "+t.name),n=o("<a/>").attr("href",t.shareUrl);if("standard"===e.options.buttonStyle){var i=o("<span/>").addClass("share_text").text(e.getLocalized(t,"shareText"));n.append(i)}void 0!==t.faPrefix&&void 0!==t.faName&&n.prepend(o("<span/>").addClass(t.faPrefix+" "+t.faName)),t.popup?(n.attr("data-rel","popup"),"info"!==t.name&&n.attr("rel","nofollow")):t.blank?(n.attr("target","_blank"),"info"===t.name?n.attr("rel","noopener noreferrer"):n.attr("rel","nofollow noopener noreferrer")):"info"!==t.name&&n.attr("rel","nofollow"),n.attr("title",e.getLocalized(t,"title")),n.attr("role","button"),n.attr("aria-label",e.getLocalized(t,"title")),a.append(n),r.append(a)}),r.on("click",'[data-rel="popup"]',function(e){e.preventDefault();var r=o(this).attr("href");if(r.match(/twitter\.com\/intent\/(\w+)/)){var a=t.window;if(a.__twttr&&a.__twttr.widgets&&a.__twttr.widgets.loaded)return}t.window.open(r,"_blank","width=600,height=460")}),this.$socialshareElement().append(r)}}]),e}();e.exports=u,t.Shariff=u,o(function(){o(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new u(this))})})}).call(t,r(1))},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";e.exports={addthis:r(7),buffer:r(8),diaspora:r(9),facebook:r(16),flattr:r(17),flipboard:r(18),info:r(19),linkedin:r(20),mail:r(21),pinterest:r(22),pocket:r(23),print:r(24),qzone:r(25),reddit:r(26),stumbleupon:r(27),telegram:r(28),tencent:r(29),threema:r(30),tumblr:r(31),twitter:r(32),vk:r(33),weibo:r(34),whatsapp:r(35),xing:r(36)}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"addthis",faPrefix:"fas",faName:"fa-plus",title:{bg:"Сподели в AddThis",cs:"Sdílet na AddThis",da:"Del på AddThis",de:"Bei AddThis teilen",en:"Share on AddThis",es:"Compartir en AddThis",fi:"Jaa AddThisissä",fr:"Partager sur AddThis",hr:"Podijelite na AddThis",hu:"Megosztás AddThisen",it:"Condividi su AddThis",ja:"AddThis上で共有",ko:"AddThis에서 공유하기",nl:"Delen op AddThis",no:"Del på AddThis",pl:"Udostępnij przez AddThis",pt:"Compartilhar no AddThis",ro:"Partajează pe AddThis",ru:"Поделиться на AddThis",sk:"Zdieľať na AddThis",sl:"Deli na AddThis",sr:"Podeli na AddThis",sv:"Dela på AddThis",tr:"AddThis'ta paylaş",zh:"在AddThis上分享"},shareUrl:"http://api.addthis.com/oexchange/0.8/offer?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"buffer",faPrefix:"fab",faName:"fa-buffer",title:{bg:"Сподели в buffer",cs:"Sdílet na buffer",da:"Del på buffer",de:"Bei buffer teilen",en:"Share on buffer",es:"Compartir en buffer",fi:"Jaa bufferissä",fr:"Partager sur buffer",hr:"Podijelite na buffer",hu:"Megosztás bufferen",it:"Condividi su buffer",ja:"buffer上で共有",ko:"buffer에서 공유하기",nl:"Delen op buffer",no:"Del på buffer",pl:"Udostępnij przez buffer",pt:"Compartilhar no buffer",ro:"Partajează pe buffer",ru:"Поделиться на buffer",sk:"Zdieľať na buffer",sl:"Deli na buffer",sr:"Podeli na buffer",sv:"Dela på buffer",tr:"buffer'ta paylaş",zh:"在buffer上分享"},shareUrl:"https://buffer.com/add?text="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=a.parse("https://share.diasporafoundation.org/",!0);return t.query.url=e.getURL(),t.query.title=e.getTitle(),t.protocol="https",delete t.search,{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"diaspora",faPrefix:"fas",faName:"fa-asterisk",title:{bg:"Сподели в diaspora*",cs:"Sdílet na diaspora*",da:"Del på diaspora*",de:"Bei diaspora* teilen",en:"Share on diaspora*",es:"Compartir en diaspora*",fi:"Jaa Diasporaissä",fr:"Partager sur diaspora*",hr:"Podijelite na diaspora*",hu:"Megosztás diaspora*",it:"Condividi su diaspora*",ja:"diaspora*上で共有",ko:"diaspora*에서 공유하기",nl:"Delen op diaspora*",no:"Del på diaspora*",pl:"Udostępnij przez diaspora*",pt:"Compartilhar no diaspora*",ro:"Partajează pe diaspora*",ru:"Поделиться на diaspora*",sk:"Zdieľať na diaspora*",sl:"Deli na diaspora*",sr:"Podeli na diaspora*-u",sv:"Dela på diaspora*",tr:"diaspora*'ta paylaş",zh:"分享至diaspora*"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){(function(e,a){var n;!function(a){function i(e){throw new RangeError(I[e])}function o(e,t){for(var r=e.length,a=[];r--;)a[r]=t(e[r]);return a}function s(e,t){var r=e.split("@"),a="";return r.length>1&&(a=r[0]+"@",e=r[1]),e=e.replace(R,"."),a+o(e.split("."),t).join(".")}function l(e){for(var t,r,a=[],n=0,i=e.length;n<i;)t=e.charCodeAt(n++),t>=55296&&t<=56319&&n<i?(r=e.charCodeAt(n++),56320==(64512&r)?a.push(((1023&t)<<10)+(1023&r)+65536):(a.push(t),n--)):a.push(t);return a}function p(e){return o(e,function(e){var t="";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function h(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,r){var a=0;for(e=r?S(e/P):e>>1,e+=S(e/t);e>D*z>>1;a+=k)e=S(e/D);return S(a+(D+1)*e/(e+y))}function c(e){var t,r,a,n,o,s,l,h,c,f,m=[],b=e.length,g=0,y=w,P=T;for(r=e.lastIndexOf(x),r<0&&(r=0),a=0;a<r;++a)e.charCodeAt(a)>=128&&i("not-basic"),m.push(e.charCodeAt(a));for(n=r>0?r+1:0;n<b;){for(o=g,s=1,l=k;n>=b&&i("invalid-input"),h=u(e.charCodeAt(n++)),(h>=k||h>S((v-g)/s))&&i("overflow"),g+=h*s,c=l<=P?j:l>=P+z?z:l-P,!(h<c);l+=k)f=k-c,s>S(v/f)&&i("overflow"),s*=f;t=m.length+1,P=d(g-o,t,0==o),S(g/t)>v-y&&i("overflow"),y+=S(g/t),g%=t,m.splice(g++,0,y)}return p(m)}function f(e){var t,r,a,n,o,s,p,u,c,f,m,b,g,y,P,U=[];for(e=l(e),b=e.length,t=w,r=0,o=T,s=0;s<b;++s)(m=e[s])<128&&U.push(L(m));for(a=n=U.length,n&&U.push(x);a<b;){for(p=v,s=0;s<b;++s)(m=e[s])>=t&&m<p&&(p=m);for(g=a+1,p-t>S((v-r)/g)&&i("overflow"),r+=(p-t)*g,t=p,s=0;s<b;++s)if(m=e[s],m<t&&++r>v&&i("overflow"),m==t){for(u=r,c=k;f=c<=o?j:c>=o+z?z:c-o,!(u<f);c+=k)P=u-f,y=k-f,U.push(L(h(f+P%y,0))),u=S(P/y);U.push(L(h(u,0))),o=d(r,g,a==n),r=0,++a}++r,++t}return U.join("")}function m(e){return s(e,function(e){return U.test(e)?c(e.slice(4).toLowerCase()):e})}function b(e){return s(e,function(e){return C.test(e)?"xn--"+f(e):e})}var g,v=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,2147483647),k=36,j=1,z=26,y=38,P=700,T=72,w=128,x="-",U=/^xn--/,C=/[^\x20-\x7E]/,R=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=k-j,S=Math.floor,L=String.fromCharCode;g={version:"1.4.1",ucs2:{decode:l,encode:p},decode:c,encode:f,toASCII:b,toUnicode:m},void 0!==(n=function(){return g}.call(t,r,t,e))&&(e.exports=n)}()}).call(t,r(11)(e),r(1))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,r){"use strict";t.decode=t.parse=r(14),t.encode=t.stringify=r(15)},function(e,t,r){"use strict";function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var p=e.length;l>0&&p>l&&(p=l);for(var u=0;u<p;++u){var h,d,c,f,m=e[u].replace(s,"%20"),b=m.indexOf(r);b>=0?(h=m.substr(0,b),d=m.substr(b+1)):(h=m,d=""),c=decodeURIComponent(h),f=decodeURIComponent(d),a(o,c)?n(o[c])?o[c].push(f):o[c]=[o[c],f]:o[c]=f}return o};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){"use strict";function a(e,t){if(e.map)return e.map(t);for(var r=[],a=0;a<e.length;a++)r.push(t(e[a],a));return r}var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?a(o(e),function(o){var s=encodeURIComponent(n(o))+r;return i(e[o])?a(e[o],function(e){return s+encodeURIComponent(n(e))}).join(t):s+encodeURIComponent(n(e[o]))}).join(t):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"facebook",faPrefix:"fab",faName:"fa-facebook-f",title:{bg:"Сподели във Facebook",cs:"Sdílet na Facebooku",da:"Del på Facebook",de:"Bei Facebook teilen",en:"Share on Facebook",es:"Compartir en Facebook",fi:"Jaa Facebookissa",fr:"Partager sur Facebook",hr:"Podijelite na Facebooku",hu:"Megosztás Facebookon",it:"Condividi su Facebook",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op Facebook",no:"Del på Facebook",pl:"Udostępnij na Facebooku",pt:"Compartilhar no Facebook",ro:"Partajează pe Facebook",ru:"Поделиться на Facebook",sk:"Zdieľať na Facebooku",sl:"Deli na Facebooku",sr:"Podeli na Facebook-u",sv:"Dela på Facebook",tr:"Facebook'ta paylaş",zh:"在Facebook上分享"},shareUrl:"https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle(),a=e.getMeta("description");return{popup:!0,shareText:"Flattr",name:"flattr",faPrefix:"far",faName:"fa-money-bill-alt",title:{de:"Artikel flattrn",en:"Flattr this"},shareUrl:"https://flattr.com/submit/auto?title="+encodeURIComponent(r)+"&description="+encodeURIComponent(a)+"&category="+encodeURIComponent(e.options.flattrCategory||"text")+"&user_id="+encodeURIComponent(e.options.flattrUser)+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"flip it",name:"flipboard",faPrefix:"fab",faName:"fa-flipboard",title:{bg:"Сподели в Flipboard",cs:"Sdílet na Flipboardu",da:"Del på Flipboard",de:"Bei Flipboard teilen",en:"Share on Flipboard",es:"Compartir en Flipboard",fi:"Jaa Flipboardissä",fr:"Partager sur Flipboard",hr:"Podijelite na Flipboardu",hu:"Megosztás Flipboardon",it:"Condividi su Flipboard",ja:"Flipboard上で共有",ko:"Flipboard에서 공유하기",nl:"Delen op Flipboard",no:"Del på Flipboard",pl:"Udostępnij na Flipboardu",pt:"Compartilhar no Flipboard",ro:"Partajează pe Flipboard",ru:"Поделиться на Flipboard",sk:"Zdieľať na Flipboardu",sl:"Deli na Flipboardu",sr:"Podeli na Flipboard-u",sv:"Dela på Flipboard",tr:"Flipboard'ta paylaş",zh:"在Flipboard上分享"},shareUrl:"https://share.flipboard.com/bookmarklet/popout?v=2&title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{blank:e.getInfoDisplayBlank(),popup:e.getInfoDisplayPopup(),shareText:"Info",name:"info",faPrefix:"fas",faName:"fa-info",title:{bg:"Повече информация",cs:"Více informací",da:"Flere oplysninger",de:"Weitere Informationen",en:"More information",es:"Más informaciones",fi:"Lisätietoja",fr:"Plus d'informations",hr:"Više informacija",hu:"Több információ",it:"Maggiori informazioni",ja:"詳しい情報",ko:"추가 정보",nl:"Verdere informatie",no:"Mer informasjon",pl:"Więcej informacji",pt:"Mais informações",ro:"Mai multe informatii",ru:"Больше информации",sk:"Viac informácií",sl:"Več informacij",sr:"Više informacija",sv:"Mer information",tr:"Daha fazla bilgi",zh:"更多信息"},shareUrl:e.getInfoUrl()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"mitteilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"シェア",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"distribuiți",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"linkedin",faPrefix:"fab",faName:"fa-linkedin-in",title:{bg:"Сподели в LinkedIn",cs:"Sdílet na LinkedIn",da:"Del på LinkedIn",de:"Bei LinkedIn teilen",en:"Share on LinkedIn",es:"Compartir en LinkedIn",fi:"Jaa LinkedInissä",fr:"Partager sur LinkedIn",hr:"Podijelite na LinkedIn",hu:"Megosztás LinkedInen",it:"Condividi su LinkedIn",ja:"LinkedIn上で共有",ko:"LinkedIn에서 공유하기",nl:"Delen op LinkedIn",no:"Del på LinkedIn",pl:"Udostępnij przez LinkedIn",pt:"Compartilhar no LinkedIn",ro:"Partajează pe LinkedIn",ru:"Поделиться на LinkedIn",sk:"Zdieľať na LinkedIn",sl:"Deli na LinkedIn",sr:"Podeli na LinkedIn-u",sv:"Dela på LinkedIn",tr:"LinkedIn'ta paylaş",zh:"在LinkedIn上分享"},shareUrl:"https://www.linkedin.com/shareArticle?mini=true&summary="+encodeURIComponent(e.getMeta("description"))+"&title="+r+"&url="+t}}},function(e,t,r){"use strict";e.exports=function(e){var t=e.getOption("mailUrl");return 0===t.indexOf("mailto:")&&(t+="?subject="+encodeURIComponent(e.getOption("mailSubject")||e.getTitle()),t+="&body="+encodeURIComponent(e.getOption("mailBody").replace(/\{url\}/i,e.getURL()))),{blank:0===t.indexOf("http"),popup:!1,shareText:{en:"mail",zh:"分享"},name:"mail",faPrefix:"fas",faName:"fa-envelope",title:{bg:"Изпрати по имейл",cs:"Poslat mailem",da:"Sende via e-mail",de:"Per E-Mail versenden",en:"Send by email",es:"Enviar por email",fi:"Lähetä sähköpostitse",fr:"Envoyer par courriel",hr:"Pošaljite emailom",hu:"Elküldés e-mailben",it:"Inviare via email",ja:"電子メールで送信",ko:"이메일로 보내기",nl:"Sturen via e-mail",no:"Send via epost",pl:"Wyślij e-mailem",pt:"Enviar por e-mail",ro:"Trimite prin e-mail",ru:"Отправить по эл. почте",sk:"Poslať e-mailom",sl:"Pošlji po elektronski pošti",sr:"Pošalji putem email-a",sv:"Skicka via e-post",tr:"E-posta ile gönder",zh:"通过电子邮件传送"},shareUrl:t}}},function(e,t,r){"use strict";var a=r(0);e.exports=function(e){var t=e.getTitle(),r=e.getMeta("DC.creator");r.length>0&&(t+=" - "+r);var n=e.getOption("mediaUrl");(!n||n.length<=0)&&(n=e.getMeta("og:image"));var i=a.parse("https://www.pinterest.com/pin/create/link/",!0);return i.query.url=e.getURL(),i.query.media=n,i.query.description=t,delete i.search,{popup:!0,shareText:"pin it",name:"pinterest",faPrefix:"fab",faName:"fa-pinterest-p",title:{bg:"Сподели в Pinterest",cs:"Přidat na Pinterest",da:"Del på Pinterest",de:"Bei Pinterest pinnen",en:"Pin it on Pinterest",es:"Compartir en Pinterest",fi:"Jaa Pinterestissä",fr:"Partager sur Pinterest",hr:"Podijelite na Pinterest",hu:"Megosztás Pinteresten",it:"Condividi su Pinterest",ja:"Pinterest上で共有",ko:"Pinterest에서 공유하기",nl:"Delen op Pinterest",no:"Del på Pinterest",pl:"Udostępnij przez Pinterest",pt:"Compartilhar no Pinterest",ro:"Partajează pe Pinterest",ru:"Поделиться на Pinterest",sk:"Zdieľať na Pinterest",sl:"Deli na Pinterest",sr:"Podeli na Pinterest-u",sv:"Dela på Pinterest",tr:"Pinterest'ta paylaş",zh:"分享至Pinterest"},shareUrl:a.format(i)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL());return{popup:!0,shareText:"Pocket",name:"pocket",faPrefix:"fab",faName:"fa-get-pocket",title:{bg:"Запазване в Pocket",cs:"Uložit do Pocket",da:"Gem i Pocket",de:"In Pocket speichern",en:"Save to Pocket",es:"Guardar en Pocket",fi:"Tallenna kohtaan Pocket",fr:"Enregistrer dans Pocket",hr:"Spremi u Pocket",hu:'Mentés "Pocket"-be',it:"Salva in Pocket",ja:"「ポケット」に保存",ko:"Pocket에 저장",nl:"Opslaan in Pocket",no:"Lagre i Pocket",pl:"Zapisz w Pocket",pt:"Salvar em Pocket",ro:"Salvați în Pocket",ru:"Сохранить в Pocket",sk:"Uložiť do priečinka Pocket",sl:"Shrani v Pocket",sr:"Sačuvaj u Pocket",sv:"Spara till Pocket",tr:"Pocket e kaydet",zh:"保存到Pocket"},shareUrl:"https://getpocket.com/save?title="+encodeURIComponent(e.getTitle())+"&url="+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{name:"print",faPrefix:"fas",faName:"fa-print",popup:!1,shareText:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},title:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"impresión",fi:"",fr:"imprimer",hr:"",hu:"",it:"stampa",ja:"",ko:"",nl:"afdrukken",no:"",pl:"drukuj",pt:"",ro:"",ru:"Распечатать",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},shareUrl:"javascript:window.print();"}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"qzone",faPrefix:"fab",faName:"fa-qq",title:{bg:"Сподели в Qzone",cs:"Sdílet na Qzone",da:"Del på Qzone",de:"Bei Qzone teilen",en:"Share on Qzone",es:"Compartir en Qzone",fi:"Jaa Qzoneissä",fr:"Partager sur Qzone",hr:"Podijelite na Qzone",hu:"Megosztás Qzone",it:"Condividi su Qzone",ja:"Qzone上で共有",ko:"Qzone에서 공유하기",nl:"Delen op Qzone",no:"Del på Qzone",pl:"Udostępnij przez Qzone",pt:"Compartilhar no Qzone",ro:"Partajează pe Qzone",ru:"Поделиться на Qzone",sk:"Zdieľať na Qzone",sl:"Deli na Qzone",sr:"Podeli na Qzone-u",sv:"Dela på Qzone",tr:"Qzone'ta paylaş",zh:"分享至QQ空间"},shareUrl:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"reddit",faPrefix:"fab",faName:"fa-reddit-alien",title:{bg:"Сподели в Reddit",cs:"Sdílet na Redditu",da:"Del på Reddit",de:"Bei Reddit teilen",en:"Share on Reddit",es:"Compartir en Reddit",fi:"Jaa Redditissä",fr:"Partager sur Reddit",hr:"Podijelite na Reddit",hu:"Megosztás Redditen",it:"Condividi su Reddit",ja:"Reddit上で共有",ko:"Reddit에서 공유하기",nl:"Delen op Reddit",no:"Del på Reddit",pl:"Udostępnij przez Reddit",pt:"Compartilhar no Reddit",ro:"Partajează pe Reddit",ru:"Поделиться на Reddit",sk:"Zdieľať na Reddit",sl:"Deli na Reddit",sr:"Podeli na Reddit-u",sv:"Dela på Reddit",tr:"Reddit'ta paylaş",zh:"分享至Reddit"},shareUrl:"https://reddit.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=encodeURIComponent(e.getTitle());return""!==r&&(r="&title="+r),{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"stumbleupon",faPrefix:"fab",faName:"fa-stumbleupon",title:{bg:"Сподели в Stumbleupon",cs:"Sdílet na Stumbleuponu",da:"Del på Stumbleupon",de:"Bei Stumbleupon teilen",en:"Share on Stumbleupon",es:"Compartir en Stumbleupon",fi:"Jaa Stumbleuponissä",fr:"Partager sur Stumbleupon",hr:"Podijelite na Stumbleupon",hu:"Megosztás Stumbleupon",it:"Condividi su Stumbleupon",ja:"Stumbleupon上で共有",ko:"Stumbleupon에서 공유하기",nl:"Delen op Stumbleupon",no:"Del på Stumbleupon",pl:"Udostępnij przez Stumbleupon",pt:"Compartilhar no Stumbleupon",ro:"Partajează pe Stumbleupon",ru:"Поделиться на Stumbleupon",sk:"Zdieľať na Stumbleupon",sl:"Deli na Stumbleupon",sr:"Podeli na Stumbleupon-u",sv:"Dela på Stumbleupon",tr:"Stumbleupon'ta paylaş",zh:"分享至Stumbleupon"},shareUrl:"https://www.stumbleupon.com/submit?url="+t+r+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"telegram",faPrefix:"fab",faName:"fa-telegram",title:{bg:"Сподели в Telegram",cs:"Sdílet na Telegramu",da:"Del på Telegram",de:"Bei Telegram teilen",en:"Share on Telegram",es:"Compartir en Telegram",fi:"Jaa Telegramissä",fr:"Partager sur Telegram",hr:"Podijelite na Telegram",hu:"Megosztás Telegramen",it:"Condividi su Telegram",ja:"Telegram上で共有",ko:"Telegram에서 공유하기",nl:"Delen op Telegram",no:"Del på Telegram",pl:"Udostępnij przez Telegram",pt:"Compartilhar no Telegram",ro:"Partajează pe Telegram",ru:"Поделиться на Telegram",sk:"Zdieľať na Telegram",sl:"Deli na Telegram",sr:"Podeli na Telegram-u",sv:"Dela på Telegram",tr:"Telegram'ta paylaş",zh:"在Telegram上分享"},shareUrl:"https://t.me/share/url?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tencent-weibo",faPrefix:"fab",faName:"fa-tencent-weibo",title:{bg:"Сподели в tencent weibo",cs:"Sdílet na tencent weibo",da:"Del på tencent weibo",de:"Bei tencent weibo teilen",en:"Share on tencent weibo",es:"Compartir en tencent weibo",fi:"Jaa tencent weiboissä",fr:"Partager sur tencent weibo",hr:"Podijelite na tencent weibo",hu:"Megosztás tencent weiboen",it:"Condividi su tencent weibo",ja:"Tencent weibo上で共有",ko:"Tencent weibo에서 공유하기",nl:"Delen op tencent weibo",no:"Del på tencent weibo",pl:"Udostępnij przez tencent weibo",pt:"Compartilhar no tencent weibo",ro:"Partajează pe tencent weibo",ru:"Поделиться на tencent weibo",sk:"Zdieľať na tencent weibo",sl:"Deli na tencent weibo",sr:"Podeli na tencent weibo-u",sv:"Dela på tencent weibo",tr:"Tencent weibo'ta paylaş",zh:"分享至腾讯微博"},shareUrl:"http://v.t.qq.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"threema",faPrefix:"fas",faName:"fa-lock",title:{bg:"Сподели в Threema",cs:"Sdílet na Threema",da:"Del på Threema",de:"Bei Threema teilen",en:"Share on Threema",es:"Compartir en Threema",fi:"Jaa Threemaissä",fr:"Partager sur Threema",hr:"Podijelite na Threema",hu:"Megosztás Threemaen",it:"Condividi su Threema",ja:"Threema上で共有",ko:"Threema에서 공유하기",nl:"Delen op Threema",no:"Del på Threema",pl:"Udostępnij przez Threema",pt:"Compartilhar no Threema",ro:"Partajează pe Threema",ru:"Поделиться на Threema",sk:"Zdieľať na Threema",sl:"Deli na Threema",sr:"Podeli na Threema-u",sv:"Dela på Threema",tr:"Threema'ta paylaş",zh:"在Threema上分享"},shareUrl:"threema://compose?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"tumblr",faPrefix:"fab",faName:"fa-tumblr",title:{bg:"Сподели в tumblr",cs:"Sdílet na tumblru",da:"Del på tumblr",de:"Bei tumblr teilen",en:"Share on tumblr",es:"Compartir en tumblr",fi:"Jaa tumblrissä",fr:"Partager sur tumblr",hr:"Podijelite na tumblr",hu:"Megosztás tumblren",it:"Condividi su tumblr",ja:"tumblr上で共有",ko:"tumblr에서 공유하기",nl:"Delen op tumblr",no:"Del på tumblr",pl:"Udostępnij przez tumblr",pt:"Compartilhar no tumblr",ro:"Partajează pe tumblr",ru:"Поделиться на tumblr",sk:"Zdieľať na tumblr",sl:"Deli na tumblr",sr:"Podeli na tumblr-u",sv:"Dela på tumblr",tr:"tumblr'ta paylaş",zh:"在tumblr上分享"},shareUrl:"http://tumblr.com/widgets/share/tool?canonicalUrl="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";var a=r(0),n=function(e,t){var r=document.createElement("div"),a=document.createTextNode(e);r.appendChild(a);var n=r.textContent;if(n.length<=t)return e;var i=n.substring(0,t-1).lastIndexOf(" ");return n=n.substring(0,i)+"…"};e.exports=function(e){var t=a.parse("https://twitter.com/intent/tweet",!0),r=e.getTitle();return t.query.text=n(r,120),t.query.url=e.getURL(),null!==e.options.twitterVia&&(t.query.via=e.options.twitterVia),delete t.search,{popup:!0,shareText:{en:"tweet",ja:"のつぶやき",ko:"짹짹",ru:"твит",sr:"твеет",zh:"鸣叫"},name:"twitter",faPrefix:"fab",faName:"fa-twitter",title:{bg:"Сподели в Twitter",cs:"Sdílet na Twiiteru",da:"Del på Twitter",de:"Bei Twitter teilen",en:"Share on Twitter",es:"Compartir en Twitter",fi:"Jaa Twitterissä",fr:"Partager sur Twitter",hr:"Podijelite na Twitteru",hu:"Megosztás Twitteren",it:"Condividi su Twitter",ja:"ツイッター上で共有",ko:"트위터에서 공유하기",nl:"Delen op Twitter",no:"Del på Twitter",pl:"Udostępnij na Twitterze",pt:"Compartilhar no Twitter",ro:"Partajează pe Twitter",ru:"Поделиться на Twitter",sk:"Zdieľať na Twitteri",sl:"Deli na Twitterju",sr:"Podeli na Twitter-u",sv:"Dela på Twitter",tr:"Twitter'da paylaş",zh:"在Twitter上分享"},shareUrl:a.format(t)+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"vk",faPrefix:"fab",faName:"fa-vk",title:{bg:"Сподели във VK",cs:"Sdílet na VKu",da:"Del på VK",de:"Bei VK teilen",en:"Share on VK",es:"Compartir en VK",fi:"Jaa VKissa",fr:"Partager sur VK",hr:"Podijelite na VKu",hu:"Megosztás VKon",it:"Condividi su VK",ja:"フェイスブック上で共有",ko:"페이스북에서 공유하기",nl:"Delen op VK",no:"Del på VK",pl:"Udostępnij na VKu",pt:"Compartilhar no VK",ro:"Partajează pe VK",ru:"Поделиться на ВКонтакте",sk:"Zdieľať na VKu",sl:"Deli na VKu",sr:"Podeli na VK-u",sv:"Dela på VK",tr:"VK'ta paylaş",zh:"在VK上分享"},shareUrl:"https://vk.com/share.php?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"weibo",faPrefix:"fab",faName:"fa-weibo",title:{bg:"Сподели в weibo",cs:"Sdílet na weibo",da:"Del på weibo",de:"Bei weibo teilen",en:"Share on weibo",es:"Compartir en weibo",fi:"Jaa weiboissä",fr:"Partager sur weibo",hr:"Podijelite na weibo",hu:"Megosztás weiboen",it:"Condividi su weibo",ja:"Weibo上で共有",ko:"Weibo에서 공유하기",nl:"Delen op weibo",no:"Del på weibo",pl:"Udostępnij przez weibo",pt:"Compartilhar no weibo",ro:"Partajează pe weibo",ru:"Поделиться на weibo",sk:"Zdieľať na weibo",sl:"Deli na weibo",sr:"Podeli na weibo-u",sv:"Dela på weibo",tr:"Weibo'ta paylaş",zh:"分享至新浪微博"},shareUrl:"http://service.weibo.com/share/share.php?url="+encodeURIComponent(e.getURL())+"&title="+e.getTitle()+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){var t=encodeURIComponent(e.getURL()),r=e.getTitle();return{popup:!1,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"whatsapp",faPrefix:"fab",faName:"fa-whatsapp",title:{bg:"Сподели в Whatsapp",cs:"Sdílet na Whatsappu",da:"Del på Whatsapp",de:"Bei Whatsapp teilen",en:"Share on Whatsapp",es:"Compartir en Whatsapp",fi:"Jaa WhatsAppissä",fr:"Partager sur Whatsapp",hr:"Podijelite na Whatsapp",hu:"Megosztás WhatsAppen",it:"Condividi su Whatsapp",ja:"Whatsapp上で共有",ko:"Whatsapp에서 공유하기",nl:"Delen op Whatsapp",no:"Del på Whatsapp",pl:"Udostępnij przez WhatsApp",pt:"Compartilhar no Whatsapp",ro:"Partajează pe Whatsapp",ru:"Поделиться на Whatsapp",sk:"Zdieľať na Whatsapp",sl:"Deli na Whatsapp",sr:"Podeli na WhatsApp-u",sv:"Dela på Whatsapp",tr:"Whatsapp'ta paylaş",zh:"在Whatsapp上分享"},shareUrl:"whatsapp://send?text="+encodeURIComponent(r)+"%20"+t+e.getReferrerTrack()}}},function(e,t,r){"use strict";e.exports=function(e){return{popup:!0,shareText:{bg:"cподеляне",cs:"sdílet",da:"del",de:"teilen",en:"share",es:"compartir",fi:"Jaa",fr:"partager",hr:"podijelite",hu:"megosztás",it:"condividi",ja:"共有",ko:"공유하기",nl:"delen",no:"del",pl:"udostępnij",pt:"compartilhar",ro:"partajează",ru:"поделиться",sk:"zdieľať",sl:"deli",sr:"podeli",sv:"dela",tr:"paylaş",zh:"分享"},name:"xing",faPrefix:"fab",faName:"fa-xing",title:{bg:"Сподели в XING",cs:"Sdílet na XINGu",da:"Del på XING",de:"Bei XING teilen",en:"Share on XING",es:"Compartir en XING",fi:"Jaa XINGissä",fr:"Partager sur XING",hr:"Podijelite na XING",hu:"Megosztás XINGen",it:"Condividi su XING",ja:"XING上で共有",ko:"XING에서 공유하기",nl:"Delen op XING",no:"Del på XING",pl:"Udostępnij przez XING",pt:"Compartilhar no XING",ro:"Partajează pe XING",ru:"Поделиться на XING",sk:"Zdieľať na XING",sl:"Deli na XING",sr:"Podeli na XING-u",sv:"Dela på XING",tr:"XING'ta paylaş",zh:"分享至XING"},shareUrl:"https://www.xing.com/spi/shares/new?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}}]);
$(document).ready(function(){var a=window.location.pathname.split("/"),e=$("#uno_ga_environment").val(),o=$("#uno_ga_pagetype").val();0==o&&(o="Other"),1==o&&(o="Home"),2==o&&(o="Shop List"),3==o&&(o="Product"),4==o&&(o="Donation Checkout"),5==o&&(o="Mediathek List"),6==o&&(o="Mediathek Product"),7==o&&(o="Mediathek Checkout"),8==o&&(o="Category"),9==o&&(o="Sub Category"),10==o&&(o="Article"),11==o&&(o="Formular"),12==o&&(o="Search"),13==o&&(o="Error Page"),14==o&&(o="Blog"),15==o&&(o="News"),16==o&&(o="Landing Page"),17==o&&(o="Microsite"),18==o&&(o="Presse"),19==o&&(o="Update");var t=$("#uno_ga_custom_page_category").val();""==t&&(t=void 0),null==t&&null!=a[1]&&""!=a[1]&&(t=a[1]);var n=$("#uno_ga_custom_page_sub_category").val();""==n&&(n=void 0),null==n&&null!=a[2]&&""!=a[1]&&(n=a[2]),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"pageView",environment:e,pageType:o,pageCategory:t,pageSubCategory:n})});
//# sourceMappingURL=ga_pageview-dist.js.map
function fireGAEvent(a){0<$("#yt-iframe-api").length?(frameID=getFrameID(yt_frame_id=a),yt_frame_url=$("#"+yt_frame_id).attr("src"),frameID&&new YT.Player(frameID,{events:{onStateChange:stopCycle}})):(yt_frame_id=a,yt_frame_url=$("#"+yt_frame_id).attr("src"),function(){var a=document.createElement("script");a.id="yt-iframe-api",a.src=("https:"==location.protocol?"https":"http")+"://www.youtube.com/player_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(a,t)}())}function getFrameID(a){var t=document.getElementById(a);if(t){if(/^iframe$/i.test(t.tagName))return a;var n=t.getElementsByTagName("iframe");if(!n.length)return null;for(var e=0;e<n.length&&!/^https?:\/\/(?:www\.)?youtube(?:-nocookie)?\.com(\/|$)/i.test(n[e].src);e++);if((t=n[e]).id)return t.id;for(;a+="-frame",document.getElementById(a););return t.id=a}return null}function onYouTubePlayerAPIReady(){YT_ready(!0)}function callYT_ready(){YT_ready(!0)}function stopCycle(a){var t="unknown";0==a.data&&(t="Video Ended"),1==a.data&&(t="Video Playing"),2==a.data&&(t="Video Paused"),3==a.data&&(t="Video Buffering"),5==a.data&&(t="Video Cued");var n=player.getDuration(),e=player.getCurrentTime()/n;e=(e*=100).toFixed(0);var i=new Array;i.event="Video",i.eventAction=t+" "+e+"%",i.eventLabel=yt_frame_url,"unknown"!==t&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Video",eventAction:i.eventAction,eventLabel:i.eventLabel}))}function onReady(){player.addEventListener("onStateChange",function(a){})}$.fn.isExternal=function(){var a=window.location.host;return $("<a>",{href:this.attr("href")})[0].hostname!==a};var getHostname=function(a){return new URL(a).hostname};if($(document).ready(function(){if(Cookiebot.consent.statistics||Cookiebot.consent.marketing){if($(".button, .btn").not('[type="submit"]').not(".btn-map-preload").not(".popup-item .button").not('[href*=".pdf"]').not(".petition-widget .button").not(".petition-mini-widget .button").not("#newdonation-next").not(".next-button").not(".newdonation-cta-submit").not("#keyslider-slider a").click(function(){var a=new Array,t="Bodycopy BTN";("submit"==$(this).attr("type")&&(t="Submit BTN"),0<$(this).closest(".vc-pageteaser").length&&(t="Page Teaser BTN"),"spenden-button"==$(this).attr("id")&&(t="Spenden BTN Header"),$(this).attr("href"))&&(~$(this).attr("href").indexOf("#")&&(t="Sprungmarke"));a.event="button",a.buttonType=t,a.buttonLabel=$(this).text().trim(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"button",buttonType:a.buttonType,buttonLabel:a.buttonLabel})}),$(".to-top-button").click(function(){var a=new Array;a.event="button",a.buttonType="Sprungmarke",a.buttonLabel="Pfeil nach oben",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"button",buttonType:a.buttonType,buttonLabel:a.buttonType})}),$(".kesearch_pagebrowser a").click(function(){var a=$(".kesearch_pagebrowser").find(".current").text(),t=$(this).text();if($(".kesearch_pagebrowser").find("li:last-child").children("a").hasClass("next"))var n=$(".kesearch_pagebrowser").find("li:last-child").prev().text();else n=$(".kesearch_pagebrowser").find("li:last-child").text();var e=new Array;e.event="pagination",e.newPageNumber=t,e.currentPageNumber=a,e.totalPages=n,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"pagination",newPageNumber:e.newPageNumber,currentPageNumber:e.currentPageNumber,totalPages:e.totalPages})}),$(".page-navigation a").click(function(){var a=$(".f3-widget-paginator").find(".current").text(),t=$(this).text();if($(".f3-widget-paginator").find("li:last-child").children("a").hasClass("next"))var n=$(".f3-widget-paginator").find("li:last-child").prev().text();else n=$(".f3-widget-paginator").find("li:last-child").text();var e=new Array;e.event="pagination",e.newPageNumber=t,e.currentPageNumber=a,e.totalPages=n,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"pagination",newPageNumber:e.newPageNumber,currentPageNumber:e.currentPageNumber,totalPages:e.totalPages})}),0<$("form.powermail_form").length){var a=new Array;a.event="formView",a.formName=$("form.powermail_form").find("h3").text(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"formView",formName:a.formName})}$(".powermail_submit").click(function(){var a=new Array;a.event="formSubmit",a.formName=$(this).closest(".powermail_form").find("h3").text(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"formSubmit",formName:a.formName})}),window.Parsley&&window.Parsley.on("form:error",function(a){var t=new Array,n=new Array,e=new Array,i=new Array;$.each(a.fields,function(a,t){!0!==t.validationResult&&(t.$element.attr("placeholder"),n.push(t.$element.attr("placeholder")),e.push(t.validationResult[0].assert.requirements),i.push(t.$element.next().find("li:first-child").text()))}),t.event="formFailure",t.formName=$("form.powermail_form").find("h3").text(),t.formField=n,t.errorId=e,t.errorText=i,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"formFailure",formName:t.formName,formField:t.formField,errorId:t.errorId,errorText:t.errorText})}),$("#logo > a").on("click",function(){var a=new Array;a.event="navigation",a.navigationType="Main Navigation",a.navigationLabel="Logo",a.navigationPath="Start",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:a.navigationType,navigationLabel:a.navigationLabel,navigationPath:a.navigationPath})}),$("#mainnav .standardnavi li.sub").on("click",function(){var a=$(this).data("pid"),t=$('.menul1 > li[data-pid="'+a+'"] > a').html(),n="Start > "+t,e=new Array;e.event="navigation",e.navigationType="Main Navigation",e.navigationLabel=t,e.navigationPath=n,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:e.navigationType,navigationLabel:e.navigationLabel,navigationPath:e.navigationPath})}),$(".burgernavi").children(".subnavi").children("li").children("a").on("click",function(){$(this).data("pid");var a=$(this).text(),t="Start > "+a,n=new Array;n.event="navigation",n.navigationType="Flyout SubNavigation",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}),$(".page-breadcrumb  a").on("click",function(){var a=$(this).text(),t="";0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){if($(this).text()===a)return t=t+$(this).text()+" > ",!1;t=t+$(this).text()+" > "}),t=t.slice(0,-3));var n=new Array;n.event="navigation",n.navigationType="Breadcrumb Navigation",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}),$("#burgerbtn").click(function(){if($("html").hasClass("open-mobile"));else{var a="";0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){a=a+$(this).text()+" > "}),a+=$(".page-breadcrumb > .last").text());var t=new Array;t.event="navigation",t.navigationType="Side Navigation",t.navigationLabel="Burger BTN",t.navigationPath=a,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:t.navigationType,navigationLabel:t.navigationLabel,navigationPath:t.navigationPath})}}),$("#offcanvasnav a").not("a.accordion-title").click(function(){var a=$(this).next().text(),t=(a="Opener "+$(this).next().text(),"");t=$(this).text(),$(this).closest("ul").hasClass("menul3")&&(t=$(this).closest("ul").parent().parent().parent().parent().parent().children(".accordion-title").siblings("a").text()+" > "+$(this).closest("ul").parent().parent().children(".accordion-title").siblings("a").text()+" > "+t),$(this).closest("ul").hasClass("menul2")&&(t=$(this).closest("ul").parent().parent().children(".accordion-title").siblings("a").text()+" > "+t),t="Start > "+t;var n=new Array;n.event="navigation",n.navigationType="Side Navigation",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}),$("#offcanvasnav .accordion-title").click(function(){var a=$(this).html();a=a.trim();var t="";if(t=$(this).siblings("a").text(),$(this).closest("ul").hasClass("menul3")&&(t=$(this).closest("ul").parent().parent().parent().parent().parent().children(".accordion-title").siblings("a").text()+" > "+$(this).closest("ul").parent().parent().children(".accordion-title").siblings("a").text()+" > "+t),$(this).closest("ul").hasClass("menul2")&&(t=$(this).closest("ul").parent().parent().children(".accordion-title").siblings("a").text()+" > "+t),t="Start > "+t,$(this).parent(".accordion-item").hasClass("is-active"));else{var n=new Array;n.event="navigation",n.navigationType="Accordion (Mask)",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}}),$(".footernavi a").click(function(){var a=$(this).text(),t="";0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){t=t+$(this).text()+" > "}),t+=$(".page-breadcrumb > .last").text());var n=new Array;n.event="navigation",n.navigationType="Footer Navigation",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}),0<$("footer").find(".large-3:nth-child(3)").length&&$("footer").find(".large-3:nth-child(3) a").click(function(){var a=$(this).text(),t="";0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){t=t+$(this).text()+" > "}),t+=$(".page-breadcrumb > .last").text());var n=new Array;n.event="navigation",n.navigationType="Footer SubNavigation",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}),$(".faq-head").not("#info-content .faq-head").click(function(){var a=$(this).text().trim(),t="";if(0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){t=t+$(this).text()+" > "}),t+=$(".page-breadcrumb > .last").text()),$(this).parent(".faq-item").hasClass("active"));else{var n=new Array;n.event="navigation",n.navigationType="Accordion",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}}),$(".accordion-title").not("#offcanvasnav .accordion-title").click(function(){var a=$(this).html();a=a.trim();var t="";if(0<$(".page-breadcrumb").length&&($(".page-breadcrumb > a").each(function(){t=t+$(this).text()+" > "}),t+=$(".page-breadcrumb > .last").text()),$(this).parent(".accordion-item").hasClass("is-active"));else{var n=new Array;n.event="navigation",n.navigationType="Accordion (Mask)",n.navigationLabel=a,n.navigationPath=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"navigation",navigationType:n.navigationType,navigationLabel:n.navigationLabel,navigationPath:n.navigationPath})}}),$(".video-faq a").click(function(){var a=$(this).find(".h4").html(),t=new Array;t.event="videoIcon",t.videoIcon=a,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"videoIcon",videoIcon:t.videoIcon})}),$(".btn-map-preload").click(function(){var a=new Array;a.event="interactiveMap",a.mapAction="load map",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"event",mapAction:a.mapAction})}),$(".popup-item a.button").click(function(){var a=new Array;a.event="interactiveMap",a.mapAction="more information",a.mapCountry=$(this).parent().find("h3").html(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"event",mapAction:a.mapAction,mapCountry:a.mapCountry})}),$("#quiz-carousel .slide").click(function(){var a=new Array;a.event="quizClick",a.quizQuestion=$(this).find("h4").html(),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"quizClick",quizQuestion:a.quizQuestion})}),$('a[target="_blank"]').not('[href^="mailto"]').not('[href*=".pdf"]').not(".accordion-title").click(function(){if($(this).isExternal()){var a=new Array,t=$(this).attr("href"),n=getHostname(t);a.event="links",a.linkCategory="external",a.linkDomain=n,a.linkURL=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"links",linkCategory:a.linkCategory,linkDomain:a.linkDomain,linkURL:a.linkURL})}}),$('[href^="mailto"]').not(".shariff-button a").click(function(){var a=new Array,t=$(this).attr("href");t=t.substring("7"),a.event="contact",a.contactCategory="mail",a.contactLink=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"contact",contactCategory:a.contactCategory,contactLink:a.contactLink})}),$('[href*="linkTo_UnCryptMailto"]').click(function(){var a=new Array;a.event="contact",a.contactCategory="mail",a.contactLink="info@uno-fluechtlingshilfe.de",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"contact",contactCategory:a.contactCategory,contactLink:a.contactLink})}),$(".shariff-button a").click(function(){var a=new Array,t=$(this).attr("href"),n="email";~t.indexOf("facebook")&&(n="Faceboom"),~t.indexOf("twitter")&&(n="Twitter"),~t.indexOf("xing")&&(n="Xing"),~t.indexOf("linkedin")&&(n="LinkedIn"),~t.indexOf("whatsapp")&&(n="WhatsApp"),a.event="share",a.shareMedium=n,a.sharedElement=window.location.href,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"share",shareMedium:a.shareMedium,sharedElement:a.sharedElement})}),$('a[href*=".pdf"]').click(function(){var a=new Array,t=$(this).attr("href");a.event="download",a.donwloadType="PDF",a.downloadLink=t,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"download",donwloadType:"PDF",downloadLink:a.downloadLink})}),$(".ns-btn").click(function(){var a=new Array,t=$(".news-category-label").html();t=t.trim();var n=$(".header h1").text();a.event="commentSubmit",a.commentLocation=t,a.articleTitle=n,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"commentSubmit",commentLocation:a.commentLocation,articleTitle:a.articleTitle})}),$(".petition-widget .button").not(".sharingiscaring-btn").click(function(){var a=new Array;a.event="petition",a.petitionPlugIn="Petition Widget",a.petitionAction="CTA BTN",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"petition",petitionPlugIn:a.petitionPlugIn,petitionAction:a.petitionAction})}),$(".petition-widget .readmore").click(function(){var a=new Array;a.event="petition",a.petitionPlugIn="Petition Widget",a.petitionAction="Read more BTN",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"petition",petitionPlugIn:a.petitionPlugIn,petitionAction:a.petitionAction})}),$(".petition-mini-widget .button").click(function(){var a=new Array;a.event="petition",a.petitionPlugIn="Petition MiniWidget",a.petitionAction="CTA BTN",window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"petition",petitionPlugIn:a.petitionPlugIn,petitionAction:a.petitionAction})}),$("#faq-overlay > a").click(function(){var a=new Array;a.event="infoicon",a.eventAction="klick",a.eventURL=window.location.href,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"infoicon",eventAction:a.eventAction,eventURL:a.eventURL})}),$("#info-content .faq-head").click(function(){var a=$(this).text();if(a=a.trim(),$(this).parent(".faq-item").hasClass("active"))var t="close";else t="open";var n=new Array;n.event="infoicon",n.eventAction="Hilfe Accordion",n.eventLabel=t+": "+a,n.eventURL=window.location.href,window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"infoicon",eventAction:n.eventAction,eventLabel:n.eventLabel,eventURL:n.eventURL})})}}),Cookiebot.consent.statistics||Cookiebot.consent.marketing){var yt_frame_id="",yt_frame_url="",YT_ready=function(){var n=[],e=!1;return function(a,t){if(!0===a)for(e=!0;n.length;)n.shift()();else"function"==typeof a&&(e?a():n[t?"unshift":"push"](a))}}(),frameID="";YT_ready(function(){(frameID=getFrameID(yt_frame_id))&&(player=new YT.Player(frameID,{events:{onStateChange:stopCycle}}))});var naviInteraction=!0,mapInteraction=!0}
//# sourceMappingURL=interaction-dist.js.map
Modernizr.objectfit||$(".keyvisual-microsite img-wrapper").each(function(){var i=$(this),r=i.find("img").prop("src");r&&i.css("backgroundImage","url("+r+")").addClass("compat-object-fit")});
!function(h){function g(e,t,i){var n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3),document.cookie=e+"="+t+";expires="+n.toUTCString()+"; path=/"}function t(e){var t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}h(document).ready(function(){glio.config.heightTopLeft=45;var o=!(glio.config.heightTopRight=45),e=0,r=!1;if((r="undefined"!=typeof Cookiebot&&!!Cookiebot.consent.preferences)&&(e=t("exit-intent-colorbox")),h("#exit-intent-activated").val()&&1!=e){var a="80%";""!==h("#exit-intent-height").val()&&(a=h("#exit-intent-height").val());var l=(new Date).getTime()/1e3,c=!1;""!==h("#exit-intent-mintime").val()&&(ei_mintime=h("#exit-intent-mintime").val(),c=!0);var m=!1;if(""!==h("#exit-intent-formelement").val()){var x=h("#exit-intent-formelement").val();m=!0}glio.init(["top-left",function(){var e=(new Date).getTime()/1e3,t=!0;c&&e-l<ei_mintime&&(t=!1);var i=!0;m&&(""==h(x).val()&&(i=!1));!o&&t&&i&&(h.colorbox({inline:!0,width:"80%",height:a,initialHeight:a,maxHeight:a,href:"#exit-intent-content"}),h("#colorbox").colorbox.resize(),o=!0,r&&g("exit-intent-colorbox",1,7))}],["top-right",function(){var e=(new Date).getTime()/1e3,t=!0;c&&e-l<ei_mintime&&(t=!1);var i=!0;m&&(""==h(x).val()&&(i=!1));!o&&t&&i&&(h.colorbox({inline:!0,width:"80%",height:a,initialHeight:a,maxHeight:a,href:"#exit-intent-content"}),h("#colorbox").colorbox.resize(),o=!0,r&&g("exit-intent-colorbox",1,7))}]),h(document).mouseleave(function(e){if(e.clientY<0){var t=(new Date).getTime()/1e3,i=!0;c&&t-l<ei_mintime&&(i=!1);var n=!0;if(m)""==h(x).val()&&(n=!1);!o&&i&&n&&(h.colorbox({inline:!0,width:"80%",height:a,initialHeight:a,maxHeight:a,href:"#exit-intent-content"}),h("#colorbox").colorbox.resize(),o=!0,r&&g("exit-intent-colorbox",1,7))}})}})}(jQuery);
//# sourceMappingURL=glio-dist.js.map
!function(t){t(document).ready(function(){t(".lightbox-video-youtube").click(function(e){e.preventDefault()}),t(".lightbox-video-youtube").colorbox({iframe:!0,width:"80%",height:"80%",href:function(){var e=new RegExp("[\\?&]v=([^&#]*)").exec(this.href);if(e&&e[1])return 0<e[1].indexOf("rel")?"http://youtube.com/embed/"+e[1]:"http://youtube.com/embed/"+e[1]+"?rel=0enablejsapi=1&mode=transparent"}}),0<t(".colorbox-image-container").length&&t(".colorbox-image-container").each(function(e){var o=t(this).find(".colorbox-image").attr("src");null!=o&&t(this).find(".colorbox-image-link").attr("href",o)})})}(jQuery);
//# sourceMappingURL=lightbox-dist.js.map

//# sourceMappingURL=stacktable-dist.js.map
$(document).ready(function(){function t(){!function(e,t){var n=location.href,i=n.split("?")[0],c=n.split("?")[1];if(c)a=c.replace(new RegExp("[&?]?"+e+"=[^&;]+","gi"),"");else var a="";""!=a&&(a+="&");window.location.href=i+"?"+a+e+"="+t}("tx_news_pi1%5Bsearch%5D%5Bsubject%5D",$("#news-subject").val())}$("#news-subject").on("keypress",function(e){13===e.which&&t()}),$("#news-subject-submit").click(function(){t()})}),$(document).ready(function(){function i(e,t){var n=location.href,i=(n=function(e){var t=document.location.href,n=t.split("?");if(2<=n.length){for(var i=n.shift(),c=n.join("?"),a=encodeURIComponent(e)+"=",o=c.split(/[&;]/g),r=o.length;0<r--;)-1!==o[r].lastIndexOf(a,0)&&o.splice(r,1);t=i+"?"+o.join("&")}return t}("tx_news_pi1[@widget_0][currentPage]")).split("?")[0],c=n.split("?")[1];if(c)a=c.replace(new RegExp("[&?]?"+e+"=[^&;]+","gi"),"");else var a="";""!=a&&(a+="&"),window.location.href=i+"?"+a+e+"="+t}var e,n;$("#newsorder").change(function(){i("tx_news_pi1%5BoverwriteDemand%5D%5Border%5D",$(this).val())}),$(".news-categorie").click(function(e){var t,n=$(this);e.preventDefault(),n.toggleClass("active"),t="",$(".news-categorie.active").each(function(){var e=$(this).data("categorie");t+=e+","}),i("tx_news_pi1%5BoverwriteDemand%5D%5Bcategories%5D",t=t.slice(0,-1))}),0<$("#demandcategories").length&&(e=$("#demandcategories").val(),n=e.split(","),$(".news-categorie").each(function(){var e=$(this),t=e.data("categorie");n.includes(""+t)&&e.toggleClass("active")})),$(".reset-news-filter").click(function(e){e.preventDefault();var t=location.href.split("?")[0];window.location.href=t})});
//# sourceMappingURL=news-dist.js.map
!function(i){i(document).ready(function(){i(".equal-height").matchHeight(),i(".powermail_fieldwrap").matchHeight(),i(".donation-action-box").matchHeight(),i(".powermail_submit").on("click",function(){i(".powermail_fieldwrap").matchHeight(),setTimeout(function(){i(".powermail_fieldwrap").matchHeight()},500)})})}(jQuery);
//# sourceMappingURL=matchHeight-dist.js.map
!function(r){r(function(){window.show_sharrif=function(){r(".page-shariff-buttons").show()},window.hide_sharrif=function(){r(".page-shariff-buttons").hide(),r(".page-shariff-buttons").removeClass("active"),r("#shariffTrigger").show()};var f=0;r(window).scroll(function(i){var s=r(this).scrollTop();f<s?r(".page-shariff-buttons").is(":visible")&&hide_sharrif():r(".page-shariff-buttons").is(":visible")||show_sharrif(),f=s}),0<r(".page-shariff-buttons").length&&(r("body").append('<div id="shariffTrigger"><i class="fas fa-share-alt"></i></div>'),r("#shariffTrigger").insertBefore(".page-shariff-buttons"),r("#shariffTrigger").click(function(){r(".page-shariff-buttons").show(),r("#shariffTrigger").hide(),r(".page-shariff-buttons").addClass("active")}))})}(jQuery);
//# sourceMappingURL=sharrif-dist.js.map
!function(a){a(function(){if(0<a("#faq-overlay").length){var i=a("#faq-overlay"),o=a("#faq-overlay-list");window.show_faq_overlay_list=function(){o.show(),o.addClass("info-visible")},window.hide_faq_overlay_list=function(){o.hide(),o.removeClass("info-visible")},i.fadeIn()}})}(jQuery);
//# sourceMappingURL=popupoverlay-dist.js.map
function initAccordionInline(){$(".accordion-inline").each(function(n,i){$(this).append('<div class="pseudoElement"></div>')}),$(".accordion-inline .pseudoElement").click(function(){$(this).parent(".accordion-inline").toggleClass("opened")})}$(document).ready(function(){initAccordionInline()});
//# sourceMappingURL=accordion-inline-dist.js.map
/**
 * jQuery FocusPoint; version: 1.1.1
 * Author: http://jonathonmenz.com
 * Source: https://github.com/jonom/jquery-focuspoint
 * Copyright (c) 2014 J. Menz; MIT License
 * @preserve
 */
!function($){var t={reCalcOnWindowResize:!0,throttleDuration:17},n=function(t){var n=t.find("img").attr("src");t.data("imageSrc",n),i(n,function(n,i){t.data({imageW:i.width,imageH:i.height}),r(t)})},i=function(t,n){$("<img />").one("load",function(){n(null,{width:this.width,height:this.height})}).attr("src",t)},a=function(t,n){var i=!1;return function(){var a=Array.prototype.slice.call(arguments,0);return i?!1:(i=!0,void setTimeout(function(){i=!1,t.apply(null,a)},n))}},o=function(t,n,i,a,o){var r=Math.floor(n/2),e=(a+1)/2,u=Math.floor(i/t),f=Math.floor(e*u);o&&(f=u-f);var c=f-r,s=u-f,h=n-r;return h>s&&(c-=h-s),0>c&&(c=0),-100*c/n+"%"},r=function(t){var i=t.data("imageW"),a=t.data("imageH"),r=t.data("imageSrc");if(!i&&!a&&!r)return n(t);var e=t.width(),u=t.height(),f=parseFloat(t.data("focusX")),c=parseFloat(t.data("focusY")),s=t.find("img").first(),h=0,d=0;if(!(e>0&&u>0&&i>0&&a>0))return!1;var l=i/e,w=a/u;s.css({"max-width":"","max-height":""}),i>e&&a>u&&s.css(l>w?"max-height":"max-width","100%"),l>w?h=o(w,e,i,f):w>l&&(d=o(l,u,a,c,!0)),s.css({top:d,left:h})},e=$(window),u=function(t,n){var i=n.throttleDuration?a(function(){r(t)},n.throttleDuration):function(){r(t)},o=!1;return r(t),{adjustFocus:function(){return r(t)},windowOn:function(){return o?void 0:(e.on("resize",i),o=!0)},windowOff:function(){return o?(e.off("resize",i),o=!1,!0):void 0}}};$.fn.focusPoint=function(n){if("string"==typeof n)return this.each(function(){var t=$(this);t.data("focusPoint")[n]()});var i=$.extend({},t,n);return this.each(function(){var t=$(this),n=u(t,i);t.data("focusPoint")&&t.data("focusPoint").windowOff(),t.data("focusPoint",n),i.reCalcOnWindowResize&&n.windowOn()})},$.fn.adjustFocus=function(){return this.each(function(){r($(this))})}}(jQuery);
if ($('#commentBoxSetup').length > 0) {
    initTincyMCE();
}
function initTincyMCE() {
    var tools = $('#commentBoxSetup').val();
    if (tools) {
        tinymce.init({
            selector: 'textarea#comment',
            height: 350,
            menubar: false,
            resize: false,
            branding: false,
            plugins: [
                'advlist lists',
                'searchreplace visualblocks'
            ],
            relative_urls : 0,
            // remove_script_host : 0,
            toolbar: tools,
            setup: function (ed) {
                ed.on("blur", function () {
                    var editorContent = tinyMCE.get('comment').getContent();
                    if ($.trim(editorContent) == '') {
                        $( ".tox" ).append( '<div class="error-msg" style="display:block;" id="comment_error"><p>Comment Is Required!</p></div>' );
                        $(".tx_nsnewscomments #comment").parent().addClass('has-error');
                    } else {
                        $(".tx_nsnewscomments #comment").parent().removeClass('has-error'); // remove it
                        $(".tx_nsnewscomments #comment_error").hide();
                    }
                })
            }
        });
    }
}
$(function() {
    submitnewsComment();
    hashnewsValue();
    onFocusnewsValidation();
    $parentCommentId = '';
    replynewsComment();

    if ($('.tx_nsnewscomments .approvedmessage').length) {
        $('html, body').stop().animate({
            scrollTop: ($('.tx_nsnewscomments .approvedmessage').offset().top)
        }, 2000);
        setTimeout(function() {
            $('.tx_nsnewscomments .approvedmessage').fadeOut("slow");
        }, 9000);
    }

    if ($('.approvenewscomment').length) {
        shownewspopup();
    }
    $(document).on('click',".approvenewscomment #cancel_button", function (){
        hidenewspopup();
    });
    $(document).on('click',".approvenewscomment #close_button", function(){
        hidenewspopup();
    });
    if ($(".inputfile").length > 0) {
        setDefaultImageTypes($(".inputfile"));
    }
    var fromMail = GetURLParameter('frommail');
    if (fromMail) {
        $('.comment-btn.reply').show();
        var hashComment = window.location.hash.substr(1);//This pulls the value of the input/URL with parameters
        var parentCommentId = hashComment.replace(/[^0-9]/g,'');
        var commentHTML = $('.active-comment-form').html();
        $('.active-comment-form .comment-form')[0].reset();
        $('.active-comment-form').html('');
        $('.active-comment-form').removeClass('active-comment-form');
        $('#reply-form-' + parentCommentId).append(commentHTML);
        $('#reply-form-' + parentCommentId).addClass('active-comment-form');
        $('#comment-form-close-btn').show();
        removeDefaultValidation();

        // Scroll to form position
        $('html, body').stop().animate({
            scrollTop: ($('.tx_nsnewscomments #reply-form-' + parentCommentId).offset().top)
        }, 1000);

        // Set hidden parentId
        $('.tx_nsnewscomments #parentId').val(parentCommentId);
        onFocusnewsValidation();
    }
});

function imNotARobotnews() {
    if (grecaptcha.getResponse() == "") {
        $(".tx_nsnewscomments #googlecaptcha").closest('.ns-form-group').addClass('has-error');
        $(".tx_nsnewscomments #googlecaptcha_error").show();
        return false;
    } else {
        $(".tx_nsnewscomments #googlecaptcha").closest('.ns-form-group').removeClass('has-error');
        $(".tx_nsnewscomments #googlecaptcha_error").hide();
    }
};

$(".popup-star-rating").each(function() {
    var initRat = 0;
    if($(this).data('rat') > 0){
        var initRat = $(this).data('rat');
    }
    $(this).barrating({
        theme: 'css-stars',
        showSelectedRating: false,
        allowEmpty: true,
        emptyValue: 0,
        initialRating:initRat
    });
});
var formRating = $('.form-star-rating');
$(".form-comment-star-rating").each(function() {
    var initRat = 0;
    if($(this).data('rat') > 0){
        var initRat = $(this).data('rat');
    }
    $(this).barrating({
        theme: 'css-stars',
        showSelectedRating: false,
        allowEmpty: true,
        emptyValue: 0,
        initialRating:initRat,
        readonly: true
    });
});

if(formRating.length > 0){
    formRating.barrating({
        theme: 'css-stars',
        showSelectedRating: false,
        allowEmpty: true,
        emptyValue: 0,
        initialRating:1
    });
}


$('.popup-star-rating').on('change', function() {
    var commentUid = $(this).data('uid');
    var updateUrl = $(this).data('link');
    
    if ($.cookie('ratingChange_' + commentUid)){
        $("#exist-"+commentUid).show();
        $("#success-"+commentUid).hide();
    }
    else{
        $.ajax({
            url: updateUrl,
            method: 'post',
            data : { val : this.value },
            success:function (res) {
                data = JSON.parse(res);
                $("#exist-"+data['out']).hide();
                $("#success-"+data['out']).show();
            },
            error:function (xhr, anscount, thrownError){
                if(xhr.status==404 && xhr.responseText) {
                    data = JSON.parse(xhr.responseText);
                    $("#exist-"+data['out']).hide();
                    $("#success-"+data['out']).show(); 
                }
            }
        });
    }
});

function refreshrenewscaptcha() {
    var googlecaptcha = document.getElementById("googlecaptcha");
    if (googlecaptcha) {
        setTimeout(function () {
            $('.g-recaptcha').html('');
            sitekey = $('.googlecaptchakey').data('googlesitekey');
            grecaptcha.render("googlecaptcha", {
                "sitekey": sitekey
            });
            grecaptcha.reset();
        }, 300);
    }
};

// Show popup div
function shownewspopup()
{
    $(".approvenewscomment #popup_box").fadeToggle();
    $(".approvenewscomment #popup_box").css({"visibility":"visible","display":"block"});
}

// Hide popup div
function hidenewspopup()
{
    $(".approvenewscomment #popup_box").fadeToggle();
    $(".approvenewscomment #popup_box").css({"visibility":"hidden","display":"none"});
}

function replynewsComment() {
    $(document).on("click", '.ns-news-comment-reply', function(event) {
        var parentCommentId = $(this).parent().attr('id');
        $('#'+ parentCommentId + ' .comment-btn.reply').hide();
        var tools = $('#commentBoxSetup').val();
        if (tools) {
            tinyMCE.remove();
            initTincyMCE();
        }
        clearFormFields();
        refreshrenewscaptcha();
    });
}

// Scroll to paramlink
function hashnewsValue() {
    // get hash value
    var hash = window.location.hash;
    // now scroll to element with that id
    if (hash != '') {
        $('html, body').stop().animate({
            scrollTop: ($(hash).offset().top)
        }, 2000);
    }
}

// Submit form using ajax
function submitnewsComment() {
    // Submit comment
    $(document).on('submit', '.tx_nsnewscomments #comment-form', function(event) {
        var captcha = $('.tx_nsnewscomments #captcha').val();
        var ajaxURL = $(this).attr('action');
        var datatype = $('.tx_nsnewscomments #dataType').val();
        var commentHTML = $('.active-comment-form').html();
        let formData = new FormData(this);
        if (!event.isDefaultPrevented()) {
            if (validatenewsField()) {
                $.ajax({
                    type: 'POST',
                    url: ajaxURL,
                    contentType: false,
                    cache: false,
                    processData: false,
                    data: formData,
                    dataType: datatype,
                    beforeSend: function() {
                        $('.tx_nsnewscomments #submit').attr('disabled', true);
                        $('.tx_nsnewscomments #submit').css('cursor', 'default');
                    },
                    success: function(response) {
                        if(response.status == 'limitReached'){
                            $(".tx_nsnewscomments #cookie_error").addClass('has-error');
                            $('.tx_nsnewscomments #cookie_error').show();
                        }else {
                            $(".tx_nsnewscomments #cookie_error").removeClass('has-error');
                            $(".tx_nsnewscomments #cookie_error").hide();
                        }
                        if ($('.tx_nsnewscomments #approval').val() == 0) {
                            // GET HTML for comment list
                            $(".tx_nsnewscomments #comments-list").load(location.href + " .tx_nsnewscomments #comments-list>*", function(responseTxt, statusTxt, jqXHR) {
                               if(statusTxt == "success"){
                                $(".popup-star-rating").each(function() {
                                    var initRat = 0;
                                    if($(this).data('rat') > 0){
                                        var initRat = $(this).data('rat');
                                    }
                                    $(this).barrating({
                                        theme: 'css-stars',
                                        showSelectedRating: false,
                                        allowEmpty: true,
                                        emptyValue: 0,
                                        initialRating:initRat
                                    });
                                });
                                
                                
                                $(".form-comment-star-rating").each(function() {
                                    var initRat = 0;
                                    if($(this).data('rat') > 0){
                                        var initRat = $(this).data('rat');
                                    }
                                    $(this).barrating({
                                        theme: 'css-stars',
                                        showSelectedRating: false,
                                        allowEmpty: true,
                                        emptyValue: 0,
                                        initialRating:initRat,
                                        readonly: true
                                    });
                                });
                                $('.popup-star-rating').on('change', function() {
                                    var commentUid = $(this).data('uid');
                                    var updateUrl = $(this).data('link');
                                    if ($.cookie('ratingChange_' + commentUid)){
                                        $("#exist-"+commentUid).show();
                                        $("#success-"+commentUid).hide();
                                    }
                                    else{
                                        $.ajax({
                                            url: updateUrl,
                                            method: 'post',
                                            data : { val : this.value },
                                            success:function (res) {
                                                data = JSON.parse(res);
                                                $("#exist-"+data['out']).hide();
                                                $("#success-"+data['out']).show();
                                            },
                                            error:function (xhr, anscount, thrownError){
                                                if(xhr.status==404 && xhr.responseText) {
                                                    data = JSON.parse(xhr.responseText);
                                                    $("#exist-"+data['out']).hide();
                                                    $("#success-"+data['out']).show(); 
                                                }
                                            }
                                        });
                                    }
                                });
                                    // Scroll to comment
                                    $.each(response, function(key, val) {
                                        if (val.parentId == '') {
                                            $('.tx_nsnewscomments .thanksmsg').show();
                                            $('html, body').stop().animate({
                                                scrollTop: ($('.tx_nsnewscomments .thanksmsg').offset().top)
                                            }, 2000);
                                            setTimeout(function() {
                                                $('.tx_nsnewscomments .thanksmsg').fadeOut("slow");
                                            }, 7000);
                                        } else {

                                            $('.tx_nsnewscomments .thanksmsg-' + val.parentId).show();
                                            $('html, body').stop().animate({
                                                scrollTop: ($('.tx_nsnewscomments .thanksmsg-' + val.parentId).offset().top)
                                            }, 2000);
                                            setTimeout(function() {
                                                $('.tx_nsnewscomments .thanksmsg-' + val.parentId).fadeOut("slow");
                                            }, 7000);
                                            $('.tx_nsnewscomments #comments-' + val.parentId).fadeIn('slow');
                                            $('.tx_nsnewscomments #parentId').val('');
                                        }
                                    });
                                }
                                if(statusTxt == "error"){
                                    alert("Error: " + jqXHR.status + " " + jqXHR.statusText);
                                }
                            });
                        } else {
                            try {
                                data = JSON.parse(response);
                                if (data.status == 'success') {
                                    $('.tx_nsnewscomments .approve').show();
                                    $('html, body').stop().animate({
                                        scrollTop: ($('.tx_nsnewscomments .approve').offset().top)
                                    }, 2000);
                                    setTimeout(function () {
                                        $('.tx_nsnewscomments .approve').fadeOut("slow");
                                    }, 7000);
                                } else if (data.status ==='securityerror') {
                                    $('.tx_nsnewscomments .security-error .ns-alert-error').html(data.errormsg);
                                    $('.tx_nsnewscomments .security-error').show();
                                    $('html, body').stop().animate({
                                        scrollTop: ($('.tx_nsnewscomments .security-error').offset().top)
                                    }, 2000);
                                    setTimeout(function () {
                                        $('.tx_nsnewscomments .security-error').fadeOut("slow");
                                    }, 7000);
                                } else {
                                    commentError();
                                }
                            } catch (e) {
                                commentError();
                            }
                        }
                    },
                    error: function(jqXHR, textStatus, errorThrown) {
                        alert(textStatus + " " + errorThrown);
                    },
                    complete: function(response) {
                        $('.tx_nsnewscomments #comment-form')[0].reset();
                        var tools = $('#commentBoxSetup').val();
                        if (tools) {
                            tinyMCE.remove();
                        }
                        var captcha = document.getElementById("captcha");
                        if(captcha){
                            refreshCaptcha();
                        }
                        $('.tx_nsnewscomments #submit').attr('disabled', false);
                        $('.tx_nsnewscomments #submit').css('cursor', 'pointer');
                        if(formRating.length > 0){
                            formRating.barrating('clear');
                        }
                        addnewsForm();
                        clearFormFields();
                        initTincyMCE();
                    },
                });
                event.preventDefault();
            } else {
                return false;
            }
        }
    });

    // Reply form
    $(document).on("click", '.tx_nsnewscomments .reply', function(event) {
        $('.comment-btn.reply').show();
        var parentCommentId = $(this).parent().attr('id');
        $('.active-comment-form').find('.tox-tinymce').remove();
        var commentHTML = $('.active-comment-form').html();
        $('.active-comment-form .comment-form')[0].reset();
        $('.active-comment-form').html('');
        $('.active-comment-form').removeClass('active-comment-form');
        $(this).parent().parent().parent().parent().find('#reply-form-' + parentCommentId).append(commentHTML);
        $(this).parent().parent().parent().parent().find('#reply-form-' + parentCommentId).addClass('active-comment-form');
        $('#comment-form-close-btn').show();
        $('.br-widget').remove();
    
        $('.form-star-rating').each(function(e) {
            $(this).barrating({
                theme: 'css-stars',
                showSelectedRating: false,
                allowEmpty: true,
                emptyValue: 0,
                initialRating:1
            });
        });
        removeDefaultValidation();

        // Scroll to form position
        $('html, body').stop().animate({
            scrollTop: ($('.tx_nsnewscomments #reply-form-' + parentCommentId).offset().top)
        }, 1000);

        // Set hidden parentId
        $('.tx_nsnewscomments #parentId').val(parentCommentId);
        onFocusnewsValidation();
    });

    // Close form
    $(document).on("click", ".tx_nsnewscomments #comment-form-close-btn", function(event) {
        var parentCommentIdClose = $('#parentId').val();
        $('#'+ parentCommentIdClose + ' .comment-btn.reply').show();
        addnewsForm();
    });
}

// Open form on close button click
function addnewsForm() {
    var commentHTML = $('.active-comment-form').html();
    $('.tx_nsnewscomments .active-comment-form').html('');
    $('.tx_nsnewscomments .active-comment-form').removeClass('active-comment-form');
    $('.tx_nsnewscomments #form-comment-view').html(commentHTML);
    $('.br-widget').remove();
    $('.tx_nsnewscomments #form-comment-view').addClass('active-comment-form');
    $('.form-star-rating').each(function(e) {
        $(this).barrating({
            theme: 'css-stars',
            showSelectedRating: false,
            allowEmpty: true,
            emptyValue: 0,
            initialRating:1
        });
    });
    $('.tx_nsnewscomments #comment-form-close-btn').hide();
    $('.tx_nsnewscomments #parentId').val('');
    removeDefaultValidation();
    onFocusnewsValidation();
    refreshrenewscaptcha();
}

function commentError() {
    $('.tx_nsnewscomments .approve-error').show();
    $('html, body').stop().animate({
        scrollTop: ($('.tx_nsnewscomments .approve-error').offset().top)
    }, 2000);
    setTimeout(function () {
        $('.tx_nsnewscomments .approve-error').fadeOut("slow");
    }, 7000);
}

// Custom Validation
function validatenewsField() {
    var flag = 1;
    var elementObj;
    var captcha = document.getElementById("captcha");
    var googlecaptcha = document.getElementById("googlecaptcha");
    var terms = document.getElementsByName('tx_nsnewscomments_newscomment[newComment][terms]').length;
    let filesize = 0;
    var tools = $('#commentBoxSetup').val();

    if (!$('.tx_nsnewscomments #name').val()) {
        $(".tx_nsnewscomments #name").parent().addClass('has-error');
        $('.tx_nsnewscomments #name_error').show();
        var flag = 0;
    } else {
        if (!validateName($('.tx_nsnewscomments #name').val())) {
            $(".tx_nsnewscomments #name_error_msg").show();
            $(".tx_nsnewscomments #name_error").hide();
            $(".tx_nsnewscomments #name").parent().addClass('has-error');
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #name").parent().removeClass('has-error');
            $(".tx_nsnewscomments #name_error_msg").hide();
            $(".tx_nsnewscomments #name_error").hide();
        }
    }

    if (!$('.tx_nsnewscomments #email').val()) {
        $(".tx_nsnewscomments #email").parent().addClass('has-error');
        $(".tx_nsnewscomments #email_error").show();
        $(".tx_nsnewscomments #email_error_msg").hide();
        var flag = 0;
    } else {
        if (!validateEmail($('.tx_nsnewscomments #email').val())) {
            $(".tx_nsnewscomments #email_error_msg").show();
            $(".tx_nsnewscomments #email_error").hide();
            $(".tx_nsnewscomments #email").parent().addClass('has-error');
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #email").parent().removeClass('has-error');
        }
    }

    if (!$('.tx_nsnewscomments #comment').val() && (tools == null)) {
        $(".tx_nsnewscomments #comment").parent().addClass('has-error');
        $(".tx_nsnewscomments #comment_error").show();
        var flag = 0;
    } else if($('.tx_nsnewscomments #comment').val() && (tools == null)){
        var length = $.trim($(".tx_nsnewscomments #comment").val()).length;
        if (length == 0) {
            $(".tx_nsnewscomments #comment_error").show();
            $(".tx_nsnewscomments #comment").parent().addClass('has-error');
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #comment").parent().removeClass('has-error'); // remove it
        }
    } else if(!$('.tx_nsnewscomments #comment').val() && (tools != null)) {
        $( ".tox" ).append( '<div class="error-msg" style="display:block;" id="comment_error"><p>Comment Is Required!</p></div>' );
        $(".tx_nsnewscomments #comment").parent().addClass('has-error');
    } else {
        $(".tx_nsnewscomments #comment").parent().removeClass('has-error'); // remove it
    }

    if(captcha){
        if (!$('.tx_nsnewscomments #captcha').val()) {
            $(".tx_nsnewscomments #captcha").parent().addClass('has-error');
            $(".tx_nsnewscomments #captcha_error").show();
            $(".tx_nsnewscomments #captcha_valid_error").hide();
            var flag = 0;
        } else {
            if (validateCaptcha($('.tx_nsnewscomments #captcha').val()) == 'true') {
                $(".tx_nsnewscomments #captcha").parent().removeClass('has-error'); // remove it
            } else {
                $(".tx_nsnewscomments #captcha_valid_error").show();
                $(".tx_nsnewscomments #captcha_error").hide();
                $(".tx_nsnewscomments #captcha").parent().addClass('has-error');
                var flag = 0;
            }
        }
    }

    if (terms) {
        if ( !$('.tx_nsnewscomments input[name="tx_nsnewscomments_newscomment[newComment][terms]"]:checked').length ) {
            $(".tx_nsnewscomments #terms").closest('.ns-form-group').addClass('has-error');
            $(".tx_nsnewscomments #terms_error").show();
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #terms").closest('.ns-form-group').removeClass('has-error');
            $(".tx_nsnewscomments #terms_error").hide();
        }
    }

    if (googlecaptcha) {
        if (grecaptcha.getResponse() == "") {
            $(".tx_nsnewscomments #googlecaptcha").closest('.ns-form-group').addClass('has-error');
            $(".tx_nsnewscomments #googlecaptcha_error").show();
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #googlecaptcha").closest('.ns-form-group').removeClass('has-error');
            $(".tx_nsnewscomments #googlecaptcha_error").hide();
        }
    }

    if($('#customfileupload').length > 0) {
        let fileField = $('#customfileupload')[0];
        let fileLength = fileField.files.length;
        let files = fileField.files;
        for (var x = 0; x < fileLength; x++) {
            filesize += files[x].size;
        }

        if(filesize > imageMaxSize){
            var flag = 0;
            $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').addClass('has-error');
            $('.tx_nsnewscomments #maxsize_error').show();
        } else {
            $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').removeClass('has-error');
            $('.tx_nsnewscomments #maxsize_error').hide();
        }
    }

    if ($('.error-msg-red').length) {
        var flag = 0;
    }

    if (flag == 1) {
        return true;
    }
    return false;
}

// Custom validation for onfocus
function onFocusnewsValidation() {
    var tools = $('#commentBoxSetup').val();
    $(".tx_nsnewscomments #name").focusout(function() {
        elementObj = $(this);
        if (elementObj.val() != '') {
            if (!validateName($('.tx_nsnewscomments #name').val())) {
                $(".tx_nsnewscomments #name_error_msg").show();
                $(".tx_nsnewscomments #name_error").hide();
                $(".tx_nsnewscomments #name").parent().addClass('has-error');
                var flag = 0;
            } else {
                elementObj.parent().removeClass('has-error');
                $(".tx_nsnewscomments #name_error_msg").hide();
                $(".tx_nsnewscomments #name_error").hide();
            }
        } else {
            $(".tx_nsnewscomments #name").parent().addClass('has-error');
            $(".tx_nsnewscomments #name_error").show();
            $(".tx_nsnewscomments #name_error_msg").hide();
        }
    });

    $(".tx_nsnewscomments #email").focusout(function() {
        elementObj = $(this);
        if (elementObj.val() != '') {
            if (!validateEmail($('.tx_nsnewscomments #email').val())) {
                $(".tx_nsnewscomments #email_error_msg").show();
                $(".tx_nsnewscomments #email_error").hide();
                $(".tx_nsnewscomments #email").parent().addClass('has-error');
                var flag = 0;
            } else {
                elementObj.parent().removeClass('has-error');
                $(".tx_nsnewscomments #email_error_msg").hide();
                $(".tx_nsnewscomments #email_error").hide();
            }
        } else {
            $(".tx_nsnewscomments #email").parent().addClass('has-error');
            $(".tx_nsnewscomments #email_error").show();
            $(".tx_nsnewscomments #email_error_msg").hide();
        }
    });

    if (!$('.tx_nsnewscomments #comment').val() && (tools == null)) {
    $(".tx_nsnewscomments #comment").focusout(function() {
        elementObj = $(this);
        if (elementObj.val() != '') {
            var length = $.trim($(".tx_nsnewscomments #comment").val()).length;
            if (length == 0) {
                $(".tx_nsnewscomments #comment_error").show();
                $(".tx_nsnewscomments #comment").parent().addClass('has-error');
                var flag = 0;
            } else {
                $(".tx_nsnewscomments #comment").parent().removeClass('has-error'); // remove it
                $(".tx_nsnewscomments #comment_error").hide();
            }

        } else {
            $(".tx_nsnewscomments #comment").parent().addClass('has-error');
            $(".tx_nsnewscomments #comment_error").show();
        }
    });
    }
    $(".tx_nsnewscomments #captcha").focusout(function() {
        elementObj = $(this);
        if (elementObj.val() != '') {
            var length = $.trim($(".tx_nsnewscomments #captcha").val()).length;
            if (length == 0) {
                $(".tx_nsnewscomments #captcha_error").show();
                $(".tx_nsnewscomments #captcha").parent().addClass('has-error');
                var flag = 0;
            } else {
                $(".tx_nsnewscomments #captcha").parent().removeClass('has-error'); // remove it
                $(".tx_nsnewscomments #captcha_error").hide();
                $(".tx_nsnewscomments #captcha_valid_error").hide();
            }
        } else {
            $(".tx_nsnewscomments #captcha").parent().addClass('has-error');
            $(".tx_nsnewscomments #captcha_error").show();
        }
    });

    $('.tx_nsnewscomments input[name="tx_nsnewscomments_newscomment[newComment][terms]"]').on('change', function(){
        if ( !$('.tx_nsnewscomments input[name="tx_nsnewscomments_newscomment[newComment][terms]"]:checked').length ) {
            $(".tx_nsnewscomments #terms").closest('.ns-form-group').addClass('has-error');
            $(".tx_nsnewscomments #terms_error").show();
            var flag = 0;
        } else {
            $(".tx_nsnewscomments #terms").closest('.ns-form-group').removeClass('has-error');
            $(".tx_nsnewscomments #terms_error").hide();
        }
    });

}

// Remove Default Validation in reply form
function removeDefaultValidation() {
    $(".tx_nsnewscomments #name").parent().removeClass('has-error'); // remove it
    $(".tx_nsnewscomments #name_error").hide();
    $(".tx_nsnewscomments #name_error_msg").hide();

    $(".tx_nsnewscomments #email").parent().removeClass('has-error');
    $(".tx_nsnewscomments #email_error").hide();
    $(".tx_nsnewscomments #email_error_msg").hide();

    $(".tx_nsnewscomments #comment").parent().removeClass('has-error');
    $(".tx_nsnewscomments #comment_error").hide();

    $(".tx_nsnewscomments #captcha").parent().removeClass('has-error');
    $(".tx_nsnewscomments #captcha_error").hide();
    $(".tx_nsnewscomments #captcha_valid_error").hide();

    $(".tx_nsnewscomments .googlecaptcha").removeClass('has-error');
    $(".tx_nsnewscomments #googlecaptcha_error").hide();

    $(".tx_nsnewscomments #terms").parent().removeClass('has-error');
    $(".tx_nsnewscomments #terms_error").hide();
}

// Validate Captcha field using ajax request
function validateCaptcha(captcha) {

    var dataString = 'captcha=' + captcha;
    var url = $('.verification').val();
    var response = $.ajax({
        type: 'POST',
        async: false,
        url: url,
        data: dataString,
        success: function(response) {

        },
        error: function() {
            alert('Captcha not Mathched');
        }
    });
    return response.responseText;
}

// Validate Email field
function validateEmail($email) {
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    return emailReg.test($email);
}

// Validate Name field
function validateName($name) {
    var nameReg = /[^0-9]/g;
    return nameReg.test($name);
}

// Referech Captcha
function refreshCaptcha() {
    var img = document.images['captchaimg'];
    img.src = img.src.substring(0, img.src.lastIndexOf("?")) + "?rand=" + Math.random() * 1000;
}

$(document).on('change', '#customfileupload', function () {
    var items = $(this)[0].files;
    var filesize = 0;
    let typesArray = imageTypes.split(" ").join("").split(',');
    var allowedTypes = [];
    var realType = items["0"].type.substring(items["0"].type.indexOf("/") + 1);
    var find = ["+xml", "vnd.openxmlformats-officedocument.wordprocessingml.document"];
    var replace = ["", "docx"];
    realType = realType.replaceArray(find, replace);
    $(typesArray).each(function (g, h) {
        allowedTypes.push(h.split(" ").join(' +'));
    });
    let fileField = $('#customfileupload')[0];
    let fileLength = fileField.files.length;
    let files = fileField.files;
    for (var x = 0; x < fileLength; x++) {
        filesize += files[x].size;
    }

    if(filesize > imageMaxSize){
        var flag = 0;
        $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').addClass('has-error');
        $('.tx_nsnewscomments #maxsize_error').show();
    } else {
        $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').removeClass('has-error');
        $('.tx_nsnewscomments #maxsize_error').hide();
    }
    if (items["0"].type === "" || allowedTypes.indexOf(realType.replace('+xml','')) === -1) {
        $(this).find('label').css('border', '1px dashed #f32649');
    } else {
        $(this).find('label').css('border', '1px dashed #2a8704');
        upload($(this)[0].files);
    }
});

//Drag & Drop Functions for the files
$(document).on('dragover', '.custom-file-upload', function (e) {
    e.preventDefault();
    e.stopPropagation();
    var items = e.originalEvent.dataTransfer.items;
    let typesArray = imageTypes.split(" ").join("").split(',');
    var allowedTypes = [];
    var realType = items["0"].type.substring(items["0"].type.indexOf("/") + 1);

    var find = ["+xml", "vnd.openxmlformats-officedocument.wordprocessingml.document"];
    var replace = ["", "docx"];
    realType = realType.replaceArray(find, replace);
    $(typesArray).each(function (g, h) {
        allowedTypes.push(h.split(" ").join(' +'));
    });
    $.each(items,function (k,v){
        if (items[k].kind !== "file" || items[k].type === "" || allowedTypes.indexOf(realType.replace('+xml','')) === -1) {
            $(this).find('label').css('border', '1px dashed #f32649');
            e.originalEvent.dataTransfer.dropEffect = "none";
            $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').addClass('has-error');
            $('.tx_nsnewscomments #invalidfile_error').show();
        }
    })
});

$(document).on('dragenter', '.custom-file-upload', function (e) {
    e.preventDefault();
    e.stopPropagation();
});

$(document).on('drop', '.custom-file-upload', function (e) {
    if (e.originalEvent.dataTransfer) {
        if (e.originalEvent.dataTransfer.files.length) {
            var filesize = 0;
            e.preventDefault();
            e.stopPropagation();
            /*UPLOAD FILES HERE*/
            var items = e.originalEvent.dataTransfer.items;
            let typesArray = imageTypes.split(" ").join("").split(',');
            var allowedTypes = [];
            var realType = items["0"].type.substring(items["0"].type.indexOf("/") + 1);
            var find = ["+xml", "vnd.openxmlformats-officedocument.wordprocessingml.document"];
            var replace = ["", "docx"];

            realType = realType.replaceArray(find, replace);
            $(typesArray).each(function (g, h) {
                allowedTypes.push(h.split(" ").join(' +'));
            });
            let fileLength = e.originalEvent.dataTransfer.files.length;
            let files = e.originalEvent.dataTransfer.files;
            for (var x = 0; x < fileLength; x++) {
                filesize += files[x].size;
            }
            if(filesize > imageMaxSize){
                $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').addClass('has-error');
                $('.tx_nsnewscomments #maxsize_error').show();
            } else {
                $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').removeClass('has-error');
                $('.tx_nsnewscomments #maxsize_error').hide();
            }
            if (items["0"].kind !== "file" || items["0"].type === "" || allowedTypes.indexOf(realType.replace('+xml','')) === -1) {
                $(this).find('label').css('border', '1px dashed #f32649');
            } else {
                $(this).find('label').css('border', '1px dashed #2a8704');
                uploadDrop(e.originalEvent.dataTransfer.files);
                $('.tx_nsnewscomments #customfileupload').closest('.ns-form-group').removeClass('has-error');
                $('.tx_nsnewscomments #invalidfile_error').hide();
            }
        }
    }
});


function upload(files) {
    $('#file-label').text(files.length + " " + selectedLLL);
    imagesPreview(document.getElementById('customfileupload'), 'div#nsnewscomment-screenshot-group');
}

function uploadDrop(files) {
    $('#file-label').text(files.length + " " + selectedLLL);
    $("#customfileupload")[0].files = files;
    imagesPreview(document.getElementById('customfileupload'), 'div#nsnewscomment-screenshot-group');
}

let imagesPreview = function (input, placeToInsertImagePreview) {
    let filesize = 0;
    if (input.files) {
        $('.screenshot-group').css('display', 'inline-block');
        $(placeToInsertImagePreview).html('');
        let filesAmount = input.files.length;
        let _i = 0;
        for (let i = 0; i < filesAmount; i++) {
            _i = i;
            let name = input.files[i].name;
            filesize += input.files[i].size;
            let reader = new FileReader();
            reader.onload = (function (index) {
                return function (e) {
                    let html = '<div class="screenshot-block">';
                    var allowedTypes = ['png','svg','jpg','jpeg','webm','gif'];
                    var realType = input.files[index].type.substring(input.files[index].type.indexOf("/") + 1);
                    if (allowedTypes.indexOf(realType.replace('+xml','')) === -1) {
                        html += '<img src="' + pdfIcon + '" alt="" width="57px" height="57px" />';
                    } else {
                        html += '<img src="' + e.target.result + '" alt="" width="57px" height="57px" />';
                    }
                    html += ' <span>' + input.files[index].name + '</span>';
                    html += '</div>';
                    $($.parseHTML(html)).appendTo(placeToInsertImagePreview);
                };
            })(_i);
            reader.readAsDataURL(input.files[i]);
        }
    }
};

function setDefaultImageTypes(elem) {
    if (elem.length > 0) {
        let typesArray = imageTypes.split(" ").join("").split(',');
        var allowedTypes = [];
        $(typesArray).each(function (g, h) {
            allowedTypes.push("." + h.split(" ").join(' +'));
        });
        elem.attr('accept', allowedTypes.toString());
    }
}

function GetURLParameter(sParam)
{
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');
    for (var i = 0; i < sURLVariables.length; i++)
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam)
        {
            return sParameterName[1];
        }
    }
}


function clearFormFields () {
    var html = '';
    $('.screenshot-group').hide();
    $("#file-label").text('Drop files to upload, or');
    $(".custom-file-upload label").css('border', '1px dashed #999999');
}

$(document).on('submit','#confirmForm',function (e){
    e.preventDefault();

});

$(document).on('click', '.confirmButton', function (){
    url = $("#actionUrl").attr('href');
    $.ajax({
        url: url,
        method:'post',
        data: {confirm: $(this).data('value'), Accesstoken:$(this).data('accesstoken')},
        success: function (data) {
            $('.approvenewscomment #popup_box').remove();
            $('.approvenewscomment').html(data);
            shownewspopup();
        }
    })
})
String.prototype.replaceArray = function(find, replace) {
    var replaceString = this;
    for (var i = 0; i < find.length; i++) {
        replaceString = replaceString.replace(find[i], replace[i]);
    }
    return replaceString;
};

// Start Comment Like/Dislike Code.....

$(document).ready(function(){

    $('.commentLikes').each(function(e) {
        var idForComment = $(this).data('uid');
        var checkupdownvalue = $(this).data('pid');

        if ($.cookie('rateLikeChange_' + idForComment)){
            if (checkupdownvalue == '1'){
                $(".rate_id_"+idForComment).attr('disabled', 'disabled');
                $(".rate_dislike_id_"+idForComment).removeAttr("disabled");
            }
            else if (checkupdownvalue == '2'){
                $(".rate_dislike_id_"+idForComment).attr('disabled', 'disabled');
                $(".rate_id_"+idForComment).removeAttr("disabled");
            }
        }
        else{
            $(".rate_id_"+idForComment).removeAttr("disabled");
            $(".rate_dislike_id_"+idForComment).removeAttr("disabled");
        }
    });

    $(document).on('click','#comment-like-btn', function (e) {
        var commentUid = $(this).data('uid');
        var updateUrl = $(this).data('link');
        var btnId = "comment-like-btn";
        var reaction = "1";
        $(".rate_id_"+commentUid).attr('disabled', 'disabled');
        $.ajax({
            type: "GET",
            url: updateUrl,
            success:function(anscount){
                if(anscount){
                    obj = JSON.parse(anscount);
                    $("#rate_id_"+commentUid).text(obj.voteup);
                    $("#rate_dislike_id_"+commentUid).text(obj.votedown);

                    if ($.cookie('rateLikeChange_' + commentUid))
                    {
                        $(".rate_id_"+commentUid).attr('disabled', 'disabled');
                        $(".rate_dislike_id_"+commentUid).removeAttr("disabled");
                    }
                }
            },
            error:function (xhr, anscount, thrownError){
                if(xhr.status==404 && xhr.responseText) {
                    obj = JSON.parse(xhr.responseText);
                    $("#rate_id_"+commentUid).text(obj.voteup);
                    $("#rate_dislike_id_"+commentUid).text(obj.votedown);

                    if ($.cookie('rateLikeChange_' + commentUid))
                    {
                        $(".rate_id_"+commentUid).attr('disabled', 'disabled');
                        $(".rate_dislike_id_"+commentUid).removeAttr("disabled");
                    }
                }
            }
        });
    });

    $(document).on('click','#comment-dislike-btn', function (e) {
        var commentUid = $(this).data('uid');
        var updateUrl = $(this).data('link');
        var btnId = "comment-dislike-btn";
        var reaction = "0";
        $(".rate_dislike_id_"+commentUid).attr('disabled', 'disabled');
        $.ajax({
            url: updateUrl,
            success:function (anscount) {
                if(anscount){
                    obj = JSON.parse(anscount);
                    $("#rate_dislike_id_"+commentUid).text(obj.votedown);
                    $("#rate_id_"+commentUid).text(obj.voteup);
                    
                    if ($.cookie('rateLikeChange_' + commentUid))
                    {
                        $(".rate_dislike_id_"+commentUid).attr('disabled', 'disabled');
                        $(".rate_id_"+commentUid).removeAttr("disabled");
                    }    
                }
            },
            error:function (xhr, anscount, thrownError){
                if(xhr.status==404 && xhr.responseText) {
                    obj = JSON.parse(xhr.responseText);
                    $("#rate_dislike_id_"+commentUid).text(obj.votedown);
                    $("#rate_id_"+commentUid).text(obj.voteup);
                    
                    if ($.cookie('rateLikeChange_' + commentUid))
                    {
                        $(".rate_dislike_id_"+commentUid).attr('disabled', 'disabled');
                        $(".rate_id_"+commentUid).removeAttr("disabled");
                    } 
                }
            }
        });
    });
});

// End Comment Like/Dislike Code.....
/*! jquery.cookie v1.4.1 | MIT */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function b(a){return h.raw?a:encodeURIComponent(a)}function c(a){return h.raw?a:decodeURIComponent(a)}function d(a){return b(h.json?JSON.stringify(a):String(a))}function e(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(g," ")),h.json?JSON.parse(a):a}catch(b){}}function f(b,c){var d=h.raw?b:e(b);return a.isFunction(c)?c(d):d}var g=/\+/g,h=a.cookie=function(e,g,i){if(void 0!==g&&!a.isFunction(g)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[b(e),"=",d(g),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=e?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}});
jQuery(document).ready(function(){ var focusImages = jQuery('.focuspoint'); if(focusImages.length) { focusImages.focusPoint(); } });