/*
 * Copyright (c) 2010 Amazon.com, Inc. All rights reserved.
 */
var KindleReader;if(KindleReader===undefined){KindleReader=function(){var m="1.0.11.053.093655";var d=window.location.protocol+"//kindleweb.s3.amazonaws.com/app/";var a="kindleReaderFullScreen";var o="kindleReaderNormal";var h;var k;var e;var b;var j;function l(u,s){var w="kindleReaderIFrame"+new Date().getTime();var v="display: block;position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 9999;margin: 0;padding: 0;border: 0;background: inherit;";var q="overflow: hidden;border: 1px solid #383838;";if(u.width.toString().indexOf("%")===-1){q+="width: "+u.width+"px;"}else{q+="width: "+u.width+";"}if(u.height.toString().indexOf("%")===-1){q+="height: "+u.height+"px;"}else{q+="height: "+u.height+";"}var t=document.createElement("style");t.type="text/css";t.id="kindleReaderStylesheet";document.getElementsByTagName("head")[0].appendChild(t);if(t.styleSheet&&t.styleSheet.addRule){t.styleSheet.addRule("."+a,v);t.styleSheet.addRule("."+o,q)}else{if(t.sheet&&t.sheet.insertRule){t.sheet.insertRule("."+a+"{"+v+"}",0);t.sheet.insertRule("."+o+"{"+q+"}",0)}}k=document.createElement("iframe");var r=d+s+"/KindleReaderApp.html?asin="+u.asin;if(u.assoctag){r+="&assoctag="+u.assoctag}if(u.containerID){r+="&containerID="+u.containerID}if(u.asinPrice){r+="&asinPrice="+u.asinPrice}r+="&tophostname="+location.hostname;r+="&iframeName="+w;r+="&dp="+n();k.setAttribute("name","kindleReaderIFrame");k.setAttribute("id","kindleReaderIFrame");k.setAttribute("className",o);k.setAttribute("class",o);k.setAttribute("src",r);var p;if(u.containerID){p=document.getElementById(u.containerID)}else{p=document.getElementsByTagName("body")[0]}p.appendChild(k);if(window.addEventListener){window.removeEventListener("message",g,false);window.addEventListener("message",g,false)}else{if(window.attachEvent){window.detachEvent("onmessage",g);window.attachEvent("onmessage",g)}}if(!h){h={}}h[w]={iframeNode:k,parentNode:p,fullScreenFunction:u.goFullScreen};k.contentWindow.focus()}function n(){var p=[];p[0]="http://www.amazon.com/";p[1]="http://pre-prod.amazon.com/";p[2]="http://kindleweb.s3.amazonaws.com/";for(i=0;i<p.length;i++){if(p[i]===location.href.substr(0,p[i].length)){return 1}}return 0}function c(){return(/MSIE/.test(navigator.userAgent)&&navigator.platform==="Win32")}function g(v){var u=document.getElementsByTagName("html")[0];var r=document.getElementsByTagName("body")[0];var p=v.data;var q=p.substring(0,p.indexOf(","));var t=p.substring(p.indexOf(",")+1);var s=h[t];if(s){k=s.iframeNode}if(q==="fullScreenOff"){k.setAttribute("className",o);k.setAttribute("class",o);if(c()){s.parentNode.appendChild(k);u.style.overflow=e||"auto"}else{r.style.overflow=b||"auto"}if(j){window.scroll(0,j)}if(s&&s.fullScreenFunction){s.fullScreenFunction(false)}}else{if(q==="fullScreenOn"){k.setAttribute("className",a);k.setAttribute("class",a);b=r.style.overflow;e=u.style.overflow;if(typeof(window.pageYOffset)==="number"){j=window.pageYOffset}else{if(document.body&&document.body.scrollTop){j=document.body.scrollTop}else{if(document.documentElement&&document.documentElement.scrollTop){j=document.documentElement.scrollTop}}}if(c()){r.appendChild(k);u.style.overflow="hidden"}else{r.style.overflow="hidden"}window.scroll(0,0);if(s&&s.fullScreenFunction){s.fullScreenFunction(true)}}}}function f(q){var p;if(q.version){p=q.version}else{p=m}l(q,p)}return{LoadSample:function(p){f(p)}}}()}if(typeof amznJQ!=="undefined"){amznJQ.declareAvailable("cascade")};
