

/**
 * @file postscribe
 * @description Asynchronously write javascript, even with document.write.
 * @version v2.0.6
 * @see {@link https://krux.github.io/postscribe}
 * @license MIT
 * @author Derek Brans
 * @copyright 2016 Krux Digital, Inc
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.postscribe=e():t.postscribe=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(1),i=r(o);t.exports=i["default"]},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function i(){}function s(){var t=m.shift();if(t){var e=h.last(t);e.afterDequeue(),t.stream=a.apply(void 0,t),e.afterStreamStart()}}function a(t,e,n){function r(t){t=n.beforeWrite(t),g.write(t),n.afterWrite(t)}g=new p["default"](t,n),g.id=y++,g.name=n.name||g.id,u.streams[g.name]=g;var o=t.ownerDocument,a={close:o.close,open:o.open,write:o.write,writeln:o.writeln};c(o,{close:i,open:i,write:function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return r(e.join(""))},writeln:function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return r(e.join("")+"\n")}});var f=g.win.onerror||i;return g.win.onerror=function(t,e,r){n.error({msg:t+" - "+e+": "+r}),f.apply(g.win,[t,e,r])},g.write(e,function(){c(o,a),g.win.onerror=f,n.done(),g=null,s()}),g}function u(t,e,n){if(h.isFunction(n))n={done:n};else if("clear"===n)return m=[],g=null,void(y=0);n=h.defaults(n,d),t=/^#/.test(t)?window.document.getElementById(t.substr(1)):t.jquery?t[0]:t;var r=[t,e,n];return t.postscribe={cancel:function(){r.stream?r.stream.abort():r[1]=i}},n.beforeEnqueue(r),m.push(r),g||s(),t.postscribe}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e["default"]=u;var f=n(2),p=o(f),l=n(4),h=r(l),d={afterAsync:i,afterDequeue:i,afterStreamStart:i,afterWrite:i,autoFix:!0,beforeEnqueue:i,beforeWriteToken:function(t){return t},beforeWrite:function(t){return t},done:i,error:function(t){throw t},releaseAsync:!1},y=0,m=[],g=null;c(u,{streams:{},queue:m,WriteStream:p["default"]})},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){var n=d+e,r=t.getAttribute(n);return l.existy(r)?String(r):r}function a(t,e){var n=arguments.length<=2||void 0===arguments[2]?null:arguments[2],r=d+e;l.existy(n)&&""!==n?t.setAttribute(r,n):t.removeAttribute(r)}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=n(3),f=o(c),p=n(4),l=r(p),h=!1,d="data-ps-",y="ps-style",m="ps-script",g=function(){function t(e){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];i(this,t),this.root=e,this.options=n,this.doc=e.ownerDocument,this.win=this.doc.defaultView||this.doc.parentWindow,this.parser=new f["default"]("",{autoFix:n.autoFix}),this.actuals=[e],this.proxyHistory="",this.proxyRoot=this.doc.createElement(e.nodeName),this.scriptStack=[],this.writeQueue=[],a(this.proxyRoot,"proxyof",0)}return t.prototype.write=function(){var t;for((t=this.writeQueue).push.apply(t,arguments);!this.deferredRemote&&this.writeQueue.length;){var e=this.writeQueue.shift();l.isFunction(e)?this._callFunction(e):this._writeImpl(e)}},t.prototype._callFunction=function(t){var e={type:"function",value:t.name||t.toString()};this._onScriptStart(e),t.call(this.win,this.doc),this._onScriptDone(e)},t.prototype._writeImpl=function(t){this.parser.append(t);for(var e=void 0,n=void 0,r=void 0,o=[];(e=this.parser.readToken())&&!(n=l.isScript(e))&&!(r=l.isStyle(e));)e=this.options.beforeWriteToken(e),e&&o.push(e);o.length>0&&this._writeStaticTokens(o),n&&this._handleScriptToken(e),r&&this._handleStyleToken(e)},t.prototype._writeStaticTokens=function(t){var e=this._buildChunk(t);return e.actual?(e.html=this.proxyHistory+e.actual,this.proxyHistory+=e.proxy,this.proxyRoot.innerHTML=e.html,h&&(e.proxyInnerHTML=this.proxyRoot.innerHTML),this._walkChunk(),h&&(e.actualInnerHTML=this.root.innerHTML),e):null},t.prototype._buildChunk=function(t){for(var e=this.actuals.length,n=[],r=[],o=[],i=t.length,s=0;i>s;s++){var a=t[s],u=a.toString();if(n.push(u),a.attrs){if(!/^noscript$/i.test(a.tagName)){var c=e++;r.push(u.replace(/(\/?>)/," "+d+"id="+c+" $1")),a.attrs.id!==m&&a.attrs.id!==y&&o.push("atomicTag"===a.type?"":"<"+a.tagName+" "+d+"proxyof="+c+(a.unary?" />":">"))}}else r.push(u),o.push("endTag"===a.type?u:"")}return{tokens:t,raw:n.join(""),actual:r.join(""),proxy:o.join("")}},t.prototype._walkChunk=function(){for(var t=void 0,e=[this.proxyRoot];l.existy(t=e.shift());){var n=1===t.nodeType,r=n&&s(t,"proxyof");if(!r){n&&(this.actuals[s(t,"id")]=t,a(t,"id"));var o=t.parentNode&&s(t.parentNode,"proxyof");o&&this.actuals[o].appendChild(t)}e.unshift.apply(e,l.toArray(t.childNodes))}},t.prototype._handleScriptToken=function(t){var e=this,n=this.parser.clear();n&&this.writeQueue.unshift(n),t.src=t.attrs.src||t.attrs.SRC,t=this.options.beforeWriteToken(t),t&&(t.src&&this.scriptStack.length?this.deferredRemote=t:this._onScriptStart(t),this._writeScriptToken(t,function(){e._onScriptDone(t)}))},t.prototype._handleStyleToken=function(t){var e=this.parser.clear();e&&this.writeQueue.unshift(e),t.type=t.attrs.type||t.attrs.TYPE||"text/css",t=this.options.beforeWriteToken(t),t&&this._writeStyleToken(t),e&&this.write()},t.prototype._writeStyleToken=function(t){var e=this._buildStyle(t);this._insertCursor(e,y),t.content&&(e.styleSheet&&!e.sheet?e.styleSheet.cssText=t.content:e.appendChild(this.doc.createTextNode(t.content)))},t.prototype._buildStyle=function(t){var e=this.doc.createElement(t.tagName);return e.setAttribute("type",t.type),l.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),e},t.prototype._insertCursor=function(t,e){this._writeImpl('<span id="'+e+'"/>');var n=this.doc.getElementById(e);n&&n.parentNode.replaceChild(t,n)},t.prototype._onScriptStart=function(t){t.outerWrites=this.writeQueue,this.writeQueue=[],this.scriptStack.unshift(t)},t.prototype._onScriptDone=function(t){return t!==this.scriptStack[0]?void this.options.error({message:"Bad script nesting or script finished twice"}):(this.scriptStack.shift(),this.write.apply(this,t.outerWrites),void(!this.scriptStack.length&&this.deferredRemote&&(this._onScriptStart(this.deferredRemote),this.deferredRemote=null)))},t.prototype._writeScriptToken=function(t,e){var n=this._buildScript(t),r=this._shouldRelease(n),o=this.options.afterAsync;t.src&&(n.src=t.src,this._scriptLoadHandler(n,r?o:function(){e(),o()}));try{this._insertCursor(n,m),n.src&&!r||e()}catch(i){this.options.error(i),e()}},t.prototype._buildScript=function(t){var e=this.doc.createElement(t.tagName);return l.eachKey(t.attrs,function(t,n){e.setAttribute(t,n)}),t.content&&(e.text=t.content),e},t.prototype._scriptLoadHandler=function(t,e){function n(){t=t.onload=t.onreadystatechange=t.onerror=null}function r(){n(),e()}function o(t){n(),i(t),e()}var i=this.options.error;u(t,{onload:function(){return r()},onreadystatechange:function(){/^(loaded|complete)$/.test(t.readyState)&&r()},onerror:function(){return o({message:"remote script failed "+t.src})}})},t.prototype._shouldRelease=function(t){var e=/^script$/i.test(t.nodeName);return!e||!!(this.options.releaseAsync&&t.src&&t.hasAttribute("async"))},t}();e["default"]=g},function(t,e,n){!function(e,n){t.exports=n()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(1),i=r(o);t.exports=i["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var s=n(2),a=o(s),u=n(3),c=o(u),f=n(6),p=r(f),l=n(5),h={comment:/^<!--/,endTag:/^<\//,atomicTag:/^<\s*(script|style|noscript|iframe|textarea)[\s\/>]/i,startTag:/^</,chars:/^[^<]/},d=function(){function t(){var e=this,n=arguments.length<=0||void 0===arguments[0]?"":arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];i(this,t),this.stream=n;var o=!1,s={};for(var u in a)a.hasOwnProperty(u)&&(r.autoFix&&(s[u+"Fix"]=!0),o=o||s[u+"Fix"]);o?(this._readToken=(0,p["default"])(this,s,function(){return e._readTokenImpl()}),this._peekToken=(0,p["default"])(this,s,function(){return e._peekTokenImpl()})):(this._readToken=this._readTokenImpl,this._peekToken=this._peekTokenImpl)}return t.prototype.append=function(t){this.stream+=t},t.prototype.prepend=function(t){this.stream=t+this.stream},t.prototype._readTokenImpl=function(){var t=this._peekTokenImpl();return t?(this.stream=this.stream.slice(t.length),t):void 0},t.prototype._peekTokenImpl=function(){for(var t in h)if(h.hasOwnProperty(t)&&h[t].test(this.stream)){var e=c[t](this.stream);if(e)return"startTag"===e.type&&/script|style/i.test(e.tagName)?null:(e.text=this.stream.substr(0,e.length),e)}},t.prototype.peekToken=function(){return this._peekToken()},t.prototype.readToken=function(){return this._readToken()},t.prototype.readTokens=function(t){for(var e=void 0;e=this.readToken();)if(t[e.type]&&t[e.type](e)===!1)return},t.prototype.clear=function(){var t=this.stream;return this.stream="",t},t.prototype.rest=function(){return this.stream},t}();e["default"]=d,d.tokenToString=function(t){return t.toString()},d.escapeAttributes=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=(0,l.escapeQuotes)(t[n],null));return e},d.supports=a;for(var y in a)a.hasOwnProperty(y)&&(d.browserHasFlaw=d.browserHasFlaw||!a[y]&&y)},function(t,e){"use strict";e.__esModule=!0;var n=!1,r=!1,o=window.document.createElement("div");try{var i="<P><I></P></I>";o.innerHTML=i,e.tagSoup=n=o.innerHTML!==i}catch(s){e.tagSoup=n=!1}try{o.innerHTML="<P><i><P></P></i></P>",e.selfClose=r=2===o.childNodes.length}catch(s){e.selfClose=r=!1}o=null,e.tagSoup=n,e.selfClose=r},function(t,e,n){"use strict";function r(t){var e=t.indexOf("-->");return e>=0?new c.CommentToken(t.substr(4,e-1),e+3):void 0}function o(t){var e=t.indexOf("<");return new c.CharsToken(e>=0?e:t.length)}function i(t){var e=t.indexOf(">");if(-1!==e){var n=t.match(f.startTag);if(n){var r=function(){var t={},e={},r=n[2];return n[2].replace(f.attr,function(n,o){arguments[2]||arguments[3]||arguments[4]||arguments[5]?arguments[5]?(t[arguments[5]]="",e[arguments[5]]=!0):t[o]=arguments[2]||arguments[3]||arguments[4]||f.fillAttr.test(o)&&o||"":t[o]="",r=r.replace(n,"")}),{v:new c.StartTagToken(n[1],n[0].length,t,e,!!n[3],r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))}}();if("object"===("undefined"==typeof r?"undefined":u(r)))return r.v}}}function s(t){var e=i(t);if(e){var n=t.slice(e.length);if(n.match(new RegExp("</\\s*"+e.tagName+"\\s*>","i"))){var r=n.match(new RegExp("([\\s\\S]*?)</\\s*"+e.tagName+"\\s*>","i"));if(r)return new c.AtomicTagToken(e.tagName,r[0].length+e.length,e.attrs,e.booleanAttrs,r[1])}}}function a(t){var e=t.match(f.endTag);return e?new c.EndTagToken(e[1],e[0].length):void 0}e.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.comment=r,e.chars=o,e.startTag=i,e.atomicTag=s,e.endTag=a;var c=n(4),f={startTag:/^<([\-A-Za-z0-9_]+)((?:\s+[\w\-]+(?:\s*=?\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/([\-A-Za-z0-9_]+)[^>]*>/,attr:/(?:([\-A-Za-z0-9_]+)\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))|(?:([\-A-Za-z0-9_]+)(\s|$)+)/g,fillAttr:/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noresize|noshade|nowrap|readonly|selected)$/i}},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0,e.EndTagToken=e.AtomicTagToken=e.StartTagToken=e.TagToken=e.CharsToken=e.CommentToken=e.Token=void 0;var o=n(5),i=(e.Token=function s(t,e){r(this,s),this.type=t,this.length=e,this.text=""},e.CommentToken=function(){function t(e,n){r(this,t),this.type="comment",this.length=n||(e?e.length:0),this.text="",this.content=e}return t.prototype.toString=function(){return"<!--"+this.content},t}(),e.CharsToken=function(){function t(e){r(this,t),this.type="chars",this.length=e,this.text=""}return t.prototype.toString=function(){return this.text},t}(),e.TagToken=function(){function t(e,n,o,i,s){r(this,t),this.type=e,this.length=o,this.text="",this.tagName=n,this.attrs=i,this.booleanAttrs=s,this.unary=!1,this.html5Unary=!1}return t.formatTag=function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n="<"+t.tagName;for(var r in t.attrs)if(t.attrs.hasOwnProperty(r)){n+=" "+r;var i=t.attrs[r];"undefined"!=typeof t.booleanAttrs&&"undefined"!=typeof t.booleanAttrs[r]||(n+='="'+(0,o.escapeQuotes)(i)+'"')}return t.rest&&(n+=" "+t.rest),n+=t.unary&&!t.html5Unary?"/>":">",void 0!==e&&null!==e&&(n+=e+"</"+t.tagName+">"),n},t}());e.StartTagToken=function(){function t(e,n,o,i,s,a){r(this,t),this.type="startTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=i,this.html5Unary=!1,this.unary=s,this.rest=a}return t.prototype.toString=function(){return i.formatTag(this)},t}(),e.AtomicTagToken=function(){function t(e,n,o,i,s){r(this,t),this.type="atomicTag",this.length=n,this.text="",this.tagName=e,this.attrs=o,this.booleanAttrs=i,this.unary=!1,this.html5Unary=!1,this.content=s}return t.prototype.toString=function(){return i.formatTag(this,this.content)},t}(),e.EndTagToken=function(){function t(e,n){r(this,t),this.type="endTag",this.length=n,this.text="",this.tagName=e}return t.prototype.toString=function(){return"</"+this.tagName+">"},t}()},function(t,e){"use strict";function n(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1];return t?t.replace(/([^"]*)"/g,function(t,e){return/\\/.test(e)?e+'"':e+'\\"'}):e}e.__esModule=!0,e.escapeQuotes=n},function(t,e){"use strict";function n(t){return t&&"startTag"===t.type&&(t.unary=a.test(t.tagName)||t.unary,t.html5Unary=!/\/>$/.test(t.text)),t}function r(t,e){var r=t.stream,o=n(e());return t.stream=r,o}function o(t,e){var n=e.pop();t.prepend("</"+n.tagName+">")}function i(){var t=[];return t.last=function(){return this[this.length-1]},t.lastTagNameEq=function(t){var e=this.last();return e&&e.tagName&&e.tagName.toUpperCase()===t.toUpperCase()},t.containsTagName=function(t){for(var e,n=0;e=this[n];n++)if(e.tagName===t)return!0;return!1},t}function s(t,e,s){function a(){var e=r(t,s);e&&f[e.type]&&f[e.type](e)}var c=i(),f={startTag:function(n){var r=n.tagName;"TR"===r.toUpperCase()&&c.lastTagNameEq("TABLE")?(t.prepend("<TBODY>"),a()):e.selfCloseFix&&u.test(r)&&c.containsTagName(r)?c.lastTagNameEq(r)?o(t,c):(t.prepend("</"+n.tagName+">"),a()):n.unary||c.push(n)},endTag:function(n){var r=c.last();r?e.tagSoupFix&&!c.lastTagNameEq(n.tagName)?o(t,c):c.pop():e.tagSoupFix&&(s(),a())}};return function(){return a(),n(s())}}e.__esModule=!0,e["default"]=s;var a=/^(AREA|BASE|BASEFONT|BR|COL|FRAME|HR|IMG|INPUT|ISINDEX|LINK|META|PARAM|EMBED)$/i,u=/^(COLGROUP|DD|DT|LI|OPTIONS|P|TD|TFOOT|TH|THEAD|TR)$/i}])})},function(t,e){"use strict";function n(t){return void 0!==t&&null!==t}function r(t){return"function"==typeof t}function o(t,e,n){var r=void 0,o=t&&t.length||0;for(r=0;o>r;r++)e.call(n,t[r],r)}function i(t,e,n){for(var r in t)t.hasOwnProperty(r)&&e.call(n,r,t[r])}function s(t,e){return t=t||{},i(e,function(e,r){n(t[e])||(t[e]=r)}),t}function a(t){try{return Array.prototype.slice.call(t)}catch(e){var n=function(){var e=[];return o(t,function(t){e.push(t)}),{v:e}}();if("object"===("undefined"==typeof n?"undefined":l(n)))return n.v}}function u(t){return t[t.length-1]}function c(t,e){return t&&("startTag"===t.type||"atomicTag"===t.type)&&"tagName"in t?!!~t.tagName.toLowerCase().indexOf(e):!1}function f(t){return c(t,"script")}function p(t){return c(t,"style")}e.__esModule=!0;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};e.existy=n,e.isFunction=r,e.each=o,e.eachKey=i,e.defaults=s,e.toArray=a,e.last=u,e.isTag=c,e.isScript=f,e.isStyle=p}])});
/**
 * Fetches the given banner and appends it with postscribe to the website
 *
 * @param position
 * @param url
 * @constructor
 */
var BannerPlacement = function (position, url) {
    jQuery.get(url, function(data) {
        postscribe('#' + position, data);
    });
};

/**
 * When page is loaded, cycle through global banners array and set BannerPlacement for each item
 */
jQuery(document).ready(function() {
    if (typeof banners == "undefined")
        return;

    for (var i = 0; i < banners.length; i++) {
        new BannerPlacement(
            banners[i][0],
            banners[i][1]
        );
    }
});

/*!
 * shariff - v3.0.1 - Tue, 17 Apr 2018 06:12:14 GMT
 * https://github.com/heiseonline/shariff
 * Copyright (c) 2018 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(9),p=r(11);t.parse=n,t.resolve=o,t.resolveObject=s,t.format=i,t.Url=a;var h=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,d=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["<",">",'"',"`"," ","\r","\n","\t"],f=["{","}","|","\\","^","`"].concat(c),m=["'"].concat(f),g=["%","/","?",";","#"].concat(m),b=["/","?","#"],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},T=r(12);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 u=d.exec(s);if(u)return this.path=s,this.href=s,this.pathname=u[1],u[2]?(this.search=u[2],this.query=t?T.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var c=h.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 w="//"===s.substr(0,2);!w||c&&z[c]||(s=s.substr(2),this.slashes=!0)}if(!z[c]&&(w||c&&!y[c])){for(var P=-1,x=0;x<b.length;x++){var D=s.indexOf(b[x]);-1!==D&&(-1===P||D<P)&&(P=D)}var U,C;C=-1===P?s.lastIndexOf("@"):s.lastIndexOf("@",P),-1!==C&&(U=s.slice(0,C),s=s.slice(C+1),this.auth=decodeURIComponent(U)),P=-1;for(var x=0;x<g.length;x++){var D=s.indexOf(g[x]);-1!==D&&(-1===P||D<P)&&(P=D)}-1===P&&(P=s.length),this.host=s.slice(0,P),s=s.slice(P),this.parseHost(),this.hostname=this.hostname||"";var R="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!R)for(var I=this.hostname.split(/\./),x=0,S=I.length;x<S;x++){var L=I[x];if(L&&!L.match(v)){for(var F="",N=0,O=L.length;N<O;N++)L.charCodeAt(N)>127?F+="x":F+=L[N];if(!F.match(v)){var A=I.slice(0,x),G=I.slice(x+1),q=L.match(k);q&&(A.push(q[1]),G.unshift(q[2])),G.length&&(s="/"+G.join(".")+s),this.hostname=A.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),R||(this.hostname=l.toASCII(this.hostname));var M=this.port?":"+this.port:"",J=this.hostname||"";this.host=J+M,this.href+=this.host,R&&(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 V=m[x];if(-1!==s.indexOf(V)){var W=encodeURIComponent(V);W===V&&(W=escape(V)),s=s.split(V).join(W)}}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=T.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 M=this.pathname||"",X=this.search||"";this.path=M+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=T.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 h=s[l];"protocol"!==h&&(r[h]=e[h])}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 u=Object.keys(e),d=0;d<u.length;d++){var c=u[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||"",g=r.search||"";r.path=m+g}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var b=r.pathname&&"/"===r.pathname.charAt(0),v=e.host||e.pathname&&"/"===e.pathname.charAt(0),k=v||b||r.host&&e.pathname,j=k,T=r.pathname&&r.pathname.split("/")||[],f=e.pathname&&e.pathname.split("/")||[],w=r.protocol&&!y[r.protocol];if(w&&(r.hostname="",r.port=null,r.host&&(""===T[0]?T[0]=r.host:T.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]||""===T[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,T=f;else if(f.length)T||(T=[]),T.pop(),T=T.concat(f),r.search=e.search,r.query=e.query;else if(!p.isNullOrUndefined(e.search)){if(w){r.hostname=r.host=T.shift();var P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");P&&(r.auth=P.shift(),r.host=r.hostname=P.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(!T.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var x=T.slice(-1)[0],D=(r.host||e.host||T.length>1)&&("."===x||".."===x)||""===x,U=0,C=T.length;C>=0;C--)x=T[C],"."===x?T.splice(C,1):".."===x?(T.splice(C,1),U++):U&&(T.splice(C,1),U--);if(!k&&!j)for(;U--;U)T.unshift("..");!k||""===T[0]||T[0]&&"/"===T[0].charAt(0)||T.unshift(""),D&&"/"!==T.join("/").substr(-1)&&T.push("");var R=""===T[0]||T[0]&&"/"===T[0].charAt(0);if(w){r.hostname=r.host=R?"":T.length?T.shift():"";var P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");P&&(r.auth=P.shift(),r.host=r.hostname=P.shift())}return k=k||r.host&&T.length,k&&!R&&T.unshift(""),T.length?r.pathname=T.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=u.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","googleplus","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=t.document.location.protocol+"//"+t.document.location.host+r),e=r),e}},h=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")||this.getMeta("DC.title"),t=this.getMeta("DC.creator");return e&&t&&(e=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=h,t.Shariff=h,o(function(){o(".shariff").each(function(){this.hasOwnProperty("shariff")||(this.shariff=new h(this))})})}).call(t,r(1))},function(e,t){e.exports=jQuery},function(e,t,r){"use strict";e.exports={addthis:r(7),diaspora:r(8),facebook:r(15),flattr:r(16),flipboard:r(17),googleplus:r(18),info:r(19),linkedin:r(20),mail:r(21),pinterest:r(22),print:r(23),qzone:r(24),reddit:r(25),stumbleupon:r(26),telegram:r(27),tencent:r(28),threema:r(29),tumblr:r(30),twitter:r(31),vk:r(32),weibo:r(33),whatsapp:r(34),xing:r(35)}},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";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(R[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(C,"."),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 h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,r){var a=0;for(e=r?S(e/T):e>>1,e+=S(e/t);e>I*z>>1;a+=k)e=S(e/I);return S(a+(I+1)*e/(e+y))}function c(e){var t,r,a,n,o,s,l,u,c,f,m=[],g=e.length,b=0,y=P,T=w;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<g;){for(o=b,s=1,l=k;n>=g&&i("invalid-input"),u=h(e.charCodeAt(n++)),(u>=k||u>S((v-b)/s))&&i("overflow"),b+=u*s,c=l<=T?j:l>=T+z?z:l-T,!(u<c);l+=k)f=k-c,s>S(v/f)&&i("overflow"),s*=f;t=m.length+1,T=d(b-o,t,0==o),S(b/t)>v-y&&i("overflow"),y+=S(b/t),b%=t,m.splice(b++,0,y)}return p(m)}function f(e){var t,r,a,n,o,s,p,h,c,f,m,g,b,y,T,D=[];for(e=l(e),g=e.length,t=P,r=0,o=w,s=0;s<g;++s)(m=e[s])<128&&D.push(L(m));for(a=n=D.length,n&&D.push(x);a<g;){for(p=v,s=0;s<g;++s)(m=e[s])>=t&&m<p&&(p=m);for(b=a+1,p-t>S((v-r)/b)&&i("overflow"),r+=(p-t)*b,t=p,s=0;s<g;++s)if(m=e[s],m<t&&++r>v&&i("overflow"),m==t){for(h=r,c=k;f=c<=o?j:c>=o+z?z:c-o,!(h<f);c+=k)T=h-f,y=k-f,D.push(L(u(f+T%y,0))),h=S(T/y);D.push(L(u(h,0))),o=d(r,b,a==n),r=0,++a}++r,++t}return D.join("")}function m(e){return s(e,function(e){return D.test(e)?c(e.slice(4).toLowerCase()):e})}function g(e){return s(e,function(e){return U.test(e)?"xn--"+f(e):e})}var b,v=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,2147483647),k=36,j=1,z=26,y=38,T=700,w=72,P=128,x="-",D=/^xn--/,U=/[^\x20-\x7E]/,C=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=k-j,S=Math.floor,L=String.fromCharCode;b={version:"1.4.1",ucs2:{decode:l,encode:p},decode:c,encode:f,toASCII:g,toUnicode:m},void 0!==(n=function(){return b}.call(t,r,t,e))&&(e.exports=n)}()}).call(t,r(10)(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(13),t.encode=t.stringify=r(14)},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 h=0;h<p;++h){var u,d,c,f,m=e[h].replace(s,"%20"),g=m.indexOf(r);g>=0?(u=m.substr(0,g),d=m.substr(g+1)):(u=m,d=""),c=decodeURIComponent(u),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{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:"googleplus",faPrefix:"fab",faName:"fa-google-plus-g",title:{bg:"Сподели в Google+",cs:"Sdílet na Google+",da:"Del på Google+",de:"Bei Google+ teilen",en:"Share on Google+",es:"Compartir en Google+",fi:"Jaa Google+:ssa",fr:"Partager sur Goolge+",hr:"Podijelite na Google+",hu:"Megosztás Google+on",it:"Condividi su Google+",ja:"Google+上で共有",ko:"Google+에서 공유하기",nl:"Delen op Google+",no:"Del på Google+",pl:"Udostępnij na Google+",pt:"Compartilhar no Google+",ro:"Partajează pe Google+",ru:"Поделиться на Google+",sk:"Zdieľať na Google+",sl:"Deli na Google+",sr:"Podeli na Google+",sv:"Dela på Google+",tr:"Google+'da paylaş",zh:"在Google+上分享"},shareUrl:"https://plus.google.com/share?url="+encodeURIComponent(e.getURL())+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){return{name:"print",faPrefix:"fas",faName:"fa-print",popup:!1,shareText:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"",fi:"",fr:"",hr:"",hu:"",it:"",ja:"",ko:"",nl:"",no:"",pl:"",pt:"",ro:"",ru:"",sk:"",sl:"",sr:"",sv:"",tr:"",zh:""},title:{bg:"",cs:"tlačit",da:"",de:"drucken",en:"print",es:"",fi:"",fr:"",hr:"",hu:"",it:"",ja:"",ko:"",nl:"",no:"",pl:"",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/social_plugins/share?url="+encodeURIComponent(e.getURL())+e.getReferrerTrack()}}}]);
/*
 Copyright 2012-2013 Silktide Ltd.

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>
*/

var cc =
{
    version: '1.0.10',
    jqueryversionrequired: '1.4.4',
    initobj: false,
    ismobile: false,
    setupcomplete: false,
    allasked: false,
    checkedlocal: false,
    frommodal: false,
    hassetupmobile: false,
    noclosewin: false,
    closingmodal: false,
    jqueryattempts: 0,
    reloadkey: false,
    forcereload: false,
    allagree: true,
    refreshOnConsent: true,
    hideallsitesbutton: false,
    cookies: {},
    uniqelemid: 0,
    executionblock: 0,
    defaultCookies: { social: {}, analytics: {}},
    cookieAnalytics: ['_ga', '_gat' ,'__utmt' ,'__utma' ,'__utmb' ,'__utmc' ,'__utmz'],
    approved: {},
    onlyshowbanneronce: false,
    scriptdelay: 800,
    bindfunctions: {},
    eumemberstates: [
        "BE",//"Belgium"
        "BG",//"Bulgaria"
        "CZ",//"Czech Republic"
        "DK",//"Denmark"
        "DE",//"Germany"
        "EE",//"Estonia"
        "IE",//"Ireland"
        "EL",//"Grecia"
        "GR",//"Greece"
        "ES",//"Spain"
        "FR",//"France"
        "IT",//"Italy"
        "CY",//"Cyprus"
        "LV",//"Latvia"
        "LT",//"Lithuania"
        "LU",//"Luxembourg"
        "HU",//"Hungary"
        "MT",//"Malta"
        "NL",//"Netherlands" (Paesi Bassi-Olanda)
        "AT",//"Austria"
        "PL",//"Poland"
        "PT",//"Portugal"
        "RO",//"Romania"
        "SI",//"Slovenia"
        "SK",//"Slovakia"
        "FI",//"Finland"
        "SE",//"Sweden"
        "UK",// "Regno Unito"
        "GB",// "United Kingdom"
        "EU" //"Europe"
    ],
    noteumemberstates: [
        "A1",//"Anonymous Proxy"
        "A2",//"Satellite Provider"
        "O1",//"Other Country"
        "AD",//"Andorra"
        "AE",//"United Arab Emirates"
        "AF",//"Afghanistan"
        "AG",//"Antigua and Barbuda"
        "AI",//"Anguilla"
        "AL",//"Albania"
        "AN",// antille olandesi
        "AM",//"Armenia"
        "AO",//"Angola"
        "AP",//"Asia/Pacific Region"
        "AQ",//"Antarctica"
        "AR",//"Argentina"
        "AS",//"American Samoa"
        "AU",//"Australia"
        "AW",//"Aruba"
        "AX",//"Aland Islands"
        "AZ",//"Azerbaijan"
        "BA",//"Bosnia and Herzegovina"
        "BB",//"Barbados"
        "BD",//"Bangladesh"
        "BF",//"Burkina Faso"
        "BH",//"Bahrain"
        "BI",//"Burundi"
        "BJ",//"Benin"
        "BL",//"Saint Bartelemey"
        "BM",//"Bermuda"
        "BN",//"Brunei Darussalam"
        "BO",//"Bolivia"
        "BQ",//"Bonaire, Saint Eustatius and Saba"
        "BR",//"Brazil"
        "BS",//"Bahamas"
        "BT",//"Bhutan"
        "BV",//"Bouvet Island"
        "BW",//"Botswana"
        "BY",//"Belarus"
        "BZ",//"Belize"
        "CA",//"Canada"
        "CC",//"Cocos (Keeling) Islands"
        "CD",//"Congo, The Democratic Republic of the"
        "CF",//"Central African Republic"
        "CG",//"Congo"
        "CH",//"Switzerland"
        "CI",//"Cote d'Ivoire"
        "CK",//"Cook Islands"
        "CL",//"Chile"
        "CM",//"Cameroon"
        "CN",//"China"
        "CO",//"Colombia"
        "CR",//"Costa Rica"
        "CS",//"Serbia e Montenegro"
        "CU",//"Cuba"
        "CV",//"Cape Verde"
        "CW",//"Curacao"
        "CX",//"Christmas Island"
        "DJ",//"Djibouti"
        "DM",//"Dominica"
        "DO",//"Dominican Republic"
        "DZ",//"Algeria"
        "EC",//"Ecuador"
        "EG",//"Egypt"
        "EH",//"Western Sahara"
        "ER",//"Eritrea"
        "ET",//"Ethiopia"
        "FJ",//"Fiji"
        "FK",//"Falkland Islands (Malvinas)"
        "FM",//"Micronesia, Federated States of"
        "FO",//"Faroe Islands"
        "GA",//"Gabon"
        "GD",//"Grenada"
        "GE",//"Georgia"
        "GF",//"French Guiana"
        "GG",//"Guernsey"
        "GH",//"Ghana"
        "GI",//"Gibraltar"
        "GL",//"Greenland"
        "GM",//"Gambia"
        "GN",//"Guinea"
        "GP",//"Guadeloupe"
        "GQ",//"Equatorial Guinea"
        "GS",//"South Georgia and the South Sandwich Islands"
        "GT",//"Guatemala"
        "GU",//"Guam"
        "GW",//"Guinea-Bissau"
        "GY",//"Guyana"
        "HK",//"Hong Kong"
        "HM",//"Heard Island and McDonald Islands"
        "HN",//"Honduras"
        "HR",//"Croatia"
        "HT",//"Haiti"
        "ID",//"Indonesia"
        "IL",//"Israel"
        "IM",//"Isle of Man"
        "IN",//"India"
        "IO",//"British Indian Ocean Territory"
        "IQ",//"Iraq"
        "IR",//"Iran, Islamic Republic of"
        "IS",//"Iceland"
        "JE",//"Jersey"
        "JM",//"Jamaica"
        "JO",//"Jordan"
        "JP",//"Japan"
        "KE",//"Kenya"
        "KG",//"Kyrgyzstan"
        "KH",//"Cambodia"
        "KI",//"Kiribati"
        "KM",//"Comoros"
        "KN",//"Saint Kitts and Nevis"
        "KP",//"Korea, Democratic People's Republic of"
        "KR",//"Korea, Republic of"
        "KW",//"Kuwait"
        "KY",//"Cayman Islands"
        "KZ",//"Kazakhstan"
        "LA",//"Lao People's Democratic Republic"
        "LB",//"Lebanon"
        "LC",//"Saint Lucia"
        "LI",//"Liechtenstein"
        "LK",//"Sri Lanka"
        "LR",//"Liberia"
        "LS",//"Lesotho"
        "LY",//"Libyan Arab Jamahiriya"
        "MA",//"Morocco"
        "MC",//"Monaco"
        "MD",//"Moldova, Republic of"
        "ME",//"Montenegro"
        "MF",//"Saint Martin"
        "MG",//"Madagascar"
        "MH",//"Marshall Islands"
        "MK",//"Macedonia"
        "ML",//"Mali"
        "MM",//"Myanmar"
        "MN",//"Mongolia"
        "MO",//"Macao"
        "MP",//"Northern Mariana Islands"
        "MQ",//"Martinique"
        "MR",//"Mauritania"
        "MS",//"Montserrat"
        "MU",//"Mauritius"
        "MV",//"Maldives"
        "MW",//"Malawi"
        "MX",//"Mexico"
        "MY",//"Malaysia"
        "MZ",//"Mozambique"
        "NA",//"Namibia"
        "NC",//"New Caledonia"
        "NE",//"Niger"
        "NF",//"Norfolk Island"
        "NG",//"Nigeria"
        "NI",//"Nicaragua"
        "NO",//"Norway"
        "NP",//"Nepal"
        "NR",//"Nauru"
        "NU",//"Niue"
        "NZ",//"New Zealand"
        "OM",//"Oman"
        "PA",//"Panama"
        "PE",//"Peru"
        "PF",//"French Polynesia"
        "PG",//"Papua New Guinea"
        "PH",//"Philippines"
        "PK",//"Pakistan"
        "PM",//"Saint Pierre and Miquelon"
        "PN",//"Pitcairn"
        "PR",//"Puerto Rico"
        "PS",//"Palestinian Territory"
        "PW",//"Palau"
        "PY",//"Paraguay"
        "QA",//"Qatar"
        "RE",//"Reunion"
        "RS",//"Serbia"
        "RU",//"Russian Federation"
        "RW",//"Rwanda"
        "SA",//"Saudi Arabia"
        "SB",//"Solomon Islands"
        "SC",//"Seychelles"
        "SD",//"Sudan"
        "SG",//"Singapore"
        "SH",//"Saint Helena"
        "SJ",//"Svalbard and Jan Mayen"
        "SL",//"Sierra Leone"
        "SM",//"San Marino"
        "SN",//"Senegal"
        "SO",//"Somalia"
        "SR",//"Suriname"
        "SS",//"South Sudan"
        "ST",//"Sao Tome and Principe"
        "SV",//"El Salvador"
        "SX",//"Sint Maarten"
        "SY",//"Syrian Arab Republic"
        "SZ",//"Swaziland"
        "TC",//"Turks and Caicos Islands"
        "TD",//"Chad"
        "TF",//"French Southern Territories"
        "TG",//"Togo"
        "TH",//"Thailand"
        "TJ",//"Tajikistan"
        "TK",//"Tokelau"
        "TL",//"Timor-Leste"
        "TM",//"Turkmenistan"
        "TN",//"Tunisia"
        "TO",//"Tonga"
        "TR",//"Turkey"
        "TT",//"Trinidad and Tobago"
        "TV",//"Tuvalu"
        "TW",//"Taiwan"
        "TZ",//"Tanzania, United Republic of"
        "UA",//"Ukraine"
        "UG",//"Uganda"
        "UM",//"United States Minor Outlying Islands"
        "US",//"United States"
        "UY",//"Uruguay"
        "UZ",//"Uzbekistan"
        "VA",//"Città del Vaticano"
        "VC",//"Saint Vincent e Grenadine"
        "VE",//"Venezuela"
        "VI",//"Isole Vergini Americane"
        "VG",//"Isole Vergini Britanniche"
        "VN",//"Vietnam"
        "VU",//"Vanuatu"
        "WF",//"Wallis e Futuna"
        "WS",//"Samoa"
        "YE",//"Yemen"
        "YT",//"Mayotte"
        "ZA",//"Sud Africa"
        "ZM",//"Zambia"
        "ZW"//"Zimbabwe"
    ],

    settings: {

        style: "light",
        bannerPosition: "bottom",
        tagPosition: 'bottom-right',
        hideprivacysettingstab: 1,
        hidepopupprivatesettings: 1,
        onlyshowwithineu: 1,
        httpserviceapilocation:'http://api.wipmania.com/jsonp?',
        consenttype: 'explicit',
        confirmClick:1,
        confirmScroll:1,
        idPageInformation:47,
        cookieExpire:365

    },

    strings: {
        jqueryWarning: "Developer: Caution! You need to use jQuery 1.4.4 or higher.",
        invalidKeyWarning: "Developer: Warning! You must provide a valid API.",
        socialDefaultTitle: "Social media",
        analyticsDefaultTitle: "Analytics",
        socialDefaultDescription: "Facebook, Twitter and other social websites need to know who you are to work properly.",
        analyticsDefaultDescription: "We anonymously measure your use of this website to improve your experience.",
        notificationTitle: "Your experience on this site will be improved by allowing cookies",
        seeDetails: "see details",
        seeDetailsImplicit: "change your settings",
        hideDetails: "hide details",
        savePreference: 'Save preference',
        allowCookies: 'Allow cookies',
        allowCookiesImplicit: 'Close',
        privacySettings: "Privacy settings",
        privacySettingsDialogTitleA: "Privacy settings",
        privacySettingsDialogSubtitle: "Some features of this website need your consent to remember who you are.",
        closeWindow: "Close window",
        preferenceConsent: "I consent",
        preferenceDecline: "I decline",
        notificationTitleImplicit: "We use cookies to ensure you get the best experience on our website",
        informationCookies:"Information on Cookies",
        textOff: "player off press cookies"
    },

    geturlparameter: function (name) {
        name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
        var regexS = "[\\?&]" + name + "=([^&#]*)";
        var regex = new RegExp(regexS);
        var results = regex.exec(window.location.search);
        if (results == null)
            return false;
        else
            return decodeURIComponent(results[1].replace(/\+/g, " "));
    },

    isfunction: function (functionToCheck) {
        var getType = {};
        return functionToCheck && getType.toString.call(functionToCheck) == '[object Function]';
    },

    setup: function () {
        jQuery.each(cc.bindfunctions, function (key, value) {
            for (i = 0; i < value.length; i++) {
                jQuery(document).bind("cc_" + key, value[i]);
            }
        });
        verstr = jQuery().jquery;
        parts = verstr.split('.');
        versionRequired = cc.jqueryversionrequired.split('.');
        jqueryOk = true;
        for (i = 0; i < parts.length && i < versionRequired.length; i++) {
            currentpart = parseInt(parts[i]);
            requiredpart = parseInt(versionRequired[i]);
            if (currentpart < requiredpart) {
                /* Unsatisfied - this part of the version string is less than the version we require */
                jqueryok = false;
                break;
            }
            if (currentpart > requiredpart) {
                /* Satisfied - this part of the version string is greater than the version we require */
                break;
            }
            /* This version is the same as the one we require.  Check the next part of the version number. */
        }
        if (!jqueryOk) {
            alert(cc.strings.jqueryWarning);
        }

        jQuery.each(cc.defaultCookies, function (key, value) {
             if (key == "social") {
                cc.defaultCookies[key].title = cc.strings.socialDefaultTitle;
                cc.defaultCookies[key].description = cc.strings.socialDefaultDescription;
            }
            else if (key == "analytics") {
                cc.defaultCookies[key].title = cc.strings.analyticsDefaultTitle;
                cc.defaultCookies[key].description = cc.strings.analyticsDefaultDescription;
            }

        });
        jQuery.each(cc.initobj.cookies, function (key, value) {

            if (!value.title) {
                if (key == "social") {
                    cc.initobj.cookies[key].title = cc.strings.socialDefaultTitle;
                }
                else if (key == "analytics") {
                    cc.initobj.cookies[key].title = cc.strings.analyticsDefaultTitle;
                }
               else {
                    cc.initobj.cookies[key].title = cc.strings.defaultTitle;
                }
            }
            if (!value.description) {
                if (key == "social") {
                    cc.initobj.cookies[key].description = cc.strings.socialDefaultDescription;
                }
                else if (key == "analytics") {
                    cc.initobj.cookies[key].description = cc.strings.analyticsDefaultDescription;
                }
                else {
                    cc.initobj.cookies[key].description = cc.strings.defaultDescription;
                }
            }

            if (!value.defaultstate) {
                cc.initobj.cookies[key].defaultstate = "on";
            }

            cc.initobj.cookies[key].asked = false;
            cc.initobj.cookies[key].approved = false;
            cc.initobj.cookies[key].executed = false;
            cc.executeoff(key);
        });

        testmode = cc.geturlparameter('cctestmode');
        if (testmode == 'accept' || testmode == 'decline') {
            cc.settings.testmode = testmode;
        }
       /* if (cc.settings.disableallsites) {
            cc.hideallsitesbutton = true;
        }*/
        for (var attrname in cc.initobj.cookies) {
            cc.cookies[attrname] = cc.initobj.cookies[attrname];
            if (cc.settings.testmode == "accept") {
                cc.approved[attrname] = "yes";
            }
            if (cc.settings.testmode == "decline") {
                cc.approved[attrname] = "no";
            }
        }

    },

    initialise: function (obj) {

        /* controlla che l'oggetto abbia il suo vettore di lingua valorizzato
           altrimenti utilizza quello di default
        */
        var stringLanguage = cc.messageLanguage();
        if (stringLanguage != '' && stringLanguage != 'error')
           obj.strings = stringLanguage;
        cc.initobj = obj;

        if (obj.settings !== undefined) {
            for (var attrname in obj.settings) {
                this.settings[attrname] = obj.settings[attrname];
            }
        }
        if (obj.strings !== undefined) {
            for (var attrname in obj.strings) {
                this.strings[attrname] = obj.strings[attrname];
            }
        }


        cc.settings.style = "cc-" + cc.settings.style;
        cc.settings.bannerPosition = "cc-" + cc.settings.bannerPosition;


        if (window.jQuery) {
           cc.setupcomplete = true;
           cc.setup();

        }
    },
    insertscript: function (script) {
        var newfile = document.createElement('script');
        newfile.setAttribute("type", "text/javascript");
        newfile.setAttribute("src", script);
        document.getElementsByTagName("head")[0].appendChild(newfile);
    },

    insertscripttag: function (content) {
        var newfile = document.createElement('script');
        newfile.setAttribute("type", "text/javascript");
        newfile.innerHTML = content;
        document.getElementsByTagName("head")[0].appendChild(newfile);
    },

    checklocal: function () {
        this.checkedlocal = true;
        jQuery.each(cc.cookies, function (key, value) {
            cookieval = cc.getcookie('cc_' + key);
            if (cookieval) {
                cc.approved[key] = cookieval;
            }
        });
        this.checkapproval();
    },


    deletecookie: function (key) {
        date = new Date();
        date.setDate(date.getDate() - 1);
        document.cookie = escape("cc_" + key) + '=; path=/; expires=' + date;

    },

    removecookieAnalytics: function (key, sPath, sDomain) {
        for (var i = 0; i < cc.cookieAnalytics.length; i++){
            if (key == cc.cookieAnalytics[i]){
                document.cookie = key + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");

            }
        }
    },


    reloadifnecessary: function () {
        if (cc.refreshOnConsent || cc.ismobile || cc.forcereload) {
            setTimeout("location.reload(true);", 0);
        }
    },

    onkeyup: function (e) {
        if (e.keyCode == 27) {
            cc.closemodals();
        }
    },

    closemodals: function () {
        if (!cc.closingmodal) {
            if (cc.noclosewin) {
                cc.noclosewin = false;
            } else {
                    if (jQuery('#cc-modal').is(":visible")) {
                        jQuery('#cc-modal .cc-modal-closebutton a').click();
                    }

                    if (jQuery('#cc-settingsmodal').is(":visible")) {
                        jQuery('#cc-settingsmodal #cc-settingsmodal-closebutton a').click();
                    }

            }
        }
    },

    showbanner: function () {

        jQuery('#cc-tag').fadeOut(null, function () {
            jQuery(this).remove();
        });
        jQuery('#cc-notification').remove();
        if (cc.ismobile) {
            cc.setupformobile();
            jQuery('head').append('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">');

        }
        data = '<div id="cc-notification">' +
            '<div id="cc-notification-wrapper">' +
            '<h2><span>' + cc.strings.notificationTitle + '</span></h2>' +
            '<div id="cc-notification-permissions">' +
            '</div>' +
            '<ul class="cc-notification-buttons">' +
            '<li>' +
            '<a class="cc-link" href="#" id="cc-approve-button-thissite">' + cc.strings.allowCookies + '</a>' +
            '</li>' +
            '</ul>' +
            '<div class="cc-clear"></div>' +
            '</div>' +
            '</div>';

        jQuery('body').prepend(data);
        if (cc.hideallsitesbutton) {
            jQuery('#cc-approve-button-allsites').hide();
        }
        if (cc.settings.consenttype == 'implicit') {
            jQuery('#cc-notification h2 span').html(cc.strings.notificationTitleImplicit)
            jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookiesImplicit);
            jQuery('#cc-approve-button-thissite').parent().after(jQuery('#cc-approve-button-allsites').parent());
            jQuery('#cc-approve-button-allsites').hide();
        }
        jQuery('#cc-notification-logo').hide();
        jQuery('#cc-notification').addClass(cc.settings.style).addClass(cc.settings.bannerPosition);
        bannerh = jQuery('#cc-notification').height();
        jQuery('#cc-notification').hide();
        if (cc.ismobile) {
            jQuery('#cc-notification').addClass("cc-mobile");
        }
        jQuery('#cc-notification-permissions').prepend('<ul></ul>');
        allcustom = true;
        jQuery.each(cc.cookies, function (key, value) {
            if (!value.asked) {
                jQuery('#cc-notification-permissions ul').append('<li><input type="checkbox" checked="checked" id="cc-checkbox-' + key + '" /> <label id="cc-label-' + key + '" for="cc-checkbox-' + key + '"><strong>' + value.title + '</strong> ' + value.description + '</label></li>');
                if (value.link) {
                    jQuery('#cc-label-' + key).append(' <a target="_blank" href="' + value.link + '" class="cc-learnmore-link">' + cc.strings.learnMore + '</a>');
                }
                if (key == "social" || key == "analytics" ) {
                    allcustom = false;
                }
                jQuery('#cc-checkbox-' + key).change(function () {
                    if (jQuery(this).is(':checked')) {
                        jQuery(this).parent().removeClass('cc-notification-permissions-inactive');
                    } else {
                        jQuery(this).parent().addClass('cc-notification-permissions-inactive');

                    }
                });
                if (value.defaultstate == "off") {
                    jQuery('#cc-checkbox-' + key).removeAttr("checked").parent().addClass('cc-notification-permissions-inactive');
                }
                if (key == "necessary") {
                    jQuery('#cc-checkbox-' + key).attr("disabled", "disabled");
                }
            }
        });
        jQuery('#cc-notification-wrapper h2').append(' - <a href="/index.php?id=' + cc.settings.idPageInformation + '">' +cc.strings.informationCookies+'</a>');
        jQuery('#cc-notification-wrapper h2').append(' - <a class="cc-link" href="#" id="cc-notification-moreinfo">' + cc.strings.seeDetails + '</a>');

        if (cc.settings.consenttype == "implicit") {
            jQuery('#cc-notification-moreinfo').html(cc.strings.seeDetailsImplicit);
        }

        jQuery('#cc-notification-moreinfo').click(function () {
            if (jQuery(this).html() == cc.strings.seeDetails || jQuery(this).html() == cc.strings.seeDetailsImplicit) {
                if (cc.settings.consenttype == 'implicit') {
                    if (!cc.hideallsitesbutton) {
                        jQuery('#cc-approve-button-allsites').show();
                    }
                }
                jQuery('#cc-approve-button-thissite').html(cc.strings.savePreference);
                jQuery(this).html(cc.strings.hideDetails);
            } else {
                jQuery.each(cc.cookies, function (key, value) {
                    if (value.defaultstate == "off") {
                        jQuery('#cc-checkbox-' + key).removeAttr("checked");
                        jQuery(this).parent().addClass('cc-notification-permissions-inactive');
                    } else {
                        jQuery('#cc-checkbox-' + key).attr('checked', 'checked');
                        jQuery(this).parent().removeClass('cc-notification-permissions-inactive');

                    }
                });

                if (cc.settings.consenttype == 'implicit') {
                    jQuery(this).html(cc.strings.seeDetailsImplicit);
                    jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookiesImplicit);
                    jQuery('#cc-approve-button-allsites').hide();
                } else {
                    jQuery(this).html(cc.strings.seeDetails);
                    jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookies);
                    jQuery('#cc-approve-button-allsites').html(cc.strings.allowForAllSites);
                }

            }
            jQuery('#cc-notification-logo').fadeToggle();
            jQuery('#cc-notification-permissions').slideToggle();
            jQuery(this).blur();
            return false;
        });

        if (!cc.ismobile) {
            if (cc.settings.bannerPosition == "cc-push") {
                jQuery('html').animate({marginTop: bannerh}, 400);
            }
            jQuery('#cc-notification').slideDown();
        } else {
            jQuery('#cc-notification').show();
        }



        if (cc.settings.confirmClick == 1 && cc.settings.consenttype == 'implicit'){
            jQuery(window).addClass(cc.settings.style).click(cc.onlocalconsentgiven);
        }
        if (cc.settings.confirmScroll == 1 && cc.settings.consenttype == 'implicit'){
            jQuery(window).addClass(cc.settings.style).scroll(cc.onlocalconsentgiven);
        }
        jQuery('#cc-approve-button-thissite').click(cc.onlocalconsentgiven);

       if (allcustom) {
            jQuery('#cc-notification h2 span').html(cc.strings.customCookie);

        }

    },

    timestamp: function () {
        return Math.round((new Date()).getTime() / 1000);
    },

    locationcallback: function (data) {
        status = cc.jsonserviceapi(data);
        if (status != "error") {
            ineu = "yes";
            if (jQuery.inArray(status, cc.eumemberstates) == -1) {
                //Visitor is from outside EU
                ineu = "no";
                jQuery.each(cc.cookies, function (key, value) {
                    cc.approved[key] = "yes";
                });
                cc.settings.hideprivacysettingstab = 1;
                cc.settings.hidepopupprivatesettings = 1;
            }
            cc.setcookie('cc_ineu', ineu, cc.settings.cookieExpire);
        }else{
            alert(cc.strings.invalidKeyWarning)
        }

        cc.checkapproval();
    },



    checkapproval: function () {

        if (cc.settings.onlyshowwithineu != 1) {
            ineu = cc.getcookie('cc_ineu');
            if (ineu) {
                if (ineu == "no") {
                    jQuery.each(cc.cookies, function (key, value) {
                        cc.approved[key] = "yes";
                    });
                    cc.settings.hideprivacysettingstab = 1;
                    cc.settings.hidepopupprivatesettings = 1;



                }
            } else {
                if (navigator.geolocation) {
                    navigator.geolocation.getCurrentPosition(cc.success);
                }
            }
        }
        cc.allasked = true;
        jQuery.each(cc.cookies, function (key, value) {
            if (cc.approved[key]) {
                if (cc.approved[key] == "yes" ){
                    cc.cookies[key].asked = true;
                    cc.cookies[key].approved = true;
                    cc.execute(key);
            } else if ( cc.approved[key] == "no") {
                    cc.cookies[key].asked = true;
                    cc.cookies[key].approved = false;
                    cc.executeoff(key);
                } else {

                    cc.allasked = false;
                }
            } else {

                cc.allasked = false;
            }
        });
        if (!cc.allasked) {
            if (!cc.checkedlocal) {
                cc.checklocal();
                return;
            }
            if (cc.settings.consenttype == "implicit") {
                jQuery.each(cc.cookies, function (key, value) {
                    if (!cc.cookies[key].asked) {
                        if (cc.onlyshowbanneronce) {
                            cc.setcookie('cc_' + key, 'yes', cc.settings.cookieExpire);
                        }
                        cc.execute(key);
                    }
                });
            }
            // visualizzare il banner iniziale
           if (cc.settings.hideprivacysettingstab == 1){
                cc.showbanner();
            }

        } else {
            if (cc.settings.hidepopupprivatesettings == 1) {
                cc.showminiconsent();
            }
        }
    },

    success:function(position) {
        if (position){
            jQuery.getScript(cc.settings.httpserviceapilocation+"callback=cc.locationcallback");
            return;
        }

    },


    execute: function (cookieType) {
        if (cookieType == "necessary") {
            return;
        }
        jQuery('.cc-placeholder-' + cookieType).remove();
        jQuery('script.cc-onconsent-' + cookieType + '[type="text/plain"]').each(function () {

            var str = jQuery(this).text();
            var initframe = str.indexOf("<iframe");
            if (initframe > -1){
                var theframe = str.indexOf("</iframe>");
                var strframe = str.substring(initframe, theframe+9);
                jQuery(this).next().hide()
                jQuery(this).after(strframe)
            }else{
                if (jQuery(this).attr('src')) {
                    jQuery(this).next().hide();
                    jQuery(this).after('<script type="text/javascript" src="' + jQuery(this).attr('src') + '"></script>');
                } else {
                    jQuery(this).next().hide();
                    jQuery(this).after('<script type="text/javascript">' + jQuery(this).html() + '</script>');

                }
            }

        });

        cc.cookies[cookieType].executed = true;
        jQuery(document).trigger("cc_" + cookieType);

        cc.executescriptinclusion(cookieType);

    },


    executeoff: function (cookieType) {
        if (cookieType == "necessary") {
            return;
        }
        var i = 0;

        jQuery('script.cc-onconsent-' + cookieType + '[type="text/plain"]').each(function () {
                i++;
                var str_id ="id_"+cookieType+"_"+i;
                if ($('#'+str_id).length == 0){
                    var vuoto = "<div class='image_off' id="+str_id+"><span class='text_off'><span class='bg_text'>"+cc.strings.textOff+"</span></span></div>" ;
                    jQuery(this).after(vuoto);
                }

        });

    },


    executescriptinclusion: function (cookieType) {
        timetaken = jQuery('script.cc-onconsent-inline-' + cookieType + '[type="text/plain"]').length * cc.scriptdelay;
        now = new Date().getTime();
        if (now < cc.executionblock) {
            setTimeout(cc.executescriptinclusion, cc.executionblock - now, [cookieType]);
            return;
        }
        cc.executionblock = now + timetaken;

        cc.insertscripts(cookieType);
    },

    insertscripts: function (cookieType) {

        jQuery('script.cc-onconsent-inline-' + cookieType + '[type="text/plain"]').first().each(function () {
            cc.uniqelemid++;

            if (jQuery(this).parents('body').length  > 0) {
                jQuery(this).after('<div id="cc-consentarea-' + cc.uniqelemid + '" class="' + cookieType + '"></div>');
                document.write = function (g) {
                    jQuery('#cc-consentarea-' + cc.uniqelemid).append(g);
                };
                document.writeln = function (g) {
                    jQuery('#cc-consentarea-' + cc.uniqelemid).append(g);
                };
            }

            if (jQuery(this).attr('src')) {
                jQuery(this).after('<script type="text/javascript" src="' + jQuery(this).attr('src') + '"></script>');
            } else {
                jQuery(this).after('<script type="text/javascript">' + jQuery(this).html() + '</script>');
            }
            jQuery(this).remove();


        });

        if (jQuery('script.cc-onconsent-inline-' + cookieType + '[type="text/plain"]').length > 0) {
            setTimeout(cc.insertscripts, cc.scriptdelay, [cookieType]);
        }

    },

    getcookie: function (c_name) {
        var i, x, y, ARRcookies = document.cookie.split(";");
        for (i = 0; i < ARRcookies.length; i++) {
            x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
            y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
            x = x.replace(/^\s+|\s+$/g, "");
            if (x == c_name) {
                return unescape(y);
            }
        }
        return false;
    },

    setcookie: function (name, value, expirydays) {
        var exdate = new Date();
        exdate.setTime(exdate.getTime()+(expirydays*24*60*60*1000));
        document.cookie = name + '=' + value + '; expires=' + exdate.toGMTString() + '; path=/'
    },




    onremoteconsentgiven: function () {
        cc.allagree = true;
        jQuery.each(cc.cookies, function (key, value) {
            if (!value.approved && !value.asked) {
                if (jQuery('#cc-checkbox-' + key).is(':checked')) {

                    cc.approved[key] = "yes";

                    cc.cookies[key].asked = true;
                } else {

                    cc.approved[key] = "no";

                    cc.allagree = false;
                    cc.cookies[key].asked = true;

                }
                cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);
            } else {
            }
        });


        if (!cc.ismobile) {
            jQuery('#cc-notification').slideUp();
            if (cc.settings.bannerPosition == "cc-push") {
                //detect body margin
                jQuery('html').animate({marginTop: 0}, 400);
            }
        }
        cc.checkapproval();

        return false;
    },

    onlocalconsentgiven: function () {
        enableall = false;
        enablejustone = false;
        if (jQuery(this).hasClass('cc-button-enableall') || jQuery(this).hasClass('cc-button-enable-all')) {
            enableall = true;
            jQuery.each(cc.cookies, function (key, value) {
                cc.cookies[key].asked = false;
            });
        }
        elem = this;
        jQuery.each(cc.cookies, function (key, value) {
            if (jQuery(elem).hasClass('cc-button-enable-' + key)) {
                enablejustone = true;
                cc.approved[key] = "yes";
                cc.cookies[key].asked = true;
                cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);
            }
        });

        cc.allagree = true;
        if (!enablejustone) {
            jQuery.each(cc.cookies, function (key, value) {
                if (!value.approved && !value.asked) {
                    if (enableall || jQuery('#cc-checkbox-' + key).is(':checked')) {
                        cc.approved[key] = "yes";
                        cc.cookies[key].asked = true;
                    } else {
                        cc.approved[key] = "no";
                        cc.cookies[key].asked = true;
                        cc.allagree = false;
                    }
                    cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);
                } else {
                }
            });
        }

        if (!cc.allagree && cc.settings.consenttype == "implicit") {
            cc.forcereload = true;
        }

        if (!cc.ismobile) {
            jQuery('#cc-notification').slideUp();
            if (cc.settings.bannerPosition == "cc-push") {
                //detect body margin
                jQuery('html').animate({marginTop: 0}, 400);
            }
        }
        cc.checkapproval();
        cc.reloadifnecessary();

        return false;
    },

    showminiconsent: function () {
        if (jQuery('#cc-tag').length == 0) {
            var data = '<div id="cc-tag" class="cc-tag-' + cc.settings.tagPosition + '"><a class="cc-link" href="#" id="cc-tag-button" title="' + cc.strings.privacySettings + '"><span>' + cc.strings.privacySettings + '</span></a></div>';
            jQuery('body').prepend(data);
            jQuery('#cc-tag').addClass(cc.settings.style);
            if (cc.settings.hideprivacysettingstab == 1) {
                if (cc.settings.hidepopupprivatesettings == 1){
                    jQuery('#cc-tag').fadeIn();
                }
            } else {
                jQuery('#cc-tag').hide();
            }
            jQuery('.cc-privacy-link').click(cc.showmodal);
            jQuery('#cc-tag-button').click(cc.showmodal);



            // disabilito tutti gli iframe id_social_
            if (cc.approved['social'] == 'no'){
                var iframe_id_social = jQuery("div[id^='id_social']")
                iframe_id_social.each(function(){
                    jQuery(this).children().click(cc.showmodal);
                })
            }

            // disabilito tutti gli iframe id_analytics_
            if (cc.approved['analytics'] == 'no'){
                var iframe_id_analytics = jQuery("div[id^='id_analytics']")
                iframe_id_analytics.each(function(){
                    jQuery(this).children().click(cc.showmodal);
                })
            }
        }

    },
    getsize: function (obj) {
        var size = 0, key;
        for (key in obj) {
            if (obj.hasOwnProperty(key)) size++;
        }
        return size;
    },



    showmodal: function () {

        jQuery(document).bind('keyup', cc.onkeyup);
        jQuery('body').prepend('<div id="cc-modal-overlay"></div>');
        jQuery(this).blur();
        if (cc.ismobile) {
            cc.setupformobile();
        }
        data = '<div id="cc-modal">' +
            '<div id="cc-modal-wrapper">' +
            '<h2>' + cc.strings.privacySettingsDialogTitleA + '</h2>' +
            '<p class="cc-subtitle">' + cc.strings.privacySettingsDialogSubtitle + '</p>' +

            '<div class="cc-content">' +
            '</div>' +

            '<div class="cc-clear"></div>' +

            '<p id="cc-modal-closebutton" class="cc-modal-closebutton"><a class="cc-link" href="#" title="' + cc.strings.closeWindow + '"><span>' + cc.strings.closeWindow + '</span></a></p>' +
            '<div id="cc-modal-footer-buttons">' +
            '<div class="cc-clear"></div>' +
            '</div>' +
            '</div>';
        jQuery('body').prepend(data);
        if (cc.settings.confirmClick == 1)
            jQuery('#cc-modal').addClass(cc.settings.style).click(cc.closemodals);
        if (cc.settings.confirmScroll == 1)
           jQuery(window).addClass(cc.settings.style).scroll(cc.closemodals);

        if (cc.ismobile) {
            jQuery('#cc-modal').addClass("cc-mobile");
        }
        cc.reloadmodal();
        jQuery('#cc-modal').fadeIn();
        jQuery('#cc-modal-overlay').fadeIn();
        jQuery('#cc-modal-wrapper').click(function () {
            cc.noclosewin = true;
        });
        jQuery('#cc-modal .cc-modal-closebutton a').click(function () {
            cc.showhidemodal();
            cc.reloadifnecessary();
            return false;
        });

        jQuery('#cc-modal-global').click(function () {
            cc.frommodal = true;
            cc.gotosettings();
            return false;
        });
        jQuery('#cc-tag-button').unbind('click').click(cc.showhidemodal);
        jQuery('.cc-privacy-link').unbind('click').click(cc.showhidemodal);

        //parte aggiuntiva
        if (cc.approved['social'] == 'no'){
            var iframe_id_social = jQuery("div[id^='id_social']")
            iframe_id_social.each(function(){
                jQuery(this).children().unbind('click').click(cc.showmodal);
            })
        }
        if (cc.approved['analytics'] == 'no'){
            var iframe_id_analytics = jQuery("div[id^='id_analytics']")
            iframe_id_analytics.each(function(){
                jQuery(this).children().unbind('click').click(cc.showmodal);
            })
        }

        return false;
    },

    closepreferencesmodal: function () {
        jQuery.each(cc.defaultCookies, function (key, value) {
            value = jQuery('#cc-globalpreference-selector-' + key).val();
            if (cc.approved[key] != "yes" && cc.approved[key] != "no") {
                cc.approved[key] = value;
                cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);
            }

        });


        jQuery('#cc-notification').hide().remove();
        jQuery(this).blur();
        jQuery('#cc-settingsmodal').fadeOut(null, function () {
            jQuery('#cc-settingsmodal').remove();
        });
        if (!cc.frommodal) {
            cc.checkapproval();
            cc.reloadifnecessary();
        } else {
            cc.frommodal = false;
            cc.showhidemodal();
        }
        return false;
    },

    showhidemodal: function () {
        jQuery(this).blur();
        cc.checkedlocal = false;
        if (jQuery('#cc-modal').is(":visible") && !cc.frommodal) {
            cc.closingmodal = true;
            jQuery('#cc-modal-overlay').fadeToggle(null, function () {
                cc.closingmodal = false;
            });
            jQuery.each(cc.cookies, function (key, value) {
                thisval = jQuery('#cc-preference-selector-' + key).val();

                if (key == "necessary") {
                    thisval = "yes";
                }

                if (thisval == "no") {
                    var str_domain = window.location.hostname;
                    var id = str_domain.indexOf("www");
                    if (id != -1)
                        var s_domain = str_domain.substring(id+3);
                    cc.cookies[key].approved = false;
                    cc.approved[key] = "no";
                    cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);
                    var i, x, Arraycookie = document.cookie.split(";");
                    for (i = 0; i < Arraycookie.length; i++) {
                        x = Arraycookie[i].substr(0, Arraycookie[i].indexOf("="));
                        x = x.replace(/^\s+|\s+$/g, "");
                        if (key == 'analytics'){
                            cc.removecookieAnalytics(x,'/',s_domain);
                        }
                    }

                } else if (thisval == "yes") {
                    cc.cookies[key].approved = true;
                    cc.approved[key] = "yes";
                    cc.setcookie('cc_' + key, cc.approved[key], cc.settings.cookieExpire);


                } else {
                    cc.cookies[key].approved = false;
                    cc.deletecookie(key);
                    delete cc.approved[key];
                }
                cc.cookies[key].asked = false;

            });
            cc.checkapproval();
        } else if (!jQuery('#cc-settingsmodal').is(":visible") && !jQuery('#cc-modal').is(":visible")) {
            cc.closingmodal = true;
            jQuery('#cc-modal-overlay').fadeToggle(null, function () {
                cc.closingmodal = false;
            });
        }
        if (cc.ismobile) {
            jQuery('#cc-modal').toggle();
        } else {
            jQuery('#cc-modal').fadeToggle();
        }
        return false;
    },


    reloadmodal: function () {
        jQuery('#cc-modal-wrapper .cc-content').html('');
        if (cc.getsize(cc.cookies) > 0) {
            jQuery('#cc-modal-wrapper .cc-content').append('<ul></ul>');
            jQuery.each(cc.cookies, function (key, value) {
                jQuery('#cc-modal-wrapper ul').append('<li id="cc-preference-element-' + key + '"><label for="cc-preference-selector-' + key + '"><strong>' + value.title + '</strong><span>' + value.description + '</span></label><select id="cc-preference-selector-' + key + '"><option value="yes">' + cc.strings.preferenceConsent + '</option><option value="no">' + cc.strings.preferenceDecline + '</option></select></li>');
                if (value.link) {
                    jQuery('#cc-preference-element-' + key + ' label span').append(' <a target="_blank" href="' + value.link + '" class="cc-learnmore-link">' + cc.strings.learnMore + '</a>');
                }
                jQuery('#cc-change-button-allsites').unbind('click').click(function () {
                    cc.frommodal = true;
                    cc.gotosettings();
                    return false;
                });
                jQuery('#cc-preference-selector-' + key).change(function () {

                });
                if (key == "necessary") {
                    jQuery('#cc-preference-selector-' + key).remove();
                }
                if (cc.approved[key] == "yes") {
                    jQuery('#cc-preference-selector-' + key).val("yes")
                }
                else if (cc.approved[key] == "no") {
                    jQuery('#cc-preference-selector-' + key).val("no")
                }
                else {
                    jQuery('#cc-preference-selector-' + key).val("global")
                }

            });
        } else {
            jQuery('#cc-modal-wrapper .cc-content').append('<p>' + cc.strings.notUsingCookies + '</p>');
        }
        jQuery('.cc-content').append('<div class="cc-clear"></div>');
    },

    gotosettings: function () {
        if (jQuery('#cc-modal').is(":visible")) {
            cc.showhidemodal();
        }
        jQuery(this).blur();
        if (cc.ismobile) {
            cc.setupformobile();
            jQuery('#cc-notification').remove();
        }
        if (cc.frommodal) {
            buttontext = cc.strings.backToSiteSettings;
        } else {
            buttontext = cc.strings.closeWindow;
        }

        data = '<div id="cc-settingsmodal">' +
            '<div id="cc-settingsmodal-wrapper">' +
            '<div class="cc-content">' +
            '</div>' +
            '<div class="cc-clear"></div>' +
            '<p id="cc-settingsmodal-closebutton" class="cc-settingsmodal-closebutton"><a class="cc-link" href="#" title="' + buttontext + '"><span>' + buttontext + '</span></a></p>' +
            '<div id="cc-settingsmodal-footer-buttons">' +
            '<p id="cc-settingsmodal-secondclosebutton" class="cc-settingsmodal-closebutton"><a class="cc-link" href="#" title="' + buttontext + '"><span>' + buttontext + '</span></a></p>' +
            '</div>' +
            '</div>' +
            '</div>';
        jQuery('body').prepend(data);
        if (cc.settings.confirmClick == 1)
            jQuery('#cc-settingsmodal').addClass(cc.settings.style).click(cc.closemodals);
        if (cc.settings.confirmScroll == 1)
            jQuery('#cc-settingsmodal').addClass(cc.settings.style).scroll(cc.closemodals);

        jQuery('#cc-settingsmodal-wrapper').click(function () {
            cc.noclosewin = true;
        });
        if (cc.ismobile) {
            jQuery('#cc-settingsmodal').addClass("cc-mobile");
        }
        jQuery('#cc-settingsmodal').fadeIn();
        jQuery('.cc-settingsmodal-closebutton').click(cc.closepreferencesmodal);

        return false;
    },

    setupformobile: function () {
        if (!cc.hassetupmobile) {
            cc.hassetupmobile = true;
            jQuery('head').append('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">');
            if (cc.settings.style == 'cc-light') {
                bgcol = '#e1e1e1';
            } else {
                bgcol = '#1d1d1d'
            }
        }
    },

    onfirstload: function () {
        if (!cc.setupcomplete && cc.initobj) {

            if (!(window.jQuery)) {
                cc.jqueryattempts++;
                if (cc.jqueryattempts >= 5) {
                    return;
                }
                setTimeout(cc.onfirstload, 200);
                return;
            }

            cc.setupcomplete = true;
            cc.setup();

        }
        setTimeout(cc.afterload, 50);
        cc.checkapproval();

    },

    afterload: function () {
        jQuery('.cc-button-enableall').addClass('cc-link').click(cc.onlocalconsentgiven);
        jQuery('.cc-button-enable-all').addClass('cc-link').click(cc.onlocalconsentgiven);
        jQuery.each(cc.cookies, function (key, value) {
            jQuery('.cc-button-enable-' + key).addClass('cc-link').click(cc.onlocalconsentgiven);
        });
    },


    jsonserviceapi:function(data){
        var searchstates = '';
        var acronyms_countries = jQuery.map(data, function(value, index) { return[value]; });
         for (var i = 0; i <= acronyms_countries.length; i++){

            if (acronyms_countries[i] instanceof Object){
                var elem_acronyms_countries = jQuery.map(acronyms_countries[i], function(value, index) { return[value]; });
                for (var j = 0; j <= elem_acronyms_countries.length; j++){
                    if (jQuery.inArray(elem_acronyms_countries[j], cc.eumemberstates) >=0){
                        searchstates = elem_acronyms_countries[j]
                        break;
                    }else if(jQuery.inArray(elem_acronyms_countries[j], cc.noteumemberstates) >= 0){
                        searchstates = elem_acronyms_countries[j]
                        break;
                    }
                }
            }else{
                // controllo se il paese è della comunità europea
                 if (jQuery.inArray(acronyms_countries[i], cc.eumemberstates) >=0){
                     searchstates = acronyms_countries[i]
                     break;
                 }else if(jQuery.inArray(acronyms_countries[i], cc.noteumemberstates) >= 0){
                     searchstates = acronyms_countries[i]
                     break;
                 }
            }
        }
        if (searchstates == '') searchstates = 'error'
        return searchstates;

    },


    messageLanguage :function () {
        var ajaxResponse = '';
        var objectLanguage = '';
        var lang = cc.localeLanguage();
        var url = '';
        if (lang != 0) {
            url = lang+'/?type=1525962364';
        }else{
            url =  window.location.protocol + '//' + window.location.hostname + '/?type=1525962364';
        }

		
			
        jQuery.ajax({
            async: false,
            type:'POST',
            //inserire indirizzo della root
            url: url,
            dataType : 'text',
            success : function (response)
            {
                ajaxResponse = response;
            },
            error: function( req, status, err ) {
                console.log( 'something went wrong:', status, err );
                ajaxResponse = 'error'
            }
        });
        if (ajaxResponse != 'error'){
            var indResponse = ajaxResponse.split('","')
            var strMessage = [];
            for (var i = 0; i < indResponse.length; i++){
                strMessage[i] = indResponse[i].replace('["','');
                if (i == 21){
                    idx = indResponse[i].indexOf('"]');
                    strMessage[i] = indResponse[i].substring(0, idx);
                }
            }

            objectLanguage = {
                strings:{
                    jqueryWarning: strMessage[0],
                    invalidKeyWarning: strMessage[1],
                    socialDefaultTitle: strMessage[2],
                    analyticsDefaultTitle: strMessage[3],
                    socialDefaultDescription: strMessage[4],
                    analyticsDefaultDescription: strMessage[5],
                    notificationTitle: strMessage[6],
                    seeDetails: strMessage[7],
                    seeDetailsImplicit: strMessage[8],
                    hideDetails: strMessage[9],
                    savePreference: strMessage[10],
                    allowCookies: strMessage[11],
                    allowCookiesImplicit: strMessage[12],
                    privacySettings: strMessage[13],
                    privacySettingsDialogTitleA: strMessage[14],
                    privacySettingsDialogSubtitle: strMessage[15],
                    closeWindow: strMessage[16],
                    preferenceConsent: strMessage[17],
                    preferenceDecline: strMessage[18],
                    notificationTitleImplicit: strMessage[19],
                    informationCookies:strMessage[20],
                    textOff:strMessage[21]
                }
            }
            return objectLanguage.strings;
        }
        else
           return ajaxResponse;
    },

    localeLanguage :function () {

        var aip_cookie_language = jQuery('meta[name=aip_cookielaw_language]').attr('content');
        if (aip_cookie_language !== undefined)
            return aip_cookie_language;
        else
           return 0;

    }

}

if (!(window.jQuery)) {
    var s = document.createElement('script');
    s.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
    s.setAttribute('type', 'text/javascript');
    document.getElementsByTagName('head')[0].appendChild(s);

    if (window.onload != null) {
        var oldOnload = window.onload;
        window.onload = function (e) {
            oldOnload(e);
            cc.onfirstload();
        };
    } else {

            window.onload = cc.onfirstload;
    }

} else {
     jQuery(document).ready(cc.onfirstload);
}

/**
 * jQuery.browser.mobile (http://detectmobilebrowser.com/)
 *
 * jQuery.browser.mobile will be true if the browser is a mobile device - modified so that cc.ismobile is true
 *
 **/
(function (a) {
    cc.ismobile = /android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))
})(navigator.userAgent || navigator.vendor || window.opera);

 var compDefault = {
        cookies: {
            social: {},
            analytics: {}
        },
        settings: {
        },
        strings: {
        }
 };

 var count = 0;
 if (typeof componente != 'undefined'){
     jQuery.each(componente.settings, function (key, value) {
            if (key == 'consenttype' && value == 'Opt-in(Explicit)')
                componente.settings[key] = 'explicit'
            if (key == 'consenttype' && value == 'Opt-out(Implicit)')
                componente.settings[key] = 'implicit'
            count ++;
     });
 }

 if (count == 0){
    cc.initialise(compDefault);
 }else{
    cc.initialise(componente);

 }




