!function(a){var b=!1;if("function"==typeof define&&define.amd&&(define(a),b=!0),"object"==typeof exports&&(module.exports=a(),b=!0),!b){var c=window.Cookies,d=window.Cookies=a();d.noConflict=function(){return window.Cookies=c,d}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if("undefined"!=typeof document){if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}f.expires=f.expires?f.expires.toUTCString():"";try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}e=c.write?c.write(e,b):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape);var j="";for(var k in f)f[k]&&(j+="; "+k,f[k]!==!0&&(j+="="+f[k]));return document.cookie=b+"="+e+j}b||(g={});for(var l=document.cookie?document.cookie.split("; "):[],m=/(%[0-9A-Z]{2})+/g,n=0;n<l.length;n++){var o=l[n].split("="),p=o.slice(1).join("=");'"'===p.charAt(0)&&(p=p.slice(1,-1));try{var q=o[0].replace(m,decodeURIComponent);if(p=c.read?c.read(p,q):c(p,q)||p.replace(m,decodeURIComponent),this.json)try{p=JSON.parse(p)}catch(i){}if(b===q){g=p;break}b||(g[q]=p)}catch(i){}}return g}}return d.set=d,d.get=function(a){return d.call(d,a)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b(function(){})}),jQuery(document).ready(function(a){}),jQuery(document).ready(function(a){a('[data-aawp-click-tracking="true"] a, a[data-aawp-click-tracking="true"]').on("click",function(b){var c=a(this);if("undefined"==typeof c.data("aawp-prevent-click-tracking")){var d=a(this).attr("data-aawp-click-tracking")?a(this):a(this).closest('[data-aawp-click-tracking="true"]'),e=!1;if("undefined"!=typeof d.data("aawp-product-id")&&(e=d.data("aawp-product-id")),"undefined"!=typeof d.data("aawp-product-title")&&(e=d.data("aawp-product-title")),e){var h="amazon-link",i="click";"undefined"!=typeof ga?ga("send","event",h,i,e):"undefined"!=typeof _gaq?_gaq.push(["_trackEvent",h,i,e]):"undefined"!=typeof __gaTracker?__gaTracker("send","event",h,i,e):"undefined"!=typeof _paq?_paq.push(["trackEvent",h,i,e]):"undefined"!=typeof dataLayer&&dataLayer.push({event:h,category:f,action:g,label:b})}}})}),jQuery(document).ready(function(a){function b(){q=q.toLowerCase(),l.hasOwnProperty(q)&&(p=l[q],p!==o&&m.hasOwnProperty(p)&&(r=m[p],e(o,p,r)))}function c(){var a="https://ipinfo.io/json/";jQuery.ajax({url:a,dataType:"json"},"jsonp").always(function(a){}).done(function(a){q=a.country,"undefined"==typeof q?q="":j(q),b()}).fail(function(a){d()})}function d(){var a="https://freegeoip.net/json/";jQuery.ajax({url:a,dataType:"json"},"jsonp").always(function(a){}).done(function(a){q=a.country_code,"undefined"==typeof q?q="":j(q),b()}).fail(function(a){})}function e(b,c,d){null!==d&&a("a[href*='/amazon'], a[href*='/www.amazon'], a[href*='/amzn'], a[href*='/www.amzn']").each(function(e){var i=a(this).attr("href");"asin"===n||i.indexOf("prime")!=-1?i=g(i,b,c):"title"===n&&(i=f(a(this),i,b,c)),i=h(i,"tag",d),a(this).attr("href",i)})}function f(b,c,d,e){var f=b.data("aawp-product-title");return f||(f=b.parents().filter(function(){return a(this).data("aawp-product-title")}).eq(0).data("aawp-product-title")),f&&(f=i(f,5),c="https://www.amazon."+e+"/s/?field-keywords="+encodeURIComponent(f)),c}function g(a,b,c){var d=!1,e=!1;if(a.indexOf("amzn."+o)!=-1&&(d=!0),a.indexOf("amazon."+o)!=-1&&(e=!0),(d||e)&&a.indexOf("tag=")!=-1)return a="com"==b&&d?a.replace("amzn."+b,"amazon."+c+"/dp"):"com"==c?a.replace("amazon."+b,"amzn."+c):a.replace("amazon."+b,"amazon."+c)}function h(a,b,c){null==c&&(c="");var d=new RegExp("\\b("+b+"=).*?(&|$)");return a.search(d)>=0?a.replace(d,"$1"+c+"$2"):a+(a.indexOf("?")>0?"&":"?")+b+"="+c}function i(a,b){return a.split(/\s+/).slice(0,b).join(" ")}function j(a){a&&s.set("aawp-geotargeting",a)}if("undefined"!=typeof aawp_geotargeting_settings&&"undefined"!=typeof aawp_geotargeting_localized_stores&&"undefined"!=typeof aawp_geotargeting_tracking_ids){var k=aawp_geotargeting_settings,l=aawp_geotargeting_localized_stores,m=aawp_geotargeting_tracking_ids;if(!k.hasOwnProperty("store"))return;var n=k.hasOwnProperty("mode")?k.mode:"mode",o=k.store,p="",q="",r="",s=Cookies.noConflict(),t=s.get("aawp-geotargeting");void 0!==t?(q=t,b()):c()}});