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