(function(l){var f=window.AmazonUIPageJS||window.P,r=f._namespace||f.attributeErrors,c=r?r("TwisterHardlinesDetailPageAsset",""):f;c.guardFatal?c.guardFatal(l)(c,window):c.execute(function(){l(c,window)})})(function(l,f,r){l.when("A","jQuery","atf").execute(function(c,a){c.on.ready(function(){function m(b,e,c,g,d){a(b).slideToggle(300);a(e).slideToggle(300);a(c).toggleClass("tmmShowPrompt tmmHidePrompt");a(g).toggleClass("tmmShowPrompt tmmHidePrompt");a(d).toggleClass("rotate")}function h(b){b.position();
b.width();a(".swatchElement");b.find(".swatchElement").each(function(){a(this).attr("data-width",a(this).width())});a("#formats").find(".a-row").removeClass("nonJSFormats")}function A(){var b=a("#formats"),e=b.width()-40,c=0;b.find(".swatchElement").each(function(){a(this).is(":visible")&&(c+=a(this).width())});c>e?a(b.find(".swatchElement:visible").get().reverse()).each(function(){var b=0,d=!1;a(this).find(".format").hasClass("a-button-selected")?(b=a(this).prev(".swatchElement").width(),d=a(this).prev(".swatchElement").is(":hidden"),
a(this).prev(".swatchElement").hide()):(b=a(this).width(),d=a(this).is(":hidden"),a(this).hide());d||(c-=b);return c>e}):c<e&&b.find(".swatchElement").each(function(){if(a(this).is(":hidden"))return a(this).attr("data-width")<=e-c&&a(this).show(),!1})}var u=0,v=0,t,w=function(a){"undefined"!=typeof a&&(t=new a.ImpressionLogger("dpbxapps","bxapps-atfMarker",!0,!0))};"undefined"!=typeof amznJQ?amznJQ.available("DPClientLogger",function(){w(f.DPClientLogger)}):l.when("DPClientLogger").execute(w);c.declarative("tmm-see-more-editions-click",
["click"],function(b){var e=b.data,d=e.metabindingUrl;if(b.$target.hasClass("a-link-expander")||b.$target.parent().hasClass("a-link-expander")){var e=e.metabindingPlaceHolder,g="#metabinding_row_top_"+e,h="#metabinding_row_bottom_"+e,p="#editionsSeePrompt_"+e,k="#editionsHidePrompt_"+e,q="#editionsIcon_"+e,B="isAjaxComplete_"+e,z="isAjaxInProgress_"+e;b="#tmmSpinnerDiv_"+e;var n=c.state("mediamatrix-state"),e=n["url_"+e].replace(/&amp;/g,"\x26");a("#formats .tmmErrorClass").hide();"1"===n[B]||"1"===
n[z]?m(g,h,p,k,q):(c.ajax(e,{method:"get",success:function(){n[B]="1";c.state("mediamatrix-state",n);m(g,h,p,k,q)},indicator:a(b),error:function(){a($tmmErrorDiv).show();n[z]="0";c.state("mediamatrix-state",n)}}),n[z]="1",c.state("mediamatrix-state",n))}else"#"!==d&&(f.location=d)});if(0<a("#formats \x3e .a-link-expander").length){var d=f.ue;d&&d.count&&d.count("mediaMatrixExpanderPresent",1)}a("#formats \x3e .a-link-expander").click(function(){m("#tmmSwatches","#twister","#showMoreFormatsPrompt",
"#hideMoreFormatsPrompt","#formatsIcon");if(!v){var b=f.ue;b&&b.count&&b.count("mediaMatrixExpanderClicked",1);v=1}t&&a("#twister").is(":visible")&&!u&&(t.logImpression("tmm-show-more-formats-viewed"),u=1)});var d=c.state("mediamatrix-state"),k="1";"undefined"!==typeof d&&"undefined"!==typeof d.showHybridMediaMatrix&&"1"===d.showHybridMediaMatrix?k="0":"undefined"!==typeof d&&"undefined"!==typeof d.isDvdWeblabEnabled&&"1"===d.isDvdWeblabEnabled&&(k="0");"1"===k&&(a("#formats.responsive").each(function(){h(a(this))}),
A(),c.on("resize",A));a("#formats .unselected .format").mouseenter(function(){a(this).find(".a-color-secondary").addClass("a-color-price").removeClass("a-color-secondary")}).mouseleave(function(){a(this).find(".a-color-price").addClass("a-color-secondary").removeClass("a-color-price")});a("#landingItemRentalLink").attr("href","javascript:document.getElementById('rentBuySection').click();")})});l.when("A","jQuery","a-dropdown").execute(function(c,a,m){function h(a){return a?a.replace(/&#0/g,"\x26#"):
undef}function l(a){for(var b=a.getOptions(),b=b?b.size():0,c=1;c<b;c++)a.removeOption(1)}function u(b,c){var e=b.getOption(0),d=e.info()[0];e.remove();a.each(c,function(a,c){b.addOption({text:r[h(c)],value:c,css_class:"dropdownAvailable"},1)});b.addOption(d,0);b.val(d.value)}function v(a){p=a.value;l(q);"-1"!==p&&(t(),u(q,Object.keys(k[h(p)])))}function t(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
e=c.length;return function(d){if("object"!==typeof d&&("function"!==typeof d||null===d))throw new TypeError("Object.keys called on non-object");var g=[],f;for(f in d)a.call(d,f)&&g.push(f);if(b)for(f=0;f<e;f++)a.call(d,c[f])&&g.push(c[f]);return g}}())}function w(a){y=a.value;"-1"!==y&&"-1"!==p&&(f.location=e[k[h(p)][h(y)]])}function d(a){a=a.value;"-1"!==a&&(f.location=e[h(a)])}var k,b=c.state("dcdMetaData");if(b){var e=b.asinToDetailPageURLMap,r=b.truncatedValuesMap,g=b.dimensionKeys,x=g[0],p=-1,
y=-1,q;2===g.length?(k=b.doubleValuesToAsinMap,b=g[1],g=m.getSelect("native_dcd_dropdown_"+x),q=m.getSelect("native_dcd_dropdown_"+b),g.setValue("-1"),q.setValue("-1"),l(q),c.on("a:dropdown:selected:"+x,v),c.on("a:dropdown:selected:"+b,w)):(g=m.getSelect("native_dcd_dropdown_"+x),(m=b.selectedAsin)?g.setValue(m):g.setValue("-1"),c.on("a:dropdown:selected:asin-redirect",d))}})});
/* ******** */
(function(g){var k=window.AmazonUIPageJS||window.P,h=k._namespace||k.attributeErrors,e=h?h("PInfoHardlinesDetailPageAsset",""):k;e.guardFatal?e.guardFatal(g)(e,window):e.execute(function(){g(e,window)})})(function(g,k,h){g.when("A","jQuery","atf").execute(function(e,a,g){function h(){var d=parseInt(a("#byline").width()),b=0;a("#byline .author").each(function(){a(this).is(".notFaded")&&(b+=a(this).outerWidth())});b+=a("#byline .more").outerWidth();if(b>d){var e=a("#byline .author.notFaded").length;
a(a("#byline .author.notFaded").get().reverse()).each(function(c){b>d&&c<e-1&&(c=a(this).width(),a(this).removeClass("notFaded"),a(this).fadeOut(10,function(){a(this).hide()}),b-=c,a("#byline .moreCount").html(a("#byline .author").length-a("#byline .author.notFaded").length),a("#byline .more").addClass("notFaded").fadeIn(10))})}else if(b<d&&a("#byline .author.notFaded").length<a("#byline .author").length){var f=d-b;a("#byline .author").each(function(){if(!a(this).hasClass("notFaded")){var c=a(this).outerWidth();
c<=f?(f-=c,a(this).addClass("notFaded").fadeIn(10),c=a("#byline .author").length-a("#byline .author.notFaded").length,0===c?a("#byline .more").removeClass("notFaded").fadeOut(10):(a("#byline .moreCount").html(c),a("#byline .more").addClass("notFaded").fadeIn(10))):f=0}})}}a("#byline .showMoreLink").click(function(){a("#byline .author").each(function(){a(this).hasClass("notFaded")||a(this).addClass("notFaded").fadeIn(0);a("#byline .more").removeClass("notFaded").fadeOut(0)});return!1});a("#byline .contributorNameID").mouseenter(function(){var d=
a(this).attr("data-asin"),b={},l="isAjaxComplete_"+d,f="isAjaxInProgress_"+d,c=e.state("popoverImage-state");b.entityID=d;"1"!==c[l]&&"1"!==c[f]&&(a.ajax({url:"/gp/product/utility/by-line/book-contributor-details/ajax/author-image.html",data:b,dataType:"html",timeout:1E3,success:function(b){a("#contributorImageContainer"+d).get(0).innerHTML=b;c[l]="1";e.state("popoverImage-state",c)},error:function(){c[f]="0";e.state("popoverImage-state",c)}}),c[f]="1",e.state("popoverImage-state",c))});(function(d){var b=
parseInt(d.width()),e=parseInt(d.find(".more").outerWidth()),f=0;a("#byline .author").each(function(){a(this).is(".notFaded")&&(f+=a(this).outerWidth())});a("#byline .more").attr("data-width",e);var c=b-e;if(c>f)d.find(".author").each(function(){var b=a(this).index();3<=parseInt(b)?(b=a(this).outerWidth(),a(this).attr("data-width",b),b<c?(c-=b,a(this).addClass("notFaded"),a(this).fadeIn("slow")):(c=0,a(this).fadeOut("slow"))):(b=a(this).outerWidth(),a(this).attr("data-width",b),c-=b)});else{var g=
a("#byline .author.notFaded").length;a(a("#byline .author.notFaded").get().reverse()).each(function(b){c<f&&b<g-1&&(b=a(this).outerWidth(),f-=b,a(this).fadeOut("slow").removeClass("notFaded"))})}b=d.find(".author").length-d.find(".author.notFaded").length;0<b&&(d.find(".moreCount").html(b),d.find(".more").fadeIn("slow"),d.find(".more").addClass("notFaded"))})(e.$("#byline"));a(k).resize(function(){h()})});g.when("A","jQuery","atf").execute(function(e,a,g){function h(){var d=parseInt(a("#bylineInfo").width()),
b=0;a("#bylineInfo .author").each(function(){a(this).is(".notFaded")&&(b+=a(this).outerWidth())});b+=a("#bylineInfo .more").outerWidth();if(b>d){var e=a("#bylineInfo .author.notFaded").length;a(a("#bylineInfo .author.notFaded").get().reverse()).each(function(c){b>d&&c<e-1&&(c=a(this).width(),a(this).removeClass("notFaded"),a(this).fadeOut(10,function(){a(this).hide()}),b-=c,a("#bylineInfo .moreCount").html(a("#bylineInfo .author").length-a("#bylineInfo .author.notFaded").length),a("#bylineInfo .more").addClass("notFaded").fadeIn(10))})}else if(b<
d&&a("#bylineInfo .author.notFaded").length<a("#bylineInfo .author").length){var f=d-b;a("#bylineInfo .author").each(function(){if(!a(this).hasClass("notFaded")){var c=a(this).outerWidth();c<=f?(f-=c,a(this).addClass("notFaded").fadeIn(10),c=a("#bylineInfo .author").length-a("#bylineInfo .author.notFaded").length,0===c?a("#bylineInfo .more").removeClass("notFaded").fadeOut(10):(a("#bylineInfo .moreCount").html(c),a("#bylineInfo .more").addClass("notFaded").fadeIn(10))):f=0}})}}a("#bylineInfo .showMoreLink").click(function(){a("#bylineInfo .author").each(function(){a(this).hasClass("notFaded")||
a(this).addClass("notFaded").fadeIn(0);a("#bylineInfo .more").removeClass("notFaded").fadeOut(0)});return!1});a("#bylineInfo .contributorNameID").mouseenter(function(){var d=a(this).attr("data-asin"),b={},g="isAjaxComplete_"+d,f="isAjaxInProgress_"+d,c=e.state("popoverImage-state");b.entityID=d;"1"!==c[g]&&"1"!==c[f]&&(a.ajax({url:"/gp/product/utility/by-line/book-contributor-details/ajax/author-image.html",data:b,dataType:"html",timeout:1E3,success:function(b){a("#contributorImageContainer"+d).get(0).innerHTML=
b;c[g]="1";e.state("popoverImage-state",c)},error:function(){c[f]="0";e.state("popoverImage-state",c)}}),c[f]="1",e.state("popoverImage-state",c))});(function(d){var b=parseInt(d.width()),e=parseInt(d.find(".more").outerWidth()),f=0;a("#bylineInfo .author").each(function(){a(this).is(".notFaded")&&(f+=a(this).outerWidth())});a("#bylineInfo .more").attr("data-width",e);var c=b-e;if(c>f)d.find(".author").each(function(){var b=a(this).index();3<=parseInt(b)?(b=a(this).outerWidth(),a(this).attr("data-width",
b),b<c?(c-=b,a(this).addClass("notFaded"),a(this).fadeIn("slow")):(c=0,a(this).fadeOut("slow"))):(b=a(this).outerWidth(),a(this).attr("data-width",b),c-=b)});else{var g=a("#bylineInfo .author.notFaded").length;a(a("#bylineInfo .author.notFaded").get().reverse()).each(function(b){c<f&&b<g-1&&(b=a(this).outerWidth(),f-=b,a(this).fadeOut("slow").removeClass("notFaded"))})}b=d.find(".author").length-d.find(".author.notFaded").length;0<b&&(d.find(".moreCount").html(b),d.find(".more").fadeIn("slow"),d.find(".more").addClass("notFaded"))})(e.$("#bylineInfo"));
a(k).resize(function(){h()})});g.when("A","jQuery").register("product-description-fix",function(e,a){return{fixTableIssue:function(){a("#productDescription .productDescriptionWrapper table").each(function(){var e=a(this).attr("width");"undefined"!==typeof e?a(this).css("width",e):a(this).css("width","auto")})}}})});
/* ******** */
(function(d){var e=window.AmazonUIPageJS||window.P,h=e._namespace||e.attributeErrors,f=h?h("OffersHardlinesDetailPageAsset",""):e;f.guardFatal?f.guardFatal(d)(f,window):f.execute(function(){d(f,window)})})(function(d,e,h){d.when("A","jQuery","atf").register("accordionBuyBoxJS",function(f,a,h){var g={updateCssClass:function(b){var c=a("#rbbContainer");c.find(".selected .a-icon-radio-active").removeClass("a-icon-radio-active").addClass("a-icon-radio-inactive");c.find(".selected .offer-price").removeClass("a-color-price").addClass("a-color-secondary");
b.parents(".rbbSection").removeClass("unselected").addClass("selected");b.parents(".rbbSection").toggleClass("dp-accordion-active",500);b.find(".a-icon-radio-inactive").removeClass("a-icon-radio-inactive").addClass("a-icon-radio-active");b.find(".offer-price").removeClass("a-color-secondary").addClass("a-color-price");a("#rbbContainer .rbbSection .rbbContent").find(".offer-price").removeClass("a-color-secondary").addClass("a-color-price")},animate:function(b){var c=a("#rbbContainer"),f=b.attr("id"),
d,e;c.find(".rbbSection").each(function(b,c){a(c).find(".rbbHeader")[0].id==f?d=a(c):a(c).hasClass("selected")&&(e=a(c))});e.find(".rbbContent").slideUp(500,function(){e.removeClass("selected").addClass("unselected");e.toggleClass("dp-accordion-active",500)});d.find(".rbbContent").slideDown(500);a.browser.msie&&7==parseInt(a.browser.version,10)&&(d.find(".rbbContent").css("display","inline"),setTimeout(function(){d.find(".rbbContent").css("display","block")},505))},oneClickJS:function(){a("#one-click-button, #one-click-button-ubb").click(function(){var b=
"https://"+e.location.host+a("#addToCart").attr("action");a("#addToCart").attr("action",b);return!0})},usedBuyBoxJS:function(){a("#one-click-button-ubb, #usedbuyBox #add-to-cart-button-ubb").click(function(){var b=a("#addToCart"),c=b.attr("action").replace("ref\x3ddp_start-bbf_1_glance","ref\x3ddp_start-ubbf_1_glance");b.attr("action",c);return!0})},initialize:function(){a(".rbbHeaderLink").attr("href","javascript:void(0);");a("#rbbContainer .rbbSection.unselected .dp-accordion-inner").hide();a("#rbbContainer .rbbSection .rbbHeader").click(function(b){a(b.target);
b=a(this);var c=b.hasClass("rbbHeader")?b:b.parents(".rbbHeader");if(c.parents(".rbbSection").hasClass("selected"))return!1;b=a("#rbbContainer .rbbSection.selected .rbbHeader").attr("id");var d=c.attr("id");g.updateCssClass(c);a("#abbWrapper [id^\x3dmbb-offeringID-]").each(function(){this.checked=!1});c=a(this);g.animate(c);f.trigger("buybox:accordion:changed",d,b);return!0});g.oneClickJS();g.usedBuyBoxJS()}};d.when("a-popover").execute("used-buy-box-condition-popover",function(b){var c=a("#usedItemConditionInfoLink"),
d=b.create(c,{width:250,position:"triggerBottom",activate:f.capabilities.touch?"onmousemove":"onclick",closeButton:!1,popoverLabel:"Used condition details",name:"usedItemConditionDetailsPopover",dataStrategy:"preload"});c.mouseleave(function(){d.hide()})});return g})});
/* ******** */
(function(a){var c=window.AmazonUIPageJS||window.P,d=c._namespace||c.attributeErrors,b=d?d("DetailPagePromotionalBundleAssets",""):c;b.guardFatal?b.guardFatal(a)(b,window):b.execute(function(){a(b,window)})})(function(a,c,d){a.when("A","ready").execute("kbpMobileExpander",function(b){var a=b.$;a(".pb-bundle-section-expander").click(function(b){a(".pb-bundle-mobile-box").removeClass("aok-hidden");a(".pb-bundle-expander-box").addClass("aok-hidden")})})});
/* ******** */
