<\/div>';i+="<\/div>";i+='
';i+="
"+n.ProductName+"<\/strong>"+n.ProductDescription+"<\/p>";i+="<\/div>";r=''+i+"<\/div>";$(".drawings-template .results .download-list .list").append(r)}function n(){for(var n=0;n
<\/i>').addClass("checked")}):($(".products-list .box").each(function(){$(this).html("").removeClass("checked")}),forDownload=[],forDownloadFullData=[]);var t=$(".products-list .box.checked").length;$(".drawings-template .results .download-list .list").html("");t==0?($(".drawings-template .results .download-list .list").hide(),$(".drawings-template .results .download-list .placeholder").show(),$(".drawings-template .results .bottom .button img").addClass("disabled")):($(".drawings-template .results .download-list .list").show(),$(".drawings-template .results .download-list .placeholder").hide(),$(".products-list .box.checked").each(function(){var i=$(this).closest(".prow"),r=i.attr("data-id"),n=productData.find(n=>n.Sku===r.replace("left-","").replace("right-","")),t;n&&(t=forDownloadFullData.find(t=>t.Sku===n.Sku),t||(forDownload.push(n.Sku),forDownloadFullData.push(n)))}),$(".drawings-template .results .download-list .list").append('<\/div>'),$(".drawings-template .results .bottom .button img").removeClass("disabled"));n();SetCartCount()});$(document).on("click",".products-list .box",function(){var e=$(this).closest(".prow"),i=e.attr("data-id"),t,u,f,r;$(this).hasClass("checked")?($(this).html("").removeClass("checked"),forDownload=forDownload.filter(function(n){return n!==i}),forDownloadFullData=forDownloadFullData.filter(function(n){return n.Sku!==i})):($(this).html('
<\/i>').addClass("checked"),t=productData.find(n=>n.Sku===i.replace("left-","").replace("right-","")),t&&(u=forDownloadFullData.find(n=>n.Sku===t.Sku),u||(forDownload.push(t.Sku),forDownloadFullData.push(t))));f=forDownloadFullData.length;$(".drawings-template .results .download-list .list").html("");f==0?($(".drawings-template .results .download-list .list").hide(),$(".drawings-template .results .download-list .placeholder").show(),$(".drawings-template .results .bottom .button img").addClass("disabled")):($(".drawings-template .results .download-list .list").show(),$(".drawings-template .results .download-list .placeholder").hide(),$(".drawings-template .results .download-list .list").append('<\/div>'),$(".drawings-template .results .bottom .button img").removeClass("disabled"));n();SetCartCount();r=$(".products-list .box").length;(forDownload.length==0||forDownload.length!=r)&&$("#select-all").prop("checked",!1);forDownload.length==r&&$("#select-all").prop("checked",!0)});$(document).on("click",".drawings-template .results .download-list .list .download .remove",function(){var i=$(this).closest(".download"),n=i.attr("data-id"),t;forDownload=forDownload.filter(function(t){return t!=n});forDownloadFullData=forDownloadFullData.filter(function(t){return t.Sku!=n});i.remove();$('.prow[data-id="'+n+'"]').find(".box").html("").removeClass("checked");$(".drawings-template .results .download-list .list .download").length==0?($(".drawings-template .results .download-list .list").hide(),$(".drawings-template .results .download-list .placeholder").show(),$(".drawings-template .results .bottom .button img").addClass("disabled")):$(".drawings-template .results .bottom .button img").removeClass("disabled");SetCartCount();t=$(".products-list .box").length;(forDownload.length==0||forDownload.length!=t)&&$("#select-all").prop("checked",!1);forDownload.length==t&&$("#select-all").prop("checked",!0)});$("#downloadButton").on("click",function(){var t=forDownload.join(),n=$("