Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating to latest version of the Mini Cart to fix a duplicate render…

… issue
  • Loading branch information...
commit 53e036150e5736770a79192ed721f9500ea41e66 1 parent 97bb32a
@jeffharrell jeffharrell authored
View
4 Gruntfile.js
@@ -22,7 +22,7 @@ module.exports = function (grunt) {
}
},
bundled: {
- src: [ "<banner:meta.banner>", "lib/MiniCart/minicart.js", "src/paypal-button.js" ],
+ src: [ "<banner:meta.banner>", "lib/MiniCart/src/minicart.js", "src/paypal-button.js" ],
dest: "dist/paypal-button-minicart.js",
options: {
banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */\n"
@@ -38,7 +38,7 @@ module.exports = function (grunt) {
}
},
bundled: {
- src: [ "<banner:meta.banner>", "lib/MiniCart/minicart.js", "src/paypal-button.js" ],
+ src: [ "<banner:meta.banner>", "lib/MiniCart/src/minicart.js", "src/paypal-button.js" ],
dest: "dist/paypal-button-minicart.min.js",
options: {
banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */\n"
View
356 dist/paypal-button-minicart.js
@@ -5,12 +5,14 @@
* @author Jeff Harrell <https://github.com/jeffharrell/>
*/
/*!
- * The PayPal Mini Cart
- * Visit http://www.minicartjs.com/ for details
- * Use subject to license agreement as set forth at the link below
+ * MiniCart
*
- * @author Jeff Harrell
- * @license https://github.com/jeffharrell/MiniCart/blob/master/LICENSE eBay Open Source License Agreement
+ * Improve your PayPal integration by creating an overlay which appears as a user adds products to their cart.
+ *
+ * @version 2.5.0 - 2012-12-02, 1:04:43 PM
+ * @author Jeff Harrell <https://github.com/jeffharrell/>
+ * @url http://www.minicartjs.com/
+ * @license <eBay Open Source License Agreement <https://github.com/jeffharrell/MiniCart/blob/master/LICENSE>>
*/
if (typeof PAYPAL === 'undefined' || !PAYPAL) {
var PAYPAL = {};
@@ -52,6 +54,11 @@ PAYPAL.apps = PAYPAL.apps || {};
cookiePath: '/',
/**
+ * The number of days to keep the cart data
+ */
+ cartDuration: 30,
+
+ /**
* Strings used for display text
*/
strings: {
@@ -169,7 +176,6 @@ PAYPAL.apps = PAYPAL.apps || {};
};
-
if (!PAYPAL.apps.MiniCart) {
/**
@@ -531,13 +537,13 @@ PAYPAL.apps = PAYPAL.apps || {};
/**
* Resets the card and renders the products
*/
- var _redrawCartItems = function () {
+ var _redrawCartItems = function (silent) {
minicart.products = [];
minicart.UI.itemList.innerHTML = '';
minicart.UI.subtotalAmount.innerHTML = '';
_parseStorage();
- minicart.updateSubtotal();
+ minicart.updateSubtotal(silent);
};
@@ -680,7 +686,7 @@ PAYPAL.apps = PAYPAL.apps || {};
minicart.products[offset].product.item_number = '';
minicart.updateSubtotal();
- $.storage.save(minicart.products);
+ $.storage.save(minicart.products, config.cartDuration);
};
@@ -724,10 +730,14 @@ PAYPAL.apps = PAYPAL.apps || {};
* @param userConfig {object} User settings which override the default configuration
*/
minicart.render = function (userConfig) {
- var events = config.events,
- onRender = events.onRender,
- afterRender = events.afterRender,
- hash, cmd;
+ var events, onRender, afterRender, hash, cmd;
+
+ // Overwrite default configuration with user settings
+ _parseUserConfig(userConfig);
+
+ events = config.events;
+ onRender = events.onRender;
+ afterRender = events.afterRender;
if (typeof onRender === 'function') {
if (onRender.call(minicart) === false) {
@@ -736,9 +746,6 @@ PAYPAL.apps = PAYPAL.apps || {};
}
if (!isRendered) {
- // Overwrite default configuration with user settings
- _parseUserConfig(userConfig);
-
// Render the cart UI
_addCSS();
_buildDOM();
@@ -763,7 +770,7 @@ PAYPAL.apps = PAYPAL.apps || {};
// Process any stored data and render it
// TODO: _parseStorage shouldn't be so tightly coupled here and one
// should be able to redraw without re-parsing the storage
- _redrawCartItems();
+ _redrawCartItems(true);
// Trigger the cart to peek on first load if any products were loaded
if (!isRendered) {
@@ -809,7 +816,6 @@ PAYPAL.apps = PAYPAL.apps || {};
return true;
};
-
/**
* Adds a product to the cart
*
@@ -848,7 +854,7 @@ PAYPAL.apps = PAYPAL.apps || {};
minicart.updateSubtotal();
minicart.show(null);
- $.storage.save(minicart.products);
+ $.storage.save(minicart.products, config.cartDuration);
if (typeof afterAddToCart === 'function') {
afterAddToCart.call(minicart, data);
@@ -899,7 +905,7 @@ PAYPAL.apps = PAYPAL.apps || {};
/**
* Updates the UI with the current subtotal and currency code
*/
- minicart.updateSubtotal = function () {
+ minicart.updateSubtotal = function (silent) {
var ui = minicart.UI,
cartEl = ui.cart.elements,
subtotalEl = ui.subtotalAmount,
@@ -926,25 +932,27 @@ PAYPAL.apps = PAYPAL.apps || {};
subtotalEl.innerHTML = $.util.formatCurrency(subtotal, currency_code);
// Yellow fade on update
- (function doFade() {
- hex = level.toString(16);
- level++;
+ if (!silent) {
+ (function doFade() {
+ hex = level.toString(16);
+ level++;
- subtotalEl.style.backgroundColor = '#ff' + hex;
+ subtotalEl.style.backgroundColor = '#ff' + hex;
- if (level >= 15) {
- subtotalEl.style.backgroundColor = 'transparent';
+ if (level >= 15) {
+ subtotalEl.style.backgroundColor = 'transparent';
- // hide the cart if there's no total
- if (subtotal === '0.00') {
- minicart.hide(null, true);
- }
+ // hide the cart if there's no total
+ if (subtotal === '0.00') {
+ minicart.reset();
+ }
- return;
- }
+ return;
+ }
- setTimeout(doFade, 30);
- })();
+ setTimeout(doFade, 30);
+ })();
+ }
};
@@ -1139,11 +1147,13 @@ PAYPAL.apps = PAYPAL.apps || {};
// Discount
discount = this.getDiscount();
- this.discountInput.type = 'hidden';
- this.discountInput.name = 'discount_amount_' + position;
- this.discountInput.value = discount;
+ if (discount) {
+ this.discountInput.type = 'hidden';
+ this.discountInput.name = 'discount_amount_' + position;
+ this.discountInput.value = discount;
- this.metaNode.appendChild(this.discountNode);
+ this.metaNode.appendChild(this.discountNode);
+ }
// Price
price = this.getPrice();
@@ -1165,7 +1175,11 @@ PAYPAL.apps = PAYPAL.apps || {};
// Build out the DOM
this.liNode.appendChild(this.nameNode);
this.liNode.appendChild(this.quantityInput);
- this.liNode.appendChild(this.discountInput);
+
+ if (discount) {
+ this.liNode.appendChild(this.discountInput);
+ }
+
this.liNode.appendChild(this.removeInput);
this.liNode.appendChild(this.priceNode);
@@ -1261,6 +1275,15 @@ PAYPAL.apps = PAYPAL.apps || {};
if ((discount = this.getDiscount())) {
this.discountInput.value = discount;
+ /**
+ * Append the discount node if it doesn't already exist
+ *
+ * @author Ethan Schroeder <ethan.schroeder@gmail.com>
+ */
+ if (!this.discountNode.innerHTML) {
+ this.metaNode.appendChild(this.discountNode);
+ }
+
this.discountNode.innerHTML = '<br />';
this.discountNode.innerHTML += config.strings.discount || 'Discount: ';
this.discountNode.innerHTML += $.util.formatCurrency(discount, this.settings.currency_code);
@@ -1322,13 +1345,29 @@ PAYPAL.apps = PAYPAL.apps || {};
* @return {object}
*/
load: function () {
- var data = localStorage.getItem(name);
+ var data = localStorage.getItem(name),
+ todayDate, expiresDate;
if (data) {
data = JSON.parse(decodeURIComponent(data));
}
- return data;
+ if (data && data.expires) {
+ todayDate = new Date();
+ expiresDate = new Date(data.expires);
+
+ if (todayDate > expiresDate) {
+ $.storage.remove();
+ return;
+ }
+ }
+
+ // A little bit of backwards compatibility for the moment
+ if (data && data.value) {
+ return data.value;
+ } else {
+ return data;
+ }
},
@@ -1336,10 +1375,12 @@ PAYPAL.apps = PAYPAL.apps || {};
* Saves the data
*
* @param items {object} The list of items to save
+ * @param duration {Number} The number of days to keep the data
*/
- save: function (items) {
- var data = [],
- item, len, i;
+ save: function (items, duration) {
+ var date = new Date(),
+ data = [],
+ wrappedData, item, len, i;
if (items) {
for (i = 0, len = items.length; i < len; i++) {
@@ -1350,8 +1391,13 @@ PAYPAL.apps = PAYPAL.apps || {};
});
}
- data = encodeURIComponent(JSON.stringify(data));
- localStorage.setItem(name, data);
+ date.setTime(date.getTime() + duration * 24 * 60 * 60 * 1000);
+ wrappedData = {
+ value: data,
+ expires: date.toGMTString()
+ };
+
+ localStorage.setItem(name, encodeURIComponent(JSON.stringify(wrappedData)));
}
},
@@ -1402,6 +1448,7 @@ PAYPAL.apps = PAYPAL.apps || {};
* Saves the data
*
* @param items {object} The list of items to save
+ * @param duration {Number} The number of days to keep the data
*/
save: function (items, duration) {
var date = new Date(),
@@ -1417,9 +1464,7 @@ PAYPAL.apps = PAYPAL.apps || {};
});
}
- duration = duration || 30;
date.setTime(date.getTime() + duration * 24 * 60 * 60 * 1000);
-
document.cookie = config.name + '=' + encodeURIComponent(JSON.stringify(data)) + '; expires=' + date.toGMTString() + '; path=' + config.cookiePath;
}
},
@@ -1687,224 +1732,9 @@ PAYPAL.apps = PAYPAL.apps || {};
return before + amount + after;
}
};
- }
-
-
- /**
- * json2.js
- * See http://www.JSON.org/js.html
- */
- var JSON;
- if (!JSON) {
- JSON = {};
}
- (function () {
- 'use strict';
-
- function f(n) {
- return n < 10 ? '0' + n : n;
- }
-
- if (typeof Date.prototype.toJSON !== 'function') {
-
- Date.prototype.toJSON = function (key) {
-
- return isFinite(this.valueOf())
- ? this.getUTCFullYear() + '-' +
- f(this.getUTCMonth() + 1) + '-' +
- f(this.getUTCDate()) + 'T' +
- f(this.getUTCHours()) + ':' +
- f(this.getUTCMinutes()) + ':' +
- f(this.getUTCSeconds()) + 'Z'
- : null;
- };
-
- String.prototype.toJSON =
- Number.prototype.toJSON =
- Boolean.prototype.toJSON = function (key) {
- return this.valueOf();
- };
- }
-
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
- gap,
- indent,
- meta = {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '"' : '\\"',
- '\\': '\\\\'
- },
- rep;
-
-
- function quote(string) {
- escapable.lastIndex = 0;
- return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
- var c = meta[a];
- return typeof c === 'string'
- ? c
- : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- }) + '"' : '"' + string + '"';
- }
-
-
- function str(key, holder) {
- var i,
- k,
- v,
- length,
- mind = gap,
- partial,
- value = holder[key];
-
- if (value && typeof value === 'object' &&
- typeof value.toJSON === 'function') {
- value = value.toJSON(key);
- }
-
- if (typeof rep === 'function') {
- value = rep.call(holder, key, value);
- }
-
- switch (typeof value) {
- case 'string':
- return quote(value);
-
- case 'number':
- return isFinite(value) ? String(value) : 'null';
-
- case 'boolean':
- case 'null':
- return String(value);
- case 'object':
- if (!value) {
- return 'null';
- }
- gap += indent;
- partial = [];
-
- if (Object.prototype.toString.apply(value) === '[object Array]') {
- length = value.length;
- for (i = 0; i < length; i += 1) {
- partial[i] = str(i, value) || 'null';
- }
- v = partial.length === 0
- ? '[]'
- : gap
- ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
- : '[' + partial.join(',') + ']';
- gap = mind;
- return v;
- }
- if (rep && typeof rep === 'object') {
- length = rep.length;
- for (i = 0; i < length; i += 1) {
- if (typeof rep[i] === 'string') {
- k = rep[i];
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- } else {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = str(k, value);
- if (v) {
- partial.push(quote(k) + (gap ? ': ' : ':') + v);
- }
- }
- }
- }
- v = partial.length === 0
- ? '{}'
- : gap
- ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
- : '{' + partial.join(',') + '}';
- gap = mind;
- return v;
- }
- }
- if (typeof JSON.stringify !== 'function') {
- JSON.stringify = function (value, replacer, space) {
- var i;
- gap = '';
- indent = '';
-
- if (typeof space === 'number') {
- for (i = 0; i < space; i += 1) {
- indent += ' ';
- }
- } else if (typeof space === 'string') {
- indent = space;
- }
-
- rep = replacer;
- if (replacer && typeof replacer !== 'function' &&
- (typeof replacer !== 'object' ||
- typeof replacer.length !== 'number')) {
- throw new Error('JSON.stringify');
- }
- return str('', {'': value});
- };
- }
-
- if (typeof JSON.parse !== 'function') {
- JSON.parse = function (text, reviver) {
- var j;
-
- function walk(holder, key) {
- var k, v, value = holder[key];
- if (value && typeof value === 'object') {
- for (k in value) {
- if (Object.prototype.hasOwnProperty.call(value, k)) {
- v = walk(value, k);
- if (v !== undefined) {
- value[k] = v;
- } else {
- delete value[k];
- }
- }
- }
- }
- return reviver.call(holder, key, value);
- }
-
- text = String(text);
- cx.lastIndex = 0;
- if (cx.test(text)) {
- text = text.replace(cx, function (a) {
- return '\\u' +
- ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
- });
- }
-
- if (/^[\],:{}\s]*$/
- .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
- .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
- .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
-
- j = eval('(' + text + ')');
-
- return typeof reviver === 'function'
- ? walk({'': j}, '')
- : j;
- }
-
- throw new SyntaxError('JSON.parse');
- };
- }
- }());
-
-
})();
if (typeof PAYPAL === 'undefined' || !PAYPAL) {
View
2  dist/paypal-button-minicart.min.js
@@ -4,4 +4,4 @@
* @version 1.0.0 - 2013-03-15
* @author Jeff Harrell <https://github.com/jeffharrell/>
*/
-if(PAYPAL===void 0||!PAYPAL)var PAYPAL={};if(PAYPAL.apps=PAYPAL.apps||{},function(){"use strict";var config={parent:document.body,displayEdge:"right",edgeDistance:"50px",formTarget:null,cookiePath:"/",strings:{button:"",subtotal:"",discount:"",shipping:"",processing:""},name:"PPMiniCart",peekEnabled:!0,paypalURL:"https://www.paypal.com/cgi-bin/webscr",assetURL:"http://www.minicartjs.com/build/",events:{onRender:null,afterRender:null,onHide:null,afterHide:null,onShow:null,afterShow:null,onAddToCart:null,afterAddToCart:null,onRemoveFromCart:null,afterRemoveFromCart:null,onCheckout:null,onReset:null,afterReset:null}};PAYPAL.apps.MiniCart=function(){var e={},t=!1,n=!1,o={_cart:!0,_xclick:!0},i="MiniCart_AddToCart_WPS_US",r=/^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/,a=function(){var e,t,n=config.name,o=[];o.push("#"+n+" form { position:fixed; float:none; top:-250px; "+config.displayEdge+":"+config.edgeDistance+"; width:265px; margin:0; padding:50px 10px 0; min-height:170px; background:#fff url("+config.assetURL+"images/minicart_sprite.png) no-repeat -125px -60px; border:1px solid #999; border-top:0; font:13px/normal arial, helvetica; color:#333; text-align:left; -moz-border-radius:0 0 8px 8px; -webkit-border-radius:0 0 8px 8px; border-radius:0 0 8px 8px; -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); } "),o.push("#"+n+" ul { position:relative; overflow-x:hidden; overflow-y:auto; height:130px; margin:0 0 7px; padding:0; list-style-type:none; border-top:1px solid #ccc; border-bottom:1px solid #ccc; } "),o.push("#"+n+" li { position:relative; margin:-1px 0 0; padding:6px 5px 6px 0; border-top:1px solid #f2f2f2; } "),o.push("#"+n+" li a { display: block; width: 155px; color:#333; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } "),o.push("#"+n+" li a span { color:#999; font-size:10px; } "),o.push("#"+n+" li .quantity { position:absolute; top:.5em; right:78px; width:22px; padding:1px; border:1px solid #83a8cc; text-align:right; } "),o.push("#"+n+" li .price { position:absolute; top:.5em; right:4px; } "),o.push("#"+n+" li .remove { position:absolute; top:9px; right:60px; width:14px; height:14px; background:url("+config.assetURL+"images/minicart_sprite.png) no-repeat -134px -4px; border:0; cursor:pointer; } "),o.push("#"+n+" p { margin:0; padding:0 0 0 20px; background:url("+config.assetURL+"images/minicart_sprite.png) no-repeat; font-size:13px; font-weight:bold; } "),o.push("#"+n+" p:hover { cursor:pointer; } "),o.push("#"+n+" p input { float:right; margin:4px 0 0; padding:1px 4px; text-decoration:none; font-weight:normal; color:#333; background:#ffa822 url("+config.assetURL+"images/minicart_sprite.png) repeat-x left center; border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } "),o.push("#"+n+" p .shipping { display:block; font-size:10px; font-weight:normal; color:#999; } "),e=document.createElement("style"),e.type="text/css",e.styleSheet?e.styleSheet.cssText=o.join(""):e.appendChild(document.createTextNode(o.join(""))),t=document.getElementsByTagName("head")[0],t.appendChild(e)},u=function(){var t,n,o,r,a,u=e.UI;u.wrapper=document.createElement("div"),u.wrapper.id=config.name,t=document.createElement("input"),t.type="hidden",t.name="cmd",t.value="_cart",n=t.cloneNode(!1),n.name="upload",n.value="1",o=t.cloneNode(!1),o.name="bn",o.value=i,u.cart=document.createElement("form"),u.cart.method="post",u.cart.action=config.paypalURL,config.formTarget&&(u.cart.target=config.formTarget),u.cart.appendChild(t),u.cart.appendChild(n),u.cart.appendChild(o),u.wrapper.appendChild(u.cart),u.itemList=document.createElement("ul"),u.cart.appendChild(u.itemList),u.summary=document.createElement("p"),u.cart.appendChild(u.summary),u.button=document.createElement("input"),u.button.type="submit",u.button.value=config.strings.button||"Checkout",u.summary.appendChild(u.button),u.subtotal=document.createElement("span"),u.subtotal.innerHTML=config.strings.subtotal||"Subtotal: ",u.subtotalAmount=document.createElement("span"),u.subtotalAmount.innerHTML="0.00",u.subtotal.appendChild(u.subtotalAmount),u.summary.appendChild(u.subtotal),u.shipping=document.createElement("span"),u.shipping.className="shipping",u.shipping.innerHTML=config.strings.shipping||"does not include shipping &amp; tax",u.summary.appendChild(u.shipping),window.attachEvent&&!window.opera&&(a=navigator.userAgent.match(/MSIE\s([^;]*)/),a&&(a=parseFloat(a[1]),(7>a||a>=7&&"BackCompat"===document.compatMode)&&(u.cart.style.position="absolute",u.wrapper.style[config.displayEdge]="0",u.wrapper.style.setExpression("top","x = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop")))),r="string"==typeof config.parent?document.getElementById(config.parent):config.parent,r.appendChild(u.wrapper)},c=function(){var n,i,r,a=e.UI;for(n=document.getElementsByTagName("form"),r=0;n.length>r;r++)i=n[r],i.cmd&&o[i.cmd.value]&&e.bindForm(i);$.event.add(document,"click",function(n){if(t){var o=n.target,i=a.cart;if(!/input|button|select|option/i.test(o.tagName)){for(;1===o.nodeType;){if(o===i)return;o=o.parentNode}e.hide(null)}}}),$.event.add(a.cart,"submit",function(e){b(e)}),$.event.add(a.summary,"click",function(t){var n=t.target;n!==a.button&&e.toggle(t)}),window.attachEvent&&!window.opera?$.event.add(document,"storage",function(){setTimeout(f,100)}):$.event.add(window,"storage",function(e){(e.key&&e.key===config.name||!e.key)&&f()})},s=function(e){var t;for(t in e)void 0!==typeof config[t]&&(config[t]=e[t])},p=function(){var e,n,o;if(e=$.storage.load())for(n=e.length,o=0;n>o;o++)m(e[o])&&(t=!0)},d=function(e){var t,n,o,i,r=e.elements,a={};for(o=0,i=r.length;i>o;o++)t=r[o],(n=$.util.getInputValue(t))&&(a[t.name]=n);return a},l=function(t){var n,o,i,a,u,c,s,p={},d={};for(i in t)r.test(i)?d[i]=t[i]:p[i]=t[i];for(c=0,a=e.products.length;a>c;c++)if(n=e.products[c].product,p.item_name===n.item_name&&p.item_number===n.item_number){for(u=!0,s=0;n["os"+s];){if(p["os"+s]!==n["os"+s]){u=!1;break}s++}if(u){p.offset=n.offset;break}}for(p.href=p.href||window.location.href,p.quantity=p.quantity||1,p.amount=p.amount||0,d["return"]&&-1===d["return"].indexOf("#")&&(d["return"]+="#"+config.name+"=reset"),o=p.option_index?p.option_index:0;p["os"+o];){for(c=0;p["option_select"+c]!==void 0;){if(p["option_select"+c]===p["os"+o]){p.amount=p.amount+parseFloat(p["option_amount"+c]);break}c++}o++}return{product:p,settings:d}},f=function(){e.products=[],e.UI.itemList.innerHTML="",e.UI.subtotalAmount.innerHTML="",p(),e.updateSubtotal()},m=function(t){var n,o,i,r=e.UI,a=r.cart,u=new ProductNode(t,e.UI.itemList.children.length+1),c=t.product.offset;e.products[c]=u;for(i in t.settings)a.elements[i]?a.elements[i].value?a.elements[i].value=t.settings[i]:a.elements[i]=t.settings[i]:(o=document.createElement("input"),o.type="hidden",o.name=i,o.value=t.settings[i],a.appendChild(o));if(u.isPlaceholder)return!1;$.event.add(u.removeInput,"click",function(){h(u,c)});var s=u.quantityInput.value;return $.event.add(u.quantityInput,"keyup",function(){var t=this;n=setTimeout(function(){var n=parseInt(t.value,10);isNaN(n)||n===s||(s=n,u.setQuantity(n),u.getQuantity()||h(u,c),e.updateSubtotal(),$.storage.save(e.products))},250)}),r.itemList.insertBefore(u.liNode,r.itemList.firstChild),$.util.animate(u.liNode,"opacity",{from:0,to:1}),!0},h=function(t,n){var o=config.events,i=o.onRemoveFromCart,r=o.afterRemoveFromCart;("function"!=typeof i||i.call(e,t)!==!1)&&(t.setQuantity(0),t.quantityInput.style.display="none",$.util.animate(t.liNode,"opacity",{from:1,to:0},function(){$.util.animate(t.liNode,"height",{from:18,to:0},function(){try{t.liNode.parentNode.removeChild(t.liNode)}catch(n){}var o,i,a,u,c,s,p=e.UI.cart.getElementsByTagName("li"),d=p.length,l=1;for(c=0;d>c;c++){for(o=p[c].getElementsByTagName("input"),i=o.length,s=0;i>s;s++)a=o[s],u=/(.+)_[0-9]+$/.exec(a.name),u&&u[1]&&(a.name=u[1]+"_"+l);l++}"function"==typeof r&&r.call(e,t)})}),e.products[n].product.item_name="",e.products[n].product.item_number="",e.updateSubtotal(),$.storage.save(e.products))},b=function(t){var n=config.events.onCheckout;return"function"==typeof n&&n.call(e,t)===!1?(t.preventDefault(),void 0):(e.UI.button.value=config.strings.processing||"Processing...",void 0)};return e.products=[],e.UI={},e.render=function(o){var i,r,p=config.events,d=p.onRender,l=p.afterRender;("function"!=typeof d||d.call(e)!==!1)&&(n||(s(o),a(),u(),c(),i=location.hash.substring(1),0===i.indexOf(config.name+"=")&&(r=i.split("=")[1],"reset"===r&&(e.reset(),location.hash=""))),f(),n||(t?setTimeout(function(){e.hide(null)},500):$.storage.remove()),n=!0,"function"==typeof l&&l.call(e))},e.bindForm=function(t){if(t.add)$.event.add(t,"submit",function(t){t.preventDefault(t);var n=d(t.target);e.addToCart(n)});else{if(!t.display)return!1;$.event.add(t,"submit",function(t){t.preventDefault(),e.show(t)})}return!0},e.addToCart=function(t){var n,o,i=config.events,r=i.onAddToCart,a=i.afterAddToCart,u=!1;return t=l(t),o=t.product.offset,"function"!=typeof r||r.call(e,t.product)!==!1?((n=this.getProductAtOffset(o))?(n.product.quantity+=parseInt(t.product.quantity||1,10),n.setPrice(t.product.amount*n.product.quantity),n.setQuantity(n.product.quantity),u=!0):(t.product.offset=e.products.length,u=m(t)),e.updateSubtotal(),e.show(null),$.storage.save(e.products),"function"==typeof a&&a.call(e,t),u):void 0},e.getProductAtOffset=function(e){return e!==void 0&&this.products[e]},e.calculateSubtotal=function(){var t,n,o,i,r,a,u=0,c=e.products;for(a=0,r=c.length;r>a;a++)n=c[a],(t=n.product)&&t.quantity&&t.amount&&(o=t.amount,i=n.getDiscount(),u+=parseFloat(o*t.quantity-i));return u.toFixed(2)},e.updateSubtotal=function(){var t,n,o,i,r,a=e.UI,u=a.cart.elements,c=a.subtotalAmount,s=e.calculateSubtotal(),p=1;if(t="",n="",u.currency_code)t=u.currency_code.value||u.currency_code;else for(r=0,i=u.length;i>r;r++)if("currency_code"===u[r].name){t=u[r].value||u[r];break}c.innerHTML=$.util.formatCurrency(s,t),function d(){return o=p.toString(16),p++,c.style.backgroundColor="#ff"+o,p>=15?(c.style.backgroundColor="transparent","0.00"===s&&e.hide(null,!0),void 0):(setTimeout(d,30),void 0)}()},e.show=function(n){var o=parseInt(e.UI.cart.offsetTop,10),i=0,r=config.events,a=r.onShow,u=r.afterShow;n&&n.preventDefault&&n.preventDefault(),("function"!=typeof a||a.call(e,n)!==!1)&&($.util.animate(e.UI.cart,"top",{from:o,to:i},function(){"function"==typeof u&&u.call(e,n)}),e.UI.summary.style.backgroundPosition="-195px 2px",t=!0)},e.hide=function(n,o){var i,r=e.UI,a=r.cart,u=r.summary,c=a.offsetHeight?a.offsetHeight:document.defaultView.getComputedStyle(a,"").getPropertyValue("height"),s=u.offsetHeight?u.offsetHeight:document.defaultView.getComputedStyle(u,"").getPropertyValue("height"),p=parseInt(a.offsetTop,10),d=config.events,l=d.onHide,f=d.afterHide;i=o||0===e.products.length||!config.peekEnabled?-1*c:-1*(c-s-8),n&&n.preventDefault&&n.preventDefault(),("function"!=typeof l||l.call(e,n)!==!1)&&($.util.animate(a,"top",{from:p,to:i},function(){"function"==typeof f&&f.call(e,n)}),u.style.backgroundPosition="-195px -32px",t=!1)},e.toggle=function(n){t?e.hide(n):e.show(n)},e.reset=function(){var n=e.UI,o=config.events,i=o.onReset,r=o.afterReset;("function"!=typeof i||i.call(e)!==!1)&&(e.products=[],t&&(n.itemList.innerHTML="",n.subtotalAmount.innerHTML="",e.hide(null,!0)),$.storage.remove(),"function"==typeof r&&r.call(e))},e}();var ProductNode=function(e,t){this._view(e,t)};ProductNode.prototype={_view:function(e,t){var n,o,i,r,a,u,c;if(this.product=e.product,this.settings=e.settings,this.liNode=document.createElement("li"),this.nameNode=document.createElement("a"),this.metaNode=document.createElement("span"),this.discountNode=document.createElement("span"),this.discountInput=document.createElement("input"),this.priceNode=document.createElement("span"),this.quantityInput=document.createElement("input"),this.removeInput=document.createElement("input"),!this.product||!this.product.item_name&&!this.product.item_number)return this.isPlaceholder=!0,void 0;this.product.item_name&&(n=this.product.item_name),this.nameNode.innerHTML=n,this.nameNode.title=n,this.nameNode.href=this.product.href,this.nameNode.appendChild(this.metaNode),this.product.item_number&&(this.metaNode.innerHTML="<br />#"+this.product.item_number),a=this.getOptions();for(c in a)this.metaNode.innerHTML+="<br />"+c+": "+a[c];r=this.getDiscount(),this.discountInput.type="hidden",this.discountInput.name="discount_amount_"+t,this.discountInput.value=r,this.metaNode.appendChild(this.discountNode),o=this.getPrice(),this.priceNode.className="price",i=this.getQuantity(),this.quantityInput.name="quantity_"+t,this.quantityInput.className="quantity",this.quantityInput.setAttribute("autocomplete","off"),this.setQuantity(i),this.removeInput.type="button",this.removeInput.className="remove",this.liNode.appendChild(this.nameNode),this.liNode.appendChild(this.quantityInput),this.liNode.appendChild(this.discountInput),this.liNode.appendChild(this.removeInput),this.liNode.appendChild(this.priceNode);for(c in this.product)"quantity"!==c&&-1===c.indexOf("discount_")&&(u=document.createElement("input"),u.type="hidden",u.name=c+"_"+t,u.value=this.product[c],this.liNode.appendChild(u))},getDiscount:function(){var e,t=0,n=this.product.discount_num||-1;return this.product.discount_amount?(t=parseFloat(this.product.discount_amount),this.product.discount_amount2&&(e=this.getQuantity(),e>1&&(t+=Math.max(e-1,n)*parseFloat(this.product.discount_amount2)))):this.product.discount_rate&&(t=this.product.amount*parseFloat(this.product.discount_rate)/100,this.product.discount_rate2&&(e=this.getQuantity(),e>1&&(t+=Math.max(e-1,n)*this.product.amount*parseFloat(this.product.discount_amount2)/100))),t&&t.toFixed(2)},getOptions:function(){for(var e={},t=0;this.product["on"+t]!==void 0;)e[this.product["on"+t]]=this.product["os"+t],t++;return e},setQuantity:function(e){var t;e=parseInt(e,10),this.product.quantity=e,this.quantityInput.value!==e&&(this.quantityInput.value=e,(t=this.getDiscount())&&(this.discountInput.value=t,this.discountNode.innerHTML="<br />",this.discountNode.innerHTML+=config.strings.discount||"Discount: ",this.discountNode.innerHTML+=$.util.formatCurrency(t,this.settings.currency_code))),this.setPrice(this.product.amount*e)},getQuantity:function(){return void 0!==typeof this.product.quantity?this.product.quantity:1},setPrice:function(e){e=parseFloat(e,10),this.priceNode.innerHTML=$.util.formatCurrency(e.toFixed(2),this.settings.currency_code)},getPrice:function(){return(this.product.amount*this.getQuantity()).toFixed(2)}};var $={};$.storage=function(){var e=config.name;return window.localStorage?{load:function(){var t=localStorage.getItem(e);return t&&(t=JSON.parse(decodeURIComponent(t))),t},save:function(t){var n,o,i,r=[];if(t){for(i=0,o=t.length;o>i;i++)n=t[i],r.push({product:n.product,settings:n.settings});r=encodeURIComponent(JSON.stringify(r)),localStorage.setItem(e,r)}},remove:function(){localStorage.removeItem(e)}}:{load:function(){var t,n,o,i,r,a=e+"=";try{for(n=document.cookie.split(";"),r=0;n.length>r;r++){for(o=n[r];" "===o.charAt(0);)o=o.substring(1,o.length);0===o.indexOf(a)&&(i=o.substring(a.length,o.length),t=JSON.parse(decodeURIComponent(i)))}}catch(u){}return t},save:function(e,t){var n,o,i,r=new Date,a=[];if(e){for(i=0,o=e.length;o>i;i++)n=e[i],a.push({product:n.product,settings:n.settings});t=t||30,r.setTime(r.getTime()+1e3*60*60*24*t),document.cookie=config.name+"="+encodeURIComponent(JSON.stringify(a))+"; expires="+r.toGMTString()+"; path="+config.cookiePath}},remove:function(){this.save(null,-1)}}}(),$.event=function(){var e=[];return document.addEventListener?{add:function(t,n,o,i){i=i||t;var r=function(e){o.call(i,e)};t.addEventListener(n,r,!1),e.push([t,n,o,r])},remove:function(t,n,o){var i,r,a,u=e.length;for(a=0;u>a;a++)r=e[a],r[0]===t&&r[1]===n&&r[2]===o&&(i=r[3],i&&(t.removeEventListener(n,i,!1),delete e[a]))}}:document.attachEvent?{add:function(t,n,o,i){i=i||t;var r=function(){var e=window.event;e.target=e.target||e.srcElement,e.preventDefault=function(){e.returnValue=!1},o.call(i,e)};t.attachEvent("on"+n,r),e.push([t,n,o,r])},remove:function(t,n,o){var i,r,a,u=e.length;for(a=0;u>a;a++)r=e[a],r[0]===t&&r[1]===n&&r[2]===o&&(i=r[3],i&&(t.detachEvent("on"+n,i),delete e[a]))}}:void 0}(),$.util={animate:function(e,t,n,o){n=n||{},n.from=n.from||0,n.to=n.to||0,n.duration=n.duration||10,n.unit=/top|bottom|left|right|width|height/.test(t)?"px":"";var i=(n.to-n.from)/20,r=n.from;(function a(){return e.style[t]=r+n.unit,r+=i,i>0&&r>n.to||0>i&&n.to>r||0===i?(e.style[t]=n.to+n.unit,"function"==typeof o&&o(),void 0):(setTimeout(a,n.duration),void 0)})()},getInputValue:function(e){var t=e.tagName.toLowerCase();return"select"===t?e.options[e.selectedIndex].value:"textarea"===t?e.innerHTML:"radio"===e.type?e.checked?e.value:null:"checkbox"===e.type?e.checked?e.value:null:e.value},formatCurrency:function(e,t){var n={AED:{before:"ج"},ANG:{before:"ƒ"},ARS:{before:"$"},AUD:{before:"$"},AWG:{before:"ƒ"},BBD:{before:"$"},BGN:{before:"лв"},BMD:{before:"$"},BND:{before:"$"},BRL:{before:"R$"},BSD:{before:"$"},CAD:{before:"$"},CHF:{before:""},CLP:{before:"$"},CNY:{before:"¥"},COP:{before:"$"},CRC:{before:"₡"},CZK:{before:"Kc"},DKK:{before:"kr"},DOP:{before:"$"},EEK:{before:"kr"},EUR:{before:"€"},GBP:{before:"£"},GTQ:{before:"Q"},HKD:{before:"$"},HRK:{before:"kn"},HUF:{before:"Ft"},IDR:{before:"Rp"},ILS:{before:"₪"},INR:{before:"Rs."},ISK:{before:"kr"},JMD:{before:"J$"},JPY:{before:"¥"},KRW:{before:"₩"},KYD:{before:"$"},LTL:{before:"Lt"},LVL:{before:"Ls"},MXN:{before:"$"},MYR:{before:"RM"},NOK:{before:"kr"},NZD:{before:"$"},PEN:{before:"S/"},PHP:{before:"Php"},PLN:{before:"z"},QAR:{before:"﷼"},RON:{before:"lei"},RUB:{before:"руб"},SAR:{before:"﷼"},SEK:{before:"kr"},SGD:{before:"$"},THB:{before:"฿"},TRY:{before:"TL"},TTD:{before:"TT$"},TWD:{before:"NT$"},UAH:{before:"₴"},USD:{before:"$"},UYU:{before:"$U"},VEF:{before:"Bs"},VND:{before:"₫"},XCD:{before:"$"},ZAR:{before:"R"}},o=n[t]||{},i=o.before||"",r=o.after||"";return i+e+r}};var JSON;JSON||(JSON={}),function(){function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,o,i,r,a,u=gap,c=t[e];switch(c&&"object"==typeof c&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),"function"==typeof rep&&(c=rep.call(t,e,c)),typeof c){case"string":return quote(c);case"number":return isFinite(c)?c+"":"null";case"boolean":case"null":return c+"";case"object":if(!c)return"null";if(gap+=indent,a=[],"[object Array]"===Object.prototype.toString.apply(c)){for(r=c.length,n=0;r>n;n+=1)a[n]=str(n,c)||"null";return i=0===a.length?"[]":gap?"[\n"+gap+a.join(",\n"+gap)+"\n"+u+"]":"["+a.join(",")+"]",gap=u,i}if(rep&&"object"==typeof rep)for(r=rep.length,n=0;r>n;n+=1)"string"==typeof rep[n]&&(o=rep[n],i=str(o,c),i&&a.push(quote(o)+(gap?": ":":")+i));else for(o in c)Object.prototype.hasOwnProperty.call(c,o)&&(i=str(o,c),i&&a.push(quote(o)+(gap?": ":":")+i));return i=0===a.length?"{}":gap?"{\n"+gap+a.join(",\n"+gap)+"\n"+u+"}":"{"+a.join(",")+"}",gap=u,i}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,n){var o;if(gap="",indent="","number"==typeof n)for(o=0;n>o;o+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,o,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=walk(i,n),void 0!==o?i[n]=o:delete i[n]);return reviver.call(e,t,i)}var j;if(text+="",cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()}(),PAYPAL===void 0||!PAYPAL)var PAYPAL={};PAYPAL.apps=PAYPAL.apps||{},function(){"use strict";function e(e,t){var o,i,u,c,s,p,d,l=document.createElement("form"),f=document.createElement("input"),m=document.createElement("input"),h=e.items;f.type="image",m.type="hidden",l.method="post",l.action=a,l.className="paypal-button",l.target="_top";for(s in h)o=h[s],o.isEditable?(c=document.createElement("input"),c.type="text",c.className="paypal-input",c.name=o.key,c.value=o.value,u=document.createElement("label"),u.className="paypal-label",u.appendChild(document.createTextNode(r.config.labels[o.key]+" "||"")),u.appendChild(c),i=document.createElement("p"),i.className="paypal-group",i.appendChild(u)):(c=i=m.cloneNode(!0),c.name=o.key,c.value=o.value),l.appendChild(i);if(p=h.size&&h.size.value,d=h.lc&&h.lc.value,l.appendChild(f),f.src=n(t,p,d),PAYPAL.apps.MiniCart&&"_cart"===e.items.cmd.value){var b=PAYPAL.apps.MiniCart;b.UI.itemList||b.render(),b.bindForm(l)}return l}function t(e,t){var n,o,i=document.createElement("img"),r=a+"?",c=13,s=e.items;t=t&&t.value||250;for(o in s)n=s[o],r+=n.key+"="+encodeURIComponent(n.value)+"&";return r=encodeURIComponent(r),i.src=u.replace("{url}",r).replace("{pattern}",c).replace("{size}",t),i}function n(e,t,n){var o=p[e]||p.buynow;return n=n||"en_US",t="small"===t?"SM":"LG",o.replace(/\{locale\}/,n).replace(/\{size\}/,t)}function o(e){var t,n,o,i,r,a={};if(t=e.attributes)for(r=0,i=t.length;i>r;r++)n=t[r],(o=/^data-([a-z0-9]+)(-editable)?/i.exec(n.name))&&(a[o[1]]={value:n.value,isEditable:!!o[2]});return a}function i(){this.items={},this.add=function(e,t,n){this.items[e]={key:e,value:t,isEditable:n}},this.remove=function(e){delete this.items[e]}}var r={},a="https://www.paypal.com/cgi-bin/webscr",u="https://www.paypal.com/webapps/ppint/qrcode?data={url}&pattern={pattern}&height={size}",c="JavaScriptButton_{type}",s={name:"item_name",number:"item_number",lang:"lc",recurrence:"p3",period:"t3"},p={buynow:"//www.paypalobjects.com/{locale}/i/btn/btn_buynow_{size}.gif",cart:"//www.paypalobjects.com/{locale}/i/btn/btn_cart_{size}.gif",donate:"//www.paypalobjects.com/{locale}/i/btn/btn_donate_{size}.gif",subscribe:"//www.paypalobjects.com/{locale}/i/btn/btn_subscribe_{size}.gif"};if(PAYPAL.apps.ButtonFactory||(r.config={labels:{item_name:"Item",item_number:"Number",amount:"Amount",quantity:"Quantity"}},r.buttons={buynow:0,cart:0,donate:0,qr:0,subscribe:0},r.create=function(n,o,r,a){var u,p,d=new i;if(!n)return!1;for(p in o)d.add(s[p]||p,o[p].value,o[p].isEditable);return r=r||"buynow","cart"===r?(d.add("cmd","_cart"),d.add("add",!0)):"donate"===r?d.add("cmd","_donations"):"subscribe"===r?(d.add("cmd","_xclick-subscriptions"),d.items.amount&&!d.items.a3&&d.add("a3",d.items.amount.value)):d.add("cmd","_xclick"),d.add("business",n),d.add("bn",c.replace(/\{type\}/,r)),"qr"===r?(u=t(d,d.items.size),d.remove("size")):u=e(d,r),this.buttons[r]+=1,a&&a.appendChild(u),u},PAYPAL.apps.ButtonFactory=r),"undefined"!=typeof document){var d,l,f,m,h,b,g=PAYPAL.apps.ButtonFactory,y=document.getElementsByTagName("script");for(h=0,b=y.length;b>h;h++)d=y[h],d&&d.src&&(l=d&&o(d),f=l&&l.button&&l.button.value,m=d.src.split("?merchant=")[1],m&&(g.create(m,l,f,d.parentNode),d.parentNode.removeChild(d)))}}(),"object"==typeof module&&"object"==typeof module.exports&&(module.exports=PAYPAL);
+if(PAYPAL===void 0||!PAYPAL)var PAYPAL={};if(PAYPAL.apps=PAYPAL.apps||{},function(){"use strict";var e={parent:document.body,displayEdge:"right",edgeDistance:"50px",formTarget:null,cookiePath:"/",cartDuration:30,strings:{button:"",subtotal:"",discount:"",shipping:"",processing:""},name:"PPMiniCart",peekEnabled:!0,paypalURL:"https://www.paypal.com/cgi-bin/webscr",assetURL:"http://www.minicartjs.com/build/",events:{onRender:null,afterRender:null,onHide:null,afterHide:null,onShow:null,afterShow:null,onAddToCart:null,afterAddToCart:null,onRemoveFromCart:null,afterRemoveFromCart:null,onCheckout:null,onReset:null,afterReset:null}};if(!PAYPAL.apps.MiniCart){PAYPAL.apps.MiniCart=function(){var o={},a=!1,i=!1,r={_cart:!0,_xclick:!0},u="MiniCart_AddToCart_WPS_US",s=/^(?:business|currency_code|lc|paymentaction|no_shipping|cn|no_note|invoice|handling_cart|weight_cart|weight_unit|tax_cart|page_style|image_url|cpp_|cs|cbt|return|cancel_return|notify_url|rm|custom|charset)/,c=function(){var t,n,o=e.name,a=[];a.push("#"+o+" form { position:fixed; float:none; top:-250px; "+e.displayEdge+":"+e.edgeDistance+"; width:265px; margin:0; padding:50px 10px 0; min-height:170px; background:#fff url("+e.assetURL+"images/minicart_sprite.png) no-repeat -125px -60px; border:1px solid #999; border-top:0; font:13px/normal arial, helvetica; color:#333; text-align:left; -moz-border-radius:0 0 8px 8px; -webkit-border-radius:0 0 8px 8px; border-radius:0 0 8px 8px; -moz-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); -webkit-box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); box-shadow:1px 1px 1px rgba(0, 0, 0, 0.1); } "),a.push("#"+o+" ul { position:relative; overflow-x:hidden; overflow-y:auto; height:130px; margin:0 0 7px; padding:0; list-style-type:none; border-top:1px solid #ccc; border-bottom:1px solid #ccc; } "),a.push("#"+o+" li { position:relative; margin:-1px 0 0; padding:6px 5px 6px 0; border-top:1px solid #f2f2f2; } "),a.push("#"+o+" li a { display: block; width: 155px; color:#333; text-decoration:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } "),a.push("#"+o+" li a span { color:#999; font-size:10px; } "),a.push("#"+o+" li .quantity { position:absolute; top:.5em; right:78px; width:22px; padding:1px; border:1px solid #83a8cc; text-align:right; } "),a.push("#"+o+" li .price { position:absolute; top:.5em; right:4px; } "),a.push("#"+o+" li .remove { position:absolute; top:9px; right:60px; width:14px; height:14px; background:url("+e.assetURL+"images/minicart_sprite.png) no-repeat -134px -4px; border:0; cursor:pointer; } "),a.push("#"+o+" p { margin:0; padding:0 0 0 20px; background:url("+e.assetURL+"images/minicart_sprite.png) no-repeat; font-size:13px; font-weight:bold; } "),a.push("#"+o+" p:hover { cursor:pointer; } "),a.push("#"+o+" p input { float:right; margin:4px 0 0; padding:1px 4px; text-decoration:none; font-weight:normal; color:#333; background:#ffa822 url("+e.assetURL+"images/minicart_sprite.png) repeat-x left center; border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; } "),a.push("#"+o+" p .shipping { display:block; font-size:10px; font-weight:normal; color:#999; } "),t=document.createElement("style"),t.type="text/css",t.styleSheet?t.styleSheet.cssText=a.join(""):t.appendChild(document.createTextNode(a.join(""))),n=document.getElementsByTagName("head")[0],n.appendChild(t)},p=function(){var t,n,a,i,r,s=o.UI;s.wrapper=document.createElement("div"),s.wrapper.id=e.name,t=document.createElement("input"),t.type="hidden",t.name="cmd",t.value="_cart",n=t.cloneNode(!1),n.name="upload",n.value="1",a=t.cloneNode(!1),a.name="bn",a.value=u,s.cart=document.createElement("form"),s.cart.method="post",s.cart.action=e.paypalURL,e.formTarget&&(s.cart.target=e.formTarget),s.cart.appendChild(t),s.cart.appendChild(n),s.cart.appendChild(a),s.wrapper.appendChild(s.cart),s.itemList=document.createElement("ul"),s.cart.appendChild(s.itemList),s.summary=document.createElement("p"),s.cart.appendChild(s.summary),s.button=document.createElement("input"),s.button.type="submit",s.button.value=e.strings.button||"Checkout",s.summary.appendChild(s.button),s.subtotal=document.createElement("span"),s.subtotal.innerHTML=e.strings.subtotal||"Subtotal: ",s.subtotalAmount=document.createElement("span"),s.subtotalAmount.innerHTML="0.00",s.subtotal.appendChild(s.subtotalAmount),s.summary.appendChild(s.subtotal),s.shipping=document.createElement("span"),s.shipping.className="shipping",s.shipping.innerHTML=e.strings.shipping||"does not include shipping &amp; tax",s.summary.appendChild(s.shipping),window.attachEvent&&!window.opera&&(r=navigator.userAgent.match(/MSIE\s([^;]*)/),r&&(r=parseFloat(r[1]),(7>r||r>=7&&"BackCompat"===document.compatMode)&&(s.cart.style.position="absolute",s.wrapper.style[e.displayEdge]="0",s.wrapper.style.setExpression("top","x = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop")))),i="string"==typeof e.parent?document.getElementById(e.parent):e.parent,i.appendChild(s.wrapper)},d=function(){var t,i,u,s=o.UI;for(t=document.getElementsByTagName("form"),u=0;t.length>u;u++)i=t[u],i.cmd&&r[i.cmd.value]&&o.bindForm(i);n.event.add(document,"click",function(e){if(a){var t=e.target,n=s.cart;if(!/input|button|select|option/i.test(t.tagName)){for(;1===t.nodeType;){if(t===n)return;t=t.parentNode}o.hide(null)}}}),n.event.add(s.cart,"submit",function(e){y(e)}),n.event.add(s.summary,"click",function(e){var t=e.target;t!==s.button&&o.toggle(e)}),window.attachEvent&&!window.opera?n.event.add(document,"storage",function(){setTimeout(b,100)}):n.event.add(window,"storage",function(t){(t.key&&t.key===e.name||!t.key)&&b()})},l=function(t){var n;for(n in t)void 0!==typeof e[n]&&(e[n]=t[n])},m=function(){var e,t,o;if(e=n.storage.load())for(t=e.length,o=0;t>o;o++)g(e[o])&&(a=!0)},f=function(e){var t,o,a,i,r=e.elements,u={};for(a=0,i=r.length;i>a;a++)t=r[a],(o=n.util.getInputValue(t))&&(u[t.name]=o);return u},h=function(t){var n,a,i,r,u,c,p,d={},l={};for(i in t)s.test(i)?l[i]=t[i]:d[i]=t[i];for(c=0,r=o.products.length;r>c;c++)if(n=o.products[c].product,d.item_name===n.item_name&&d.item_number===n.item_number){for(u=!0,p=0;n["os"+p];){if(d["os"+p]!==n["os"+p]){u=!1;break}p++}if(u){d.offset=n.offset;break}}for(d.href=d.href||window.location.href,d.quantity=d.quantity||1,d.amount=d.amount||0,l["return"]&&-1===l["return"].indexOf("#")&&(l["return"]+="#"+e.name+"=reset"),a=d.option_index?d.option_index:0;d["os"+a];){for(c=0;d["option_select"+c]!==void 0;){if(d["option_select"+c]===d["os"+a]){d.amount=d.amount+parseFloat(d["option_amount"+c]);break}c++}a++}return{product:d,settings:l}},b=function(e){o.products=[],o.UI.itemList.innerHTML="",o.UI.subtotalAmount.innerHTML="",m(),o.updateSubtotal(e)},g=function(e){var a,i,r,u=o.UI,s=u.cart,c=new t(e,o.UI.itemList.children.length+1),p=e.product.offset;o.products[p]=c;for(r in e.settings)s.elements[r]?s.elements[r].value?s.elements[r].value=e.settings[r]:s.elements[r]=e.settings[r]:(i=document.createElement("input"),i.type="hidden",i.name=r,i.value=e.settings[r],s.appendChild(i));if(c.isPlaceholder)return!1;n.event.add(c.removeInput,"click",function(){v(c,p)});var d=c.quantityInput.value;return n.event.add(c.quantityInput,"keyup",function(){var e=this;a=setTimeout(function(){var t=parseInt(e.value,10);isNaN(t)||t===d||(d=t,c.setQuantity(t),c.getQuantity()||v(c,p),o.updateSubtotal(),n.storage.save(o.products))},250)}),u.itemList.insertBefore(c.liNode,u.itemList.firstChild),n.util.animate(c.liNode,"opacity",{from:0,to:1}),!0},v=function(t,a){var i=e.events,r=i.onRemoveFromCart,u=i.afterRemoveFromCart;("function"!=typeof r||r.call(o,t)!==!1)&&(t.setQuantity(0),t.quantityInput.style.display="none",n.util.animate(t.liNode,"opacity",{from:1,to:0},function(){n.util.animate(t.liNode,"height",{from:18,to:0},function(){try{t.liNode.parentNode.removeChild(t.liNode)}catch(e){}var n,a,i,r,s,c,p=o.UI.cart.getElementsByTagName("li"),d=p.length,l=1;for(s=0;d>s;s++){for(n=p[s].getElementsByTagName("input"),a=n.length,c=0;a>c;c++)i=n[c],r=/(.+)_[0-9]+$/.exec(i.name),r&&r[1]&&(i.name=r[1]+"_"+l);l++}"function"==typeof u&&u.call(o,t)})}),o.products[a].product.item_name="",o.products[a].product.item_number="",o.updateSubtotal(),n.storage.save(o.products,e.cartDuration))},y=function(t){var n=e.events.onCheckout;return"function"==typeof n&&n.call(o,t)===!1?(t.preventDefault(),void 0):(o.UI.button.value=e.strings.processing||"Processing...",void 0)};return o.products=[],o.UI={},o.render=function(t){var r,u,s,m,f;l(t),r=e.events,u=r.onRender,s=r.afterRender,("function"!=typeof u||u.call(o)!==!1)&&(i||(c(),p(),d(),m=location.hash.substring(1),0===m.indexOf(e.name+"=")&&(f=m.split("=")[1],"reset"===f&&(o.reset(),location.hash=""))),b(!0),i||(a?setTimeout(function(){o.hide(null)},500):n.storage.remove()),i=!0,"function"==typeof s&&s.call(o))},o.bindForm=function(e){if(e.add)n.event.add(e,"submit",function(e){e.preventDefault(e);var t=f(e.target);o.addToCart(t)});else{if(!e.display)return!1;n.event.add(e,"submit",function(e){e.preventDefault(),o.show(e)})}return!0},o.addToCart=function(t){var a,i,r=e.events,u=r.onAddToCart,s=r.afterAddToCart,c=!1;return t=h(t),i=t.product.offset,"function"!=typeof u||u.call(o,t.product)!==!1?((a=this.getProductAtOffset(i))?(a.product.quantity+=parseInt(t.product.quantity||1,10),a.setPrice(t.product.amount*a.product.quantity),a.setQuantity(a.product.quantity),c=!0):(t.product.offset=o.products.length,c=g(t)),o.updateSubtotal(),o.show(null),n.storage.save(o.products,e.cartDuration),"function"==typeof s&&s.call(o,t),c):void 0},o.getProductAtOffset=function(e){return e!==void 0&&this.products[e]},o.calculateSubtotal=function(){var e,t,n,a,i,r,u=0,s=o.products;for(r=0,i=s.length;i>r;r++)t=s[r],(e=t.product)&&e.quantity&&e.amount&&(n=e.amount,a=t.getDiscount(),u+=parseFloat(n*e.quantity-a));return u.toFixed(2)},o.updateSubtotal=function(e){var t,a,i,r,u,s=o.UI,c=s.cart.elements,p=s.subtotalAmount,d=o.calculateSubtotal(),l=1;if(t="",a="",c.currency_code)t=c.currency_code.value||c.currency_code;else for(u=0,r=c.length;r>u;u++)if("currency_code"===c[u].name){t=c[u].value||c[u];break}p.innerHTML=n.util.formatCurrency(d,t),e||function m(){return i=l.toString(16),l++,p.style.backgroundColor="#ff"+i,l>=15?(p.style.backgroundColor="transparent","0.00"===d&&o.reset(),void 0):(setTimeout(m,30),void 0)}()},o.show=function(t){var i=parseInt(o.UI.cart.offsetTop,10),r=0,u=e.events,s=u.onShow,c=u.afterShow;t&&t.preventDefault&&t.preventDefault(),("function"!=typeof s||s.call(o,t)!==!1)&&(n.util.animate(o.UI.cart,"top",{from:i,to:r},function(){"function"==typeof c&&c.call(o,t)}),o.UI.summary.style.backgroundPosition="-195px 2px",a=!0)},o.hide=function(t,i){var r,u=o.UI,s=u.cart,c=u.summary,p=s.offsetHeight?s.offsetHeight:document.defaultView.getComputedStyle(s,"").getPropertyValue("height"),d=c.offsetHeight?c.offsetHeight:document.defaultView.getComputedStyle(c,"").getPropertyValue("height"),l=parseInt(s.offsetTop,10),m=e.events,f=m.onHide,h=m.afterHide;r=i||0===o.products.length||!e.peekEnabled?-1*p:-1*(p-d-8),t&&t.preventDefault&&t.preventDefault(),("function"!=typeof f||f.call(o,t)!==!1)&&(n.util.animate(s,"top",{from:l,to:r},function(){"function"==typeof h&&h.call(o,t)}),c.style.backgroundPosition="-195px -32px",a=!1)},o.toggle=function(e){a?o.hide(e):o.show(e)},o.reset=function(){var t=o.UI,i=e.events,r=i.onReset,u=i.afterReset;("function"!=typeof r||r.call(o)!==!1)&&(o.products=[],a&&(t.itemList.innerHTML="",t.subtotalAmount.innerHTML="",o.hide(null,!0)),n.storage.remove(),"function"==typeof u&&u.call(o))},o}();var t=function(e,t){this._view(e,t)};t.prototype={_view:function(e,t){var n,o,a,i,r,u,s;if(this.product=e.product,this.settings=e.settings,this.liNode=document.createElement("li"),this.nameNode=document.createElement("a"),this.metaNode=document.createElement("span"),this.discountNode=document.createElement("span"),this.discountInput=document.createElement("input"),this.priceNode=document.createElement("span"),this.quantityInput=document.createElement("input"),this.removeInput=document.createElement("input"),!this.product||!this.product.item_name&&!this.product.item_number)return this.isPlaceholder=!0,void 0;this.product.item_name&&(n=this.product.item_name),this.nameNode.innerHTML=n,this.nameNode.title=n,this.nameNode.href=this.product.href,this.nameNode.appendChild(this.metaNode),this.product.item_number&&(this.metaNode.innerHTML="<br />#"+this.product.item_number),r=this.getOptions();for(s in r)this.metaNode.innerHTML+="<br />"+s+": "+r[s];i=this.getDiscount(),i&&(this.discountInput.type="hidden",this.discountInput.name="discount_amount_"+t,this.discountInput.value=i,this.metaNode.appendChild(this.discountNode)),o=this.getPrice(),this.priceNode.className="price",a=this.getQuantity(),this.quantityInput.name="quantity_"+t,this.quantityInput.className="quantity",this.quantityInput.setAttribute("autocomplete","off"),this.setQuantity(a),this.removeInput.type="button",this.removeInput.className="remove",this.liNode.appendChild(this.nameNode),this.liNode.appendChild(this.quantityInput),i&&this.liNode.appendChild(this.discountInput),this.liNode.appendChild(this.removeInput),this.liNode.appendChild(this.priceNode);for(s in this.product)"quantity"!==s&&-1===s.indexOf("discount_")&&(u=document.createElement("input"),u.type="hidden",u.name=s+"_"+t,u.value=this.product[s],this.liNode.appendChild(u))},getDiscount:function(){var e,t=0,n=this.product.discount_num||-1;return this.product.discount_amount?(t=parseFloat(this.product.discount_amount),this.product.discount_amount2&&(e=this.getQuantity(),e>1&&(t+=Math.max(e-1,n)*parseFloat(this.product.discount_amount2)))):this.product.discount_rate&&(t=this.product.amount*parseFloat(this.product.discount_rate)/100,this.product.discount_rate2&&(e=this.getQuantity(),e>1&&(t+=Math.max(e-1,n)*this.product.amount*parseFloat(this.product.discount_amount2)/100))),t&&t.toFixed(2)},getOptions:function(){for(var e={},t=0;this.product["on"+t]!==void 0;)e[this.product["on"+t]]=this.product["os"+t],t++;return e},setQuantity:function(t){var o;t=parseInt(t,10),this.product.quantity=t,this.quantityInput.value!==t&&(this.quantityInput.value=t,(o=this.getDiscount())&&(this.discountInput.value=o,this.discountNode.innerHTML||this.metaNode.appendChild(this.discountNode),this.discountNode.innerHTML="<br />",this.discountNode.innerHTML+=e.strings.discount||"Discount: ",this.discountNode.innerHTML+=n.util.formatCurrency(o,this.settings.currency_code))),this.setPrice(this.product.amount*t)},getQuantity:function(){return void 0!==typeof this.product.quantity?this.product.quantity:1},setPrice:function(e){e=parseFloat(e,10),this.priceNode.innerHTML=n.util.formatCurrency(e.toFixed(2),this.settings.currency_code)},getPrice:function(){return(this.product.amount*this.getQuantity()).toFixed(2)}};var n={};n.storage=function(){var t=e.name;return window.localStorage?{load:function(){var e,o,a=localStorage.getItem(t);return a&&(a=JSON.parse(decodeURIComponent(a))),a&&a.expires&&(e=new Date,o=new Date(a.expires),e>o)?(n.storage.remove(),void 0):a&&a.value?a.value:a},save:function(e,n){var o,a,i,r,u=new Date,s=[];if(e){for(r=0,i=e.length;i>r;r++)a=e[r],s.push({product:a.product,settings:a.settings});u.setTime(u.getTime()+1e3*60*60*24*n),o={value:s,expires:u.toGMTString()},localStorage.setItem(t,encodeURIComponent(JSON.stringify(o)))}},remove:function(){localStorage.removeItem(t)}}:{load:function(){var e,n,o,a,i,r=t+"=";try{for(n=document.cookie.split(";"),i=0;n.length>i;i++){for(o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);0===o.indexOf(r)&&(a=o.substring(r.length,o.length),e=JSON.parse(decodeURIComponent(a)))}}catch(u){}return e},save:function(t,n){var o,a,i,r=new Date,u=[];if(t){for(i=0,a=t.length;a>i;i++)o=t[i],u.push({product:o.product,settings:o.settings});r.setTime(r.getTime()+1e3*60*60*24*n),document.cookie=e.name+"="+encodeURIComponent(JSON.stringify(u))+"; expires="+r.toGMTString()+"; path="+e.cookiePath}},remove:function(){this.save(null,-1)}}}(),n.event=function(){var e=[];return document.addEventListener?{add:function(t,n,o,a){a=a||t;var i=function(e){o.call(a,e)};t.addEventListener(n,i,!1),e.push([t,n,o,i])},remove:function(t,n,o){var a,i,r,u=e.length;for(r=0;u>r;r++)i=e[r],i[0]===t&&i[1]===n&&i[2]===o&&(a=i[3],a&&(t.removeEventListener(n,a,!1),delete e[r]))}}:document.attachEvent?{add:function(t,n,o,a){a=a||t;var i=function(){var e=window.event;e.target=e.target||e.srcElement,e.preventDefault=function(){e.returnValue=!1},o.call(a,e)};t.attachEvent("on"+n,i),e.push([t,n,o,i])},remove:function(t,n,o){var a,i,r,u=e.length;for(r=0;u>r;r++)i=e[r],i[0]===t&&i[1]===n&&i[2]===o&&(a=i[3],a&&(t.detachEvent("on"+n,a),delete e[r]))}}:void 0}(),n.util={animate:function(e,t,n,o){n=n||{},n.from=n.from||0,n.to=n.to||0,n.duration=n.duration||10,n.unit=/top|bottom|left|right|width|height/.test(t)?"px":"";var a=(n.to-n.from)/20,i=n.from;(function r(){return e.style[t]=i+n.unit,i+=a,a>0&&i>n.to||0>a&&n.to>i||0===a?(e.style[t]=n.to+n.unit,"function"==typeof o&&o(),void 0):(setTimeout(r,n.duration),void 0)})()},getInputValue:function(e){var t=e.tagName.toLowerCase();return"select"===t?e.options[e.selectedIndex].value:"textarea"===t?e.innerHTML:"radio"===e.type?e.checked?e.value:null:"checkbox"===e.type?e.checked?e.value:null:e.value},formatCurrency:function(e,t){var n={AED:{before:"ج"},ANG:{before:"ƒ"},ARS:{before:"$"},AUD:{before:"$"},AWG:{before:"ƒ"},BBD:{before:"$"},BGN:{before:"лв"},BMD:{before:"$"},BND:{before:"$"},BRL:{before:"R$"},BSD:{before:"$"},CAD:{before:"$"},CHF:{before:""},CLP:{before:"$"},CNY:{before:"¥"},COP:{before:"$"},CRC:{before:"₡"},CZK:{before:"Kc"},DKK:{before:"kr"},DOP:{before:"$"},EEK:{before:"kr"},EUR:{before:"€"},GBP:{before:"£"},GTQ:{before:"Q"},HKD:{before:"$"},HRK:{before:"kn"},HUF:{before:"Ft"},IDR:{before:"Rp"},ILS:{before:"₪"},INR:{before:"Rs."},ISK:{before:"kr"},JMD:{before:"J$"},JPY:{before:"¥"},KRW:{before:"₩"},KYD:{before:"$"},LTL:{before:"Lt"},LVL:{before:"Ls"},MXN:{before:"$"},MYR:{before:"RM"},NOK:{before:"kr"},NZD:{before:"$"},PEN:{before:"S/"},PHP:{before:"Php"},PLN:{before:"z"},QAR:{before:"﷼"},RON:{before:"lei"},RUB:{before:"руб"},SAR:{before:"﷼"},SEK:{before:"kr"},SGD:{before:"$"},THB:{before:"฿"},TRY:{before:"TL"},TTD:{before:"TT$"},TWD:{before:"NT$"},UAH:{before:"₴"},USD:{before:"$"},UYU:{before:"$U"},VEF:{before:"Bs"},VND:{before:"₫"},XCD:{before:"$"},ZAR:{before:"R"}},o=n[t]||{},a=o.before||"",i=o.after||"";return a+e+i}}}}(),PAYPAL===void 0||!PAYPAL)var PAYPAL={};PAYPAL.apps=PAYPAL.apps||{},function(){"use strict";function e(e,t){var o,a,u,s,c,p,d,l=document.createElement("form"),m=document.createElement("input"),f=document.createElement("input"),h=e.items;m.type="image",f.type="hidden",l.method="post",l.action=r,l.className="paypal-button",l.target="_top";for(c in h)o=h[c],o.isEditable?(s=document.createElement("input"),s.type="text",s.className="paypal-input",s.name=o.key,s.value=o.value,u=document.createElement("label"),u.className="paypal-label",u.appendChild(document.createTextNode(i.config.labels[o.key]+" "||"")),u.appendChild(s),a=document.createElement("p"),a.className="paypal-group",a.appendChild(u)):(s=a=f.cloneNode(!0),s.name=o.key,s.value=o.value),l.appendChild(a);if(p=h.size&&h.size.value,d=h.lc&&h.lc.value,l.appendChild(m),m.src=n(t,p,d),PAYPAL.apps.MiniCart&&"_cart"===e.items.cmd.value){var b=PAYPAL.apps.MiniCart;b.UI.itemList||b.render(),b.bindForm(l)}return l}function t(e,t){var n,o,a=document.createElement("img"),i=r+"?",s=13,c=e.items;t=t&&t.value||250;for(o in c)n=c[o],i+=n.key+"="+encodeURIComponent(n.value)+"&";return i=encodeURIComponent(i),a.src=u.replace("{url}",i).replace("{pattern}",s).replace("{size}",t),a}function n(e,t,n){var o=p[e]||p.buynow;return n=n||"en_US",t="small"===t?"SM":"LG",o.replace(/\{locale\}/,n).replace(/\{size\}/,t)}function o(e){var t,n,o,a,i,r={};if(t=e.attributes)for(i=0,a=t.length;a>i;i++)n=t[i],(o=/^data-([a-z0-9]+)(-editable)?/i.exec(n.name))&&(r[o[1]]={value:n.value,isEditable:!!o[2]});return r}function a(){this.items={},this.add=function(e,t,n){this.items[e]={key:e,value:t,isEditable:n}},this.remove=function(e){delete this.items[e]}}var i={},r="https://www.paypal.com/cgi-bin/webscr",u="https://www.paypal.com/webapps/ppint/qrcode?data={url}&pattern={pattern}&height={size}",s="JavaScriptButton_{type}",c={name:"item_name",number:"item_number",lang:"lc",recurrence:"p3",period:"t3"},p={buynow:"//www.paypalobjects.com/{locale}/i/btn/btn_buynow_{size}.gif",cart:"//www.paypalobjects.com/{locale}/i/btn/btn_cart_{size}.gif",donate:"//www.paypalobjects.com/{locale}/i/btn/btn_donate_{size}.gif",subscribe:"//www.paypalobjects.com/{locale}/i/btn/btn_subscribe_{size}.gif"};if(PAYPAL.apps.ButtonFactory||(i.config={labels:{item_name:"Item",item_number:"Number",amount:"Amount",quantity:"Quantity"}},i.buttons={buynow:0,cart:0,donate:0,qr:0,subscribe:0},i.create=function(n,o,i,r){var u,p,d=new a;if(!n)return!1;for(p in o)d.add(c[p]||p,o[p].value,o[p].isEditable);return i=i||"buynow","cart"===i?(d.add("cmd","_cart"),d.add("add",!0)):"donate"===i?d.add("cmd","_donations"):"subscribe"===i?(d.add("cmd","_xclick-subscriptions"),d.items.amount&&!d.items.a3&&d.add("a3",d.items.amount.value)):d.add("cmd","_xclick"),d.add("business",n),d.add("bn",s.replace(/\{type\}/,i)),"qr"===i?(u=t(d,d.items.size),d.remove("size")):u=e(d,i),this.buttons[i]+=1,r&&r.appendChild(u),u},PAYPAL.apps.ButtonFactory=i),"undefined"!=typeof document){var d,l,m,f,h,b,g=PAYPAL.apps.ButtonFactory,v=document.getElementsByTagName("script");for(h=0,b=v.length;b>h;h++)d=v[h],d&&d.src&&(l=d&&o(d),m=l&&l.button&&l.button.value,f=d.src.split("?merchant=")[1],f&&(g.create(f,l,m,d.parentNode),d.parentNode.removeChild(d)))}}(),"object"==typeof module&&"object"==typeof module.exports&&(module.exports=PAYPAL);
2  lib/MiniCart
@@ -1 +1 @@
-Subproject commit 9dbe238f255bea468e8baf5dc945b76e404a523f
+Subproject commit 6e7e0736a53efea94ce4343e3a1e43be564bb486
Please sign in to comment.
Something went wrong with that request. Please try again.