function updateProductAbout(){var t=Curioos.readCookie(Curioos.cart),i=Curioos.readCookie(Curioos.shipping),r=$(".delivery-date"),u=String.format(r.text(),i.DeliveryMinDays,i.DeliveryMaxDays),n;r.text(u);n=$(".free-shipping");t.FreeShippingProductMessage?(n.find("span").html(t.FreeShippingProductMessage),n.show()):n.hide()}function formatCurrency(n,t){if(typeof n!="undefined"&&n!==null&&n!==0){var i=$("head");return(Math.round(n)!=n&&(n=parseFloat(n).toFixed(2)),(typeof t=="undefined"||t===null)&&(t=""),i.data("currency")==="EUR")?t+n+i.data("currencySymbol"):t+i.data("currencySymbol")+n}return""}var localItemKey,saveRecentItemViewed;$(document).ready(function(){var n="errorContainer";showErrorModal=function(t){var u=$("body").hasClass("fr"),f='<div class="curioos-modal-container"><div class="close-btn"><span>+<\/span><\/div><h2>'+(u?"Une erreur est survenue":"Something went wrong")+"<\/h2><section>"+t+"<\/section><\/div>",r=$('<div class="fullscreen-shadow" />').appendTo("body"),i=$('<div class="curioos-modal '+n+'" />').html(f).appendTo("body");i.find(".close-btn, .dismiss").on("click",function(){i.remove();r.remove()});$(document).on("keyup",function(n){n.keyCode===27&&(i.remove(),r.remove())})}});window._MA=[{neckStyle:"CN",size:[{value:"S",chest:{inch:"19.5",cm:"49,5"},length:{inch:"29.5",cm:"74,9"}},{value:"M",chest:{inch:"20",cm:"50,8"},length:{inch:"30.5",cm:"77,5"}},{value:"L",chest:{inch:"20.5",cm:"52,1"},length:{inch:"31",cm:"78,7"}},{value:"XL",chest:{inch:"21.5",cm:"54,6"},length:{inch:"32",cm:"81,3"}},{value:"2XL",chest:{inch:"23.5",cm:"59,7"},length:{inch:"33",cm:"83,8"}},{value:"3XL",chest:{inch:"24.5",cm:"62,2"},length:{inch:"34",cm:"86,4"}}]}];window._WA=[{neckStyle:"CN",size:[{value:"XS",chest:{inch:"18",cm:"45,7"},length:{inch:"25.5",cm:"64,8"}},{value:"S",chest:{inch:"19",cm:"48,3"},length:{inch:"26",cm:"66"}},{value:"M",chest:{inch:"20",cm:"50,8"},length:{inch:"26.5",cm:"67,3"}},{value:"L",chest:{inch:"21",cm:"53,3"},length:{inch:"27",cm:"68,6"}},{value:"XL",chest:{inch:"22",cm:"55,9"},length:{inch:"27.5",cm:"69,9"}}]}];window._MC=[{neckStyle:"CN",size:[{value:"S",chest:{inch:"18",cm:"45,7"},length:{inch:"28",cm:"71,1"}},{value:"M",chest:{inch:"20",cm:"50,8"},length:{inch:"29",cm:"73,7"}},{value:"L",chest:{inch:"22",cm:"55,9"},length:{inch:"30",cm:"76,2"}},{value:"XL",chest:{inch:"24",cm:"61"},length:{inch:"31",cm:"78,7"}},{value:"2XL",chest:{inch:"26",cm:"66"},length:{inch:"32",cm:"81,3"}},{value:"3XL",chest:{inch:"28",cm:"71,1"},length:{inch:"33",cm:"83,8"}}]},{neckStyle:"VN",size:[{value:"S",chest:{inch:"18",cm:"45,7"},length:{inch:"27.8",cm:"70,5"}},{value:"M",chest:{inch:"20",cm:"50,8"},length:{inch:"28.8",cm:"73"}},{value:"L",chest:{inch:"22",cm:"55,9"},length:{inch:"29.8",cm:"75,6"}},{value:"XL",chest:{inch:"24",cm:"61"},length:{inch:"30.8",cm:"78"}},{value:"2XL",chest:{inch:"26",cm:"66"},length:{inch:"31.8",cm:"80,6"}},{value:"3XL",chest:{inch:"28",cm:"71,1"},length:{inch:"32.8",cm:"83,2"}}]}];window._WC=[{neckStyle:"CN",size:[{value:"S",chest:{inch:"16",cm:"40,6"},length:{inch:"26.3",cm:"66,7"}},{value:"M",chest:{inch:"16.8",cm:"42,5"},length:{inch:"26.8",cm:"67,9"}},{value:"L",chest:{inch:"17.8",cm:"45"},length:{inch:"27.8",cm:"70,5"}},{value:"XL",chest:{inch:"18.8",cm:"47,6"},length:{inch:"28",cm:"71,1"}}]},{neckStyle:"VN",size:[{value:"S",chest:{inch:"15.8",cm:"40"},length:{inch:"26",cm:"66"}},{value:"M",chest:{inch:"16.5",cm:"41,9"},length:{inch:"26.5",cm:"67,3"}},{value:"L",chest:{inch:"17.5",cm:"44,5"},length:{inch:"27.1",cm:"68,9"}},{value:"XL",chest:{inch:"18.5",cm:"47"},length:{inch:"27.8",cm:"70,5"}}]},{neckStyle:"SN",size:[{value:"S",chest:{inch:"16.3",cm:"41,3"},length:{inch:"25.5",cm:"64,8"}},{value:"M",chest:{inch:"17",cm:"43,2"},length:{inch:"26",cm:"66"}},{value:"L",chest:{inch:"18",cm:"45,7"},length:{inch:"26.6",cm:"67,6"}},{value:"XL",chest:{inch:"19",cm:"48,3"},length:{inch:"27.3",cm:"69,2"}}]}];!function(n,t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(n){t(n)}):"object"==typeof module&&module.exports?module.exports=n.EasyZoom=t(require("jquery")):n.EasyZoom=t(n.jQuery)}(this,function(n){"use strict";function t(t,i){this.$target=n(t);this.opts=n.extend({},s,i,this.$target.data());void 0===this.isOpen&&this._init()}var i,r,e,o,u,f,s={loadingNotice:"Loading image",errorNotice:"The image could not be loaded",errorDuration:2500,linkAttribute:"href",preventClicks:!0,beforeShow:n.noop,beforeHide:n.noop,onShow:n.noop,onHide:n.noop,onMove:n.noop};t.prototype._init=function(){this.$link=this.$target.find("a");this.$image=this.$target.find("img");this.$flyout=n('<div class="easyzoom-flyout" />');this.$notice=n('<div class="easyzoom-notice" />');this.$target.on({"mousemove.easyzoom":n.proxy(this._onMove,this),"mouseleave.easyzoom":n.proxy(this._onLeave,this),"mouseenter.easyzoom":n.proxy(this._onEnter,this)});this.opts.preventClicks&&this.$target.on("click.easyzoom",function(n){n.preventDefault()})};t.prototype.show=function(n,t){var u,f,s,h,c=this;if(this.opts.beforeShow.call(this)!==!1){if(!this.isReady)return this._loadImage(this.$link.attr(this.opts.linkAttribute),function(){!c.isMouseOver&&t||c.show(n)});this.$target.append(this.$flyout);u=this.$target.width();f=this.$target.height();s=this.$flyout.width();h=this.$flyout.height();i=this.$zoom.width()-s;r=this.$zoom.height()-h;i<0&&(i=0);r<0&&(r=0);e=i/u;o=r/f;this.isOpen=!0;this.opts.onShow.call(this);n&&this._move(n)}};t.prototype._onEnter=function(n){var t=n.originalEvent.touches;this.isMouseOver=!0;t&&1!=t.length||(n.preventDefault(),this.show(n,!0))};t.prototype._onMove=function(n){this.isOpen&&(n.preventDefault(),this._move(n))};t.prototype._onLeave=function(){this.isMouseOver=!1;this.isOpen&&this.hide()};t.prototype._onLoad=function(n){n.currentTarget.width&&(this.isReady=!0,this.$notice.detach(),this.$flyout.html(this.$zoom),this.$target.removeClass("is-loading").addClass("is-ready"),n.data.call&&n.data())};t.prototype._onError=function(){var n=this;this.$notice.text(this.opts.errorNotice);this.$target.removeClass("is-loading").addClass("is-error");this.detachNotice=setTimeout(function(){n.$notice.detach();n.detachNotice=null},this.opts.errorDuration)};t.prototype._loadImage=function(t,i){var r=new Image;this.$target.addClass("is-loading").append(this.$notice.text(this.opts.loadingNotice));this.$zoom=n(r).on("error",n.proxy(this._onError,this)).on("load",i,n.proxy(this._onLoad,this));r.style.position="absolute";r.src=t};t.prototype._move=function(n){var t,c,l;0===n.type.indexOf("touch")?(t=n.touches||n.originalEvent.touches,u=t[0].pageX,f=t[0].pageY):(u=n.pageX||u,f=n.pageY||f);var a=this.$target.offset(),v=f-a.top,y=u-a.left,s=Math.ceil(v*o),h=Math.ceil(y*e);h<0||s<0||h>i||s>r?this.hide():(c=s*-1,l=h*-1,this.$zoom.css({top:c,left:l}),this.opts.onMove.call(this,c,l))};t.prototype.hide=function(){this.isOpen&&this.opts.beforeHide.call(this)!==!1&&(this.$flyout.detach(),this.isOpen=!1,this.opts.onHide.call(this))};t.prototype.swap=function(t,i,r){this.hide();this.isReady=!1;this.detachNotice&&clearTimeout(this.detachNotice);this.$notice.parent().length&&this.$notice.detach();this.$target.removeClass("is-loading is-ready is-error");this.$image.attr({src:t,srcset:n.isArray(r)?r.join():r});this.$link.attr(this.opts.linkAttribute,i)};t.prototype.teardown=function(){this.hide();this.$target.off(".easyzoom").removeClass("is-loading is-ready is-error");this.detachNotice&&clearTimeout(this.detachNotice);delete this.$link;delete this.$zoom;delete this.$image;delete this.$notice;delete this.$flyout;delete this.isOpen;delete this.isReady};n.fn.easyZoom=function(i){return this.each(function(){var r=n.data(this,"easyZoom");r?void 0===r.isOpen&&r._init():n.data(this,"easyZoom",new t(this,i))})}});var altSite=!1,showFullBio=function(){$(".product-artist .bio-box").css("max-height","none").find(".read-more").remove()},fillBloc=function(n,t,i,r,u){$.ajax({url:i,data:{productId:n},success:function(n){var e,f,i;if(n&&n.length>0){for(e=$(t).show(),f=$("<ul/>").appendTo(e),i=0;i<n.length;i++)f.append('<li><a href="/product/'+n[i].ProductTypeUrl+"/"+n[i].ProductAlias+'"><img src="'+n[i].ImgSrc+'"'+(n[i].CssColor?' class="'+n[i].CssColor+'"':"")+"/><\/a><\/li>");u&&f.append('<li><a href="'+u+'"><i class="icn-right"><\/i>'+(r?"TOUT VOIR":"VIEW ALL")+"<\/a><\/li>")}}})},bindList=function(n,t,i){var u=n.attr("id")==="sl-color",f=u?$(".apparel-colors"):n.nextAll(".custom-list"),s=n.nextAll(".custom-selected"),h=t.length>0&&t[0]!==null,e,r,o;n.empty();f.empty();for(e in t)r=h?t[e].option:e,$("<option>",{value:r,text:r}).appendTo(n),o=$("<li />",{text:u?"":r,"data-value":r}),u?o.addClass(window._colorTab[r]):h&&o.append('<span class="price">'+t[e].price+"<\/span>"),o.appendTo(f).click(function(){f.find("li.active").removeClass("active");n.val($(this).addClass("active").data("value")).trigger("change");u||(s.text($(this).attr("data-value")).removeClass("active"),f.hide())});return i&&(n.val(i),s.text(n.find("option:selected").val())),n.val()!==i&&(n.val(n.find("option:first").val()),s.text(n.find("option:first").val())),u&&f.find("li."+window._colorTab[n.val()]).addClass("active"),n};var updatePriceEditionImage=function(n,t,i,r){var u,o,e,h,s,f;for(i.length>0&&(window._defaultColor=i.val(),$(".product-showroom").attr("class","product-showroom "+window._colorTab[i.val()])),o=Curioos.readCookie(Curioos.cart),e=0,h=window._pageoptions.length;e<h;e++)if(u=window._pageoptions[e],u.o1===n.val()&&u.o2===t.val()&&u.o3===i.val()&&u.o4===r.val()){$(".product-edition").css("visibility","hidden");$(".product-remaining-edition").hide();$("button.btn-cart").prop("disabled",!1).removeClass("disabled");u.stock>-1&&($(".product-edition").css("visibility","visible"),u.stock<=0?($(".product-edition-count").text("SOLD OUT"),$("button.btn-cart").prop("disabled",!0).addClass("disabled")):($(".product-edition-count").text(u.stock+u.sold),u.sold>0&&u.stock/u.sold<.8&&$(".product-remaining-edition-count").text(u.stock).parent().show()));$("#price").text(formatCurrency(o.PrefilledDiscountCode?u.price-u.price*o.DiscountCodeValue/100:u.price));$(".barred-price span").text(formatCurrency(u.price));break}if(u){u.gallerySet?(s=$(".active:visible").index(".thumbnails li:visible"),$(".thumbnails li:not(.jsAlwaysDisplay)").hide(),$(".thumbnails li."+u.gallerySet).show().eq(s<0?0:s).find("a").trigger("click"),updateSizeChart(u.gallerySet)):(f=$(".thumbnails li:first a"),u.associatedImg?(f.data("defaultSrc")||f.data("defaultSrc",f.attr("href")),f.attr("href",u.associatedImg).click().find("img").attr("src",u.associatedImg.replace("Zoom","Thumb"))):f.data("defaultSrc")&&f.attr("href",f.data("defaultSrc")).click().find("img").attr("src",f.data("defaultSrc").replace("Zoom","Thumb")));$("button.btn-cart").off("click").on("click",function(){if(altSite&&!$("head").data("email")){$("#signinContainer").click();return}var n=$(this);n.prop("disabled")||(n.prop("disabled",!0),altSite||(window.analytics.page({path:"/addtocart",url:window.location.protocol+"//"+window.location.hostname+"/addtocart"}),window.analytics.track("Product Added",{segment_prodid:window._productId,segment_pagetype:"product",segment_totalvalue:u.price,priceCurrency:$("head").data("currency"),title:$("title").text(),url:location.href.toString(),referrer:"https://www.curioos.com/shop/cart",path:location.pathname.toString()})),$("i.icn-cart").removeClass("icn-cart").addClass("icn-loading loading"),$.ajax({method:"POST",url:"/Public/HiddenPost/Cart/AddProductToCart",data:{productId:window._productId,supportIds:u.supportIds.split(",")},success:function(){var i;$("i.icn-loading").removeClass("icn-loading loading").addClass("icn-cart");var n=$("body").hasClass("fr"),f='<div class="curioos-modal-container"><div class="close-btn"><span>+<\/span><\/div><h2>'+(n?"Ajouté à votre panier !":"Successfully added to your cart!")+'<\/h2><section class="product-infos"><img class="'+(u.color?u.color.toLowerCase():"")+'" src="'+$(".easyzoom--overlay img:first").attr("src")+'" alt="Product thumbnail"><div><h3>'+$("#productPage h1").text()+" "+(n?"par":"by")+" "+$(".author a").text()+"<\/h3><p>"+u.o1+(u.o2?" - "+u.o2:"")+(u.o3?" - "+u.o3:"")+(u.o4?" - "+u.o4:"")+'<\/p><p class="price">'+$("#price").text()+'<\/p><\/div><\/section><section class="proceed"><button class="btn grey dismiss" class="btn grey">'+(n?"Continuer mes achats":"Continue shopping")+"<\/button> <span>- "+(n?"ou":"or")+' -<\/span> <a href="/shop/cart" class="btn gold">'+(n?"Finaliser ma commande":"Proceed to checkout")+"<\/a><\/section><\/div>",r=$('<div class="fullscreen-shadow" />').appendTo("body"),t=$('<div class="curioos-modal addToCartContainer" />').html(f).appendTo("body");t.find(".close-btn, .dismiss").on("click",function(){t.remove();r.remove()});$(document).on("keyup",function(n){n.keyCode===27&&(t.remove(),r.remove())});i=$("#cart").addClass("non-empty").find(".js-headerShopItems");i.text(parseInt(i.text())+1);updateProductAbout()},error:function(n){$("i.icn-loading").removeClass("icn-loading loading").addClass("icn-cart");var t=JSON.parse(n.responseText).Error;showErrorModal(t)},complete:function(){n.prop("disabled",!1)}}))})}},updateSizeChart=function(n){var i,t,r=n.split("-");switch(window._productType){case"mc":t=window._MC;break;case"wc":t=window._WC;break;case"ma":t=window._MA;break;case"wa":t=window._WA;break;default:return}t.forEach(function(n){r[0]===n.neckStyle&&(i=n.size)});i&&($(".sizechart .size th:not(:first-child)").remove(),$(".sizechart .chest td:not(:first-child)").remove(),$(".sizechart .length td:not(:first-child)").remove(),i.forEach(function(n){$(".sizechart .size").append("<th>"+n.value+"<\/th>");$(".sizechart .chest").append('<td><i class="inch">'+n.chest.inch+'<\/i><i class="cm">'+n.chest.cm+"<\/i><\/td>");$(".sizechart .length").append('<td><i class="inch">'+n.length.inch+'<\/i><i class="cm">'+n.length.cm+"<\/i><\/td>")}))},customListInit=function(){$(".custom-selected").click(function(n){n.stopPropagation();$(".custom-selected.active").not(this).each(function(){$(this).removeClass("active").next(".custom-list").hide()});$(this).toggleClass("active").next(".custom-list").toggle()});$(document).click(function(){$(".custom-selected").removeClass("active");$(".custom-list").hide()})},arrayObjectIndexOf=function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(n[r][i]===t)return r;return-1};$(document).ready(function(){var e,h;stickIt($("body"),$("#sub-hdr"));e=$(".easyzoom").easyZoom().data("easyZoom");$(".thumbnails a").on("click",function(n){var t=$(this);$(".thumbnails li").removeClass("active");t.parent().addClass("active");n.preventDefault();e.swap(t.attr("href"),t.attr("href"))});$(".easyzoom").on("click",function(n){var t=$(".thumbnails li.active");e.swap(t.attr("href"),t.attr("href"));n.preventDefault()});window._productId=$("#productPage h1").data("productId");window._initialColor=$(".product-showroom").attr("class").replace("product-showroom","").replace(" ","").toUpperCase();var c=$("#productPage h1").data("gallerySet"),l=$("body").hasClass("fr"),n=$("#sl-size"),t=$("#sl-option"),i=$("#sl-color").attr("disabled","disabled"),r=$("#sl-printside");window._productType=$("#product-about").attr("class");(window._productType==="ma"||window._productType==="wa")&&updateSizeChart("CN");var u=window._productType==="pr"||window._productType==="ca"||window._productType==="al"||window._productType==="ac",a=window._productType==="ad"||window._productType==="dc"||window._productType==="tp"||window._productType==="tb",o=window._productType==="pr",f=i.length>0,s="Fine Art Block",v=function(n){var t=$(".product-type-title");n===s?(t.attr("data-page-title")||t.attr("data-page-title",t.text()),t.text(n),$("#product-about p").first().hide(),$("#fab-desc").show()):(t.attr("data-page-title")&&t.text(t.attr("data-page-title")),$("#product-about p").first().show(),$("#fab-desc").hide())};$.ajax({url:"/Public/HiddenPost/Product/SkuInfos",data:{productId:window._productId}}).done(function(e){window._pageoptions=e;var k=[],h=[],l=[];window._colorTab=[];var p=[],w=o||f,b,d,y=Curioos.readCookie(Curioos.cart);e.forEach(function(n){w&&(f&&n.color===window._initialColor&&n.gallerySet===c?(b=n.o2,window._defaultColor=n.o3,d=n.o4,w=!1):o&&window.location.hash.toLowerCase()===n.hash&&(b=n.o2,w=!1));n.o1&&!h[n.o1]&&(a?h.push({option:n.o1,price:formatCurrency(y.PrefilledDiscountCode?n.price-n.price*y.DiscountCodeValue/100:n.price)}):h[n.o1]=u?[]:null);n.o2&&!l[n.o2]&&(l[n.o2]=[],k[n.o2]=n.hash?n.hash:"");n.o3&&!window._colorTab[n.o3]&&(window._colorTab[n.o3]=n.color.toLowerCase());n.o4&&!p[n.o4]&&(p[n.o4]=null);u&&n.o1&&n.o2&&arrayObjectIndexOf(h[n.o1],n.o2,"option")===-1&&h[n.o1].push({option:n.o2,price:formatCurrency(y.PrefilledDiscountCode?n.optionPrice-n.optionPrice*y.DiscountCodeValue/100:n.optionPrice,"+")});n.o2&&(u&&n.o1&&arrayObjectIndexOf(l[n.o2],n.o1,"option")===-1?l[n.o2].push({option:n.o1,price:formatCurrency(y.PrefilledDiscountCode?n.price-n.optionPrice-(n.price-n.optionPrice)*y.DiscountCodeValue/100:n.price-n.optionPrice)}):f&&n.o3&&arrayObjectIndexOf(l[n.o2],n.o3,"option")===-1&&l[n.o2].push({option:n.o3}))});bindList(n,h).change(function(){u&&bindList(t,h[n.val()],t.val());n.val().toString().startsWith("KIT")?($("#product-about p").first().hide(),$("#can-desc").show()):($("#product-about p").first().show(),$("#can-desc").hide());updatePriceEditionImage(n,t,i,r)});r.length>0&&bindList(r,p,d).change(function(){updatePriceEditionImage(n,t,i,r)});f&&i.change(function(){updatePriceEditionImage(n,t,i,r)});t.length>0&&bindList(t,u?h[n.val()]:l,b).change(function(){if(f)bindList(i,l[t.val()],window._defaultColor);else if(u&&(bindList(n,l[t.val()],n.val()),o)){var e=k[t.val()];window.location.hash.toLowerCase()!==e&&history.replaceState({},"",window.location.pathname+e);v(e==="#block"?s:"")}updatePriceEditionImage(n,t,i,r)}).trigger("change");altSite&&n.find('option:contains("MEDIUM")').prop("selected",!0);(altSite||t.length===0)&&n.trigger("change");customListInit()});h=$(".product-same-artist a:first").attr("href")+(altSite?"":"?sort=mostpopular");fillBloc(window._productId,".product-same-artist","/Public/HiddenPost/Product/GetSameArtistProducts",l,h);fillBloc(window._productId,".product-similar","/Public/HiddenPost/Product/GetSameCollectionProducts");$(".sizechart span").on("click",function(){var n=$(".sizechart"),t=n.hasClass("inch")?"inch":"cm";$(this).hasClass(t)||n.toggleClass("inch cm")});$(".artist-bio").height()>51&&$(".product-artist .bio-box").append('<span onclick="showFullBio()" class="read-more">read more<\/span>');updateProductAbout()});localItemKey="recentViewed";saveRecentItemViewed=function(n,t){t||(t=[]);t.unshift({artworkId:n.attr("data-artwork-id"),productId:n.attr("data-product-id"),crossImageId:n.attr("data-cross-imageid"),path:window.location.pathname,cssClass:$(".product-showroom").attr("class").replace("product-showroom","").replace(" ","")});localStorage.setItem(localItemKey,JSON.stringify(t))};$(document).ready(function(){var t;if(lsTest()){var n=JSON.parse(localStorage.getItem(localItemKey)),e=$("body"),i=$("#productPage h1");if(n&&n.length>0){var o=e.hasClass("fr"),r=6,u=!1,f='<div class="rv-container"><div class="recently-viewed"><h4><i class="icn-eye"><\/i>'+(o?"Vus récemment":"Recently viewed")+'<\/h4><hr/><div style="clear: both;"><\/div><ul>';for(i.length>0?r=7:e.hasClass("products")&&(r=9),r>n.length&&(r=n.length),t=0;t<r;t++)f+='<li><a href="'+n[t].path+'"><img'+(n[t].cssClass?' class="'+n[t].cssClass+'"':"")+' src="/content/files/Products/'+n[t].productId+"/"+n[t].crossImageId+'/CrossThumb"><\/a><\/li>',n[t].artworkId===i.attr("data-artwork-id")&&(u=!0);f+="<\/ul><\/div><\/div>";$(".home main .container, .products .products-content, .product-page #productPage").append(f);n.length>=9&&!u&&n.pop();!u&&i.length>0&&saveRecentItemViewed(i,n)}else i.length>0&&saveRecentItemViewed(i)}})