diff --git a/src/main/webapp/WEB-INF/velocity/photo.vm b/src/main/webapp/WEB-INF/velocity/photo.vm index 6d4ac24..5c96523 100644 --- a/src/main/webapp/WEB-INF/velocity/photo.vm +++ b/src/main/webapp/WEB-INF/velocity/photo.vm @@ -81,7 +81,7 @@ $(document).ready(function() { return captionElement.innerHTML; } var selectedImg = window.location.search; - var selectedPos; + var selectedPos = undefined; if (/^\?focus=/.test(selectedImg)) { selectedImg = selectedImg.substring('?focus='.length); $("a.ss").each(function(index) { @@ -98,7 +98,7 @@ $(document).ready(function() { 'easingOut' : 'easeOutQuad', 'titleFormat' : formatTitle }); - if (selectedPos) { + if (selectedPos !== undefined) { $(gallery[selectedPos]).trigger('click'); } })