function shuffleImages () {
var imgs = $('.hmpg-images, .hmpg-available-images').find('img');
var newImgContainer = $('
');
var newImgs = [];
var newImgKeys = {};
var i = 0;
while (newImgs.length < 3 && i < 100) {
i++; // sanity check counter
var N = newImgs.length;
var M = Math.floor(Math.random() * imgs.length);
var sSrc = $(imgs.get(M)).attr('src');
if (!(sSrc in newImgKeys)) {
newImgs[N] = $('
');
newImgs[N].attr({src: sSrc, height: '160px', width: 'auto'});
newImgContainer.append(newImgs[N]);
}
newImgKeys[sSrc] = true;
} /* while */
$('.hmpg-images').find('img').hide({
duration: 0 /*ms*/,
done: function () {
newImgContainer.find('img').each(function () {
$('.hmpg-images').append($(this));
});
}
});
}
jQuery(document).ready(function () {
shuffleImages();
} );
/*
FILE ARCHIVED ON 01:33:31 Sep 03, 2018 AND RETRIEVED FROM THE
INTERNET ARCHIVE ON 18:54:14 Apr 27, 2020.
JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
SECTION 108(a)(3)).
*/
/*
playback timings (ms):
RedisCDXSource: 180.219
LoadShardBlock: 365.642 (3)
CDXLines.iter: 20.66 (3)
esindex: 0.024
PetaboxLoader3.resolve: 241.616 (3)
captures_list: 572.329
exclusion.robots.policy: 0.374
load_resource: 261.874
PetaboxLoader3.datanode: 324.805 (5)
exclusion.robots: 0.414
*/