function addtodressingroom(){var b={a:"addtodressingroom"};b.i=$(this).data("barcode");if(!b.i){var a=$(this).data("errorid");a=a?a:"errorelement";$("#"+a).html("Please select a size");$("#"+a).show();$("#"+a).hide();$("#"+a).show(300);setTimeout(function(){$("#"+a).hide(300)},2E3);return!1}if(""===b.i)return!1;$.getJSON("/process-dressingroom",b,function(a){a.success&&(document.location.href="/wishlist")});return!1}
function removedressingroomitem(b){b.preventDefault();b={a:"removedressingroom"};b.i=$(this).data("key");$.get("/process-dressingroom",b,function(a){$("#dressingroomcontent").html(a).removeClass("loading")})}function buyallitems(b){b.preventDefault();$.get("/process-dressingroom",{a:"buyallitems"},function(a){$("#dressingroomcontent").html(a).removeClass("loading")}).done(function(){document.location.href="/cart"})}
function clearallitems(b){b.preventDefault();$.get("/process-dressingroom",{a:"clearallitems"},function(a){$("#dressingroomcontent").html(a).removeClass("loading")}).done(function(){document.location.href="/cart"})}$(document).on("click",".addtodressingroom",addtodressingroom);$(document).on("click",".removedressingroom",removedressingroomitem);$(document).on("click",".buyalldressingroom",buyallitems);$(document).on("click",".clearallitems",clearallitems);