@@ -125,7 +128,8 @@
TB_WIDTH = imageWidth + 30;
TB_HEIGHT = imageHeight + 60;
- $("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
+ var imageAnchor = TB_NextHTML === "" ? "<a href='' id='TB_ImageOff' title='Close'>" : "<a href='' id='TB_imageNext' title='Next'>";
+ $("#TB_window").append(imageAnchor+"<img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
$("#TB_closeWindowButton").click(tb_remove);
@@ -148,6 +152,7 @@
return false;
}
$("#TB_next").click(goNext);
+ $("#TB_imageNext").click(goNext);