Merge remote branch 'kc/master' into new/enh/bug_5917
[koha.git] / koha-tt / 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) || (this.src.indexOf('syndetics.com') >=0) ) { 
5             w = this.width;
6             h = this.height;
7             if ((w == 1) || (h == 1)) {
8                                 $(this).parent().html("<span class=\"no-image\">"+NO_AMAZON_IMAGE+"</span>");
9             } else if ((this.complete != null) && (!this.complete)) {
10                                 $(this).parent().html("<span class=\"no-image\">"+NO_AMAZON_IMAGE+"</span>");
11             }
12         }
13                 });
14                 }