+function replaceImagesWithErrorWithBrokenImages() {
+ var replaceImage = function(imageElement, sourcePath) {
+ $(imageElement).attr("src", sourcePath)
+ .attr("width", "160")
+ .attr("height", "120")
+ .attr("style", "position: absolute; top: 0px; left: 0px; opacity: .25");
+ };
+
+ $(".image-in-album .image img").error(function () {
+ replaceImage(this, "images/broken-image.png");
+ });
+ $(".album .image img").error(function () {
+ replaceImage(this, "images/broken-album.png");
+ });
+}
+