// source --> https://ratteninfos.de/wp-content/plugins/nextgen-gallery/static/Legacy/ajax.min.js?ver=4.2.3 
// TODO: This file can be removed once the minimum Pro API version is 4.0
EasyCookie=(function(){var EPOCH='Thu, 01-Jan-1970 00:00:01 GMT',RATIO=1000*60*60*24,KEYS=['expires','path','domain'],esc=escape,un=unescape,doc=document,me;var get_now=function(){var r=new Date();r.setTime(r.getTime());return r;}
    var cookify=function(c_key,c_val){var i,key,val,r=[],opt=(arguments.length>2)?arguments[2]:{};r.push(esc(c_key)+'='+esc(c_val));for(i=0;i<KEYS.length;i++){key=KEYS[i];if(val=opt[key])
        r.push(key+'='+val);}
        if(opt.secure)
            r.push('secure');return r.join('; ');}
    var alive=function(){var k='__EC_TEST__',v=new Date();v=v.toGMTString();this.set(k,v);this.enabled=(this.remove(k)==v);return this.enabled;}
    me={set:function(key,val){var opt=(arguments.length>2)?arguments[2]:{},now=get_now(),expire_at,cfg={};if(opt.expires){opt.expires*=RATIO;cfg.expires=new Date(now.getTime()+opt.expires);cfg.expires=cfg.expires.toGMTString();}
        var keys=['path','domain','secure'];for(i=0;i<keys.length;i++)
            if(opt[keys[i]])
                cfg[keys[i]]=opt[keys[i]];var r=cookify(key,val,cfg);doc.cookie=r;return val;},has:function(key){key=esc(key);var c=doc.cookie,ofs=c.indexOf(key+'='),len=ofs+key.length+1,sub=c.substring(0,key.length);return((!ofs&&key!=sub)||ofs<0)?false:true;},get:function(key){key=esc(key);var c=doc.cookie,ofs=c.indexOf(key+'='),len=ofs+key.length+1,sub=c.substring(0,key.length),end;if((!ofs&&key!=sub)||ofs<0)
        return null;end=c.indexOf(';',len);if(end<0)
        end=c.length;return un(c.substring(len,end));},remove:function(k){var r=me.get(k),opt={expires:EPOCH};doc.cookie=cookify(k,'',opt);return r;},keys:function(){var c=doc.cookie,ps=c.split('; '),i,p,r=[];for(i=0;i<ps.length;i++){p=ps[i].split('=');r.push(un(p[0]));}
        return r;},all:function(){var c=doc.cookie,ps=c.split('; '),i,p,r=[];for(i=0;i<ps.length;i++){p=ps[i].split('=');r.push([un(p[0]),un(p[1])]);}
        return r;},version:'0.2.1',enabled:false};me.enabled=alive.call(me);return me;}());

window.Ngg_Store = {

    get: function(key){
        return EasyCookie.get(key);
    },

    set: function(key, value){
        if (typeof(value) == 'object') {
            value = JSON.stringify(value);
        }
        return EasyCookie.set(key, value, {
            expires: 10,
            path: '/',
            secure: false
        });
    },

    del: function(key){
        EasyCookie.remove(key);
        return !this.has(key);
    },

    has: function(key){
        var value = this.get(key);
        return typeof(value) != 'undefined' && value != null;
    },

    save: function(){
        return true;
    }
};

jQuery(function($){
    $(window).on('unload', function(){
        Ngg_Store.save();
    })
});
// source --> https://ratteninfos.de/wp-content/plugins/nextgen-gallery/static/Thumbnails/nextgen_basic_thumbnails.js?ver=4.2.3 
jQuery(function($) {
    var ngg_imagebrowser_init = function() {
        var imagebrowser_links = $('a.use_imagebrowser_effect');
        imagebrowser_links.on('click', function(e) {
            e.preventDefault();
            var success = true;
            var $this   = $(this);
            var image_id   = $this.attr('data-image-id');
            var image_slug = $this.attr('data-image-slug');
            var image_url  = $this.attr('data-imagebrowser-url');

            var url = window.location.toString();
            url = url.split('/' + photocrati_ajax.ngg_param_slug + '/').shift();
            if (url.substr(-1) === '/')
                url = url.substr(0, url.length - 1);

            image_id = image_slug ? image_slug : image_id;
            try {
                if (!image_id)
                    image_id = parseInt($this.parents('.ngg-gallery-thumbnail-box').attr('id').match(/\d+/).join(''));
            } catch (ex) {
                success = false;
            }

            if (success) {

                url = image_url.replace('%STUB%', image_id);

                /* TODO: Remove this entire chunk. It should be unecessary.
                // Custom permalinks are disabled. So we have to redirect to /index.php/nggallery/image/n?qs=1
                if (photocrati_ajax.wp_root_url.indexOf('index.php') >= 0) {
                    url = photocrati_ajax.wp_root_url + "/" + photocrati_ajax.ngg_param_slug + "/image/" + image_id;
                    if (window.location.toString().indexOf('?') >= 0)
                        url += '?'+window.location.toString().split('?').pop();
                } else {
                    // Just append the slug
                    url += "/" + photocrati_ajax.ngg_param_slug + "/image/" + image_id;
                } */

                window.location = url;
            }
        });

        // Unregister any onclick handlers added after the above has executed to avoid conflicts
        if (imagebrowser_links.length > 0) {
            setTimeout(function() {
                imagebrowser_links.each(function() {
                    this.onclick = null;
                });
            }, 200);
        }
    };

    $(this).on('refreshed', ngg_imagebrowser_init);
    ngg_imagebrowser_init();
});
// source --> https://ratteninfos.de/wp-content/themes/wellington/assets/js/svgxuse.min.js?ver=1.2.6 
/*!
 * @copyright Copyright (c) 2017 IcoMoon.io
 * @license   Licensed under MIT license
 *            See https://github.com/Keyamoon/svgxuse
 * @version   1.2.6
 */
(function(){if("undefined"!==typeof window&&window.addEventListener){var e=Object.create(null),l,d=function(){clearTimeout(l);l=setTimeout(n,100)},m=function(){},t=function(){window.addEventListener("resize",d,!1);window.addEventListener("orientationchange",d,!1);if(window.MutationObserver){var k=new MutationObserver(d);k.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0});m=function(){try{k.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",
d,!1)}catch(v){}}}else document.documentElement.addEventListener("DOMSubtreeModified",d,!1),m=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1);window.removeEventListener("resize",d,!1);window.removeEventListener("orientationchange",d,!1)}},u=function(k){function e(a){if(void 0!==a.protocol)var c=a;else c=document.createElement("a"),c.href=a;return c.protocol.replace(/:/g,"")+c.host}if(window.XMLHttpRequest){var d=new XMLHttpRequest;var m=e(location);k=e(k);d=void 0===
d.withCredentials&&""!==k&&k!==m?XDomainRequest||void 0:XMLHttpRequest}return d};var n=function(){function d(){--q;0===q&&(m(),t())}function l(a){return function(){!0!==e[a.base]&&(a.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a.hash),a.useEl.hasAttribute("href")&&a.useEl.setAttribute("href","#"+a.hash))}}function p(a){return function(){var c=document.body,b=document.createElement("x");a.onload=null;b.innerHTML=a.responseText;if(b=b.getElementsByTagName("svg")[0])b.setAttribute("aria-hidden",
"true"),b.style.position="absolute",b.style.width=0,b.style.height=0,b.style.overflow="hidden",c.insertBefore(b,c.firstChild);d()}}function n(a){return function(){a.onerror=null;a.ontimeout=null;d()}}var a,c,q=0;m();var f=document.getElementsByTagName("use");for(c=0;c<f.length;c+=1){try{var g=f[c].getBoundingClientRect()}catch(w){g=!1}var h=(a=f[c].getAttribute("href")||f[c].getAttributeNS("http://www.w3.org/1999/xlink","href")||f[c].getAttribute("xlink:href"))&&a.split?a.split("#"):["",""];var b=
h[0];h=h[1];var r=g&&0===g.left&&0===g.right&&0===g.top&&0===g.bottom;g&&0===g.width&&0===g.height&&!r?(f[c].hasAttribute("href")&&f[c].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),b.length&&(a=e[b],!0!==a&&setTimeout(l({useEl:f[c],base:b,hash:h}),0),void 0===a&&(h=u(b),void 0!==h&&(a=new h,e[b]=a,a.onload=p(a),a.onerror=n(a),a.ontimeout=n(a),a.open("GET",b),a.send(),q+=1)))):r?b.length&&e[b]&&setTimeout(l({useEl:f[c],base:b,hash:h}),0):void 0===e[b]?e[b]=!0:e[b].onload&&(e[b].abort(),
delete e[b].onload,e[b]=!0)}f="";q+=1;d()};var p=function(){window.removeEventListener("load",p,!1);l=setTimeout(n,0)};"complete"!==document.readyState?window.addEventListener("load",p,!1):p()}})();