A few minor changes: Tweaking amazon image js to try to fix spotty behavior (not...
[koha.git] / koha-tmpl / opac-tmpl / prog / en / js / amazonimages.js
1 // http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
2 function verify_images() {
3         $("img").each(function(i){
4                if ((this.src.indexOf('images.amazon.com') >= 0) || (this.src.indexOf('g-images.amazon.com') >=0)) {
5             w = this.width;
6             h = this.height;
7             if ((w == 1) || (h == 1)) {
8                 this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
9             } else if ((this.complete != null) && (!this.complete)) {
10                 this.src = 'http://g-images.amazon.com/images/G/01/x-site/icons/no-img-sm.gif';
11             }
12         }
13                 });
14                 }