if ($slideshow.length == 0) return false;
+ var openIndex = parseInt($slideshow.attr('data-open-index'));
+ if (isNaN(openIndex)) {
+ openIndex = 1;
+ }
+ openIndex--;
+
// Dynamically add thumbnails from full sized images
// Images have to load anyway so we can reuse full images for thumbnails
slideshowParams.asNasFor = '#' + thumbnailsID; // Synced with thumbnails slider
}
// Main image slider
- $slideshow.slick(slideshowParams);
+ var mainSlideshow = $slideshow.slick(slideshowParams);
+ if (openIndex > 0) {
+ $slideshow.slick('slickGoTo', openIndex, true);
+ }
if (showThumbnails) {
// Thumbnails slider