function isOpera(){var a=!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0;return a}function patchCurrency(){var a=getFlashMovie().getPropertyValue("shopProperties.currency.code"),b=/"\w*"/,c=a.match(b);if(c&&c.length>0)var d=c[0].replace(/"/g,"");d&&setCurrency(d)}function handlerWrapper(a,b){if(isOpera())var c=setInterval(function(){a(b),clearInterval(c)},500);else a(b)}function onChange(a){getFlashMovie().onChange(a)}function getPublicationID(){return cart.publicationID}function getShopID(){return cart.shopID}function getShopInfoHandler(a){handlerWrapper(function(a){getFlashMovie().getShopInfo(a)},a)}function getShopInfoErrorHandler(a){handlerWrapper(function(a){getFlashMovie().getShopInfoError(a)},a)}function getItemsHandler(a){handlerWrapper(function(a){getFlashMovie().getItems(a)},a)}function getItemsErrorHandler(a){handlerWrapper(function(a){getFlashMovie().getItemsError(a)},a)}function getItems(a){cart.getItems(getItemsHandler,getItemsErrorHandler,a)}function addItem(a,b,c){cart.addItem(a,b,c)}function getCart(){return setTimeout(function(){patchCurrency()},500),cart.getCart()}function changeQuantity(a,b,c){return cart.changeQuantity(a,b,c)}function getItemQuantity(a,b){return cart.getItemQuantity(a,b)}function delItem(a){return cart.delItem(a)}function checkout(a){return cart.checkout(a,checkoutHandler,checkoutErrorHandler)}function checkoutHandler(a){"object"==typeof a?handlerWrapper(function(a){getFlashMovie().onCheckoutResult(a)},a):(a=JSON.parse(a),a.d.Success?handlerWrapper(function(a){getFlashMovie().onCheckoutResult(a)},a):checkoutErrorHandler(a))}function checkoutErrorHandler(a){handlerWrapper(function(a){getFlashMovie().onCheckoutError(a)},a)}function checkoutStatusHandler(a){handlerWrapper(function(a){getFlashMovie().onCheckoutStatus(a)},a)}function getCheckoutStatus(a){return cart.getCheckoutStatus(checkoutStatusHandler,a)}function clear(a){cart.clear(a)}function setCurrency(a){cart.setCurrency(a)}var cart=new Cart;"function"!=typeof getFlashMovie&&(getFlashMovie=function(){if(window.document[flashContainerName])return window.document[flashContainerName];var a=-1!=navigator.appName.indexOf("Microsoft");return a?window[flashContainerName]:document.getElementById(flashContainerName)}),cart.on("change",onChange);