// Requires: jquery.js, jquery.lightbox.js, jquery.lightbox.css
// Markup: anchor container needs class 'inpage' (see snippet);
// 3 files for each image: pic.jpg, pic-small.jpg, pic.html
// place all 3 files in 'images' folder

var LightBoxHere =
{
	init: function()
	{
		// replace .html with .jpg on anchors
		var anchors = [];
		anchors = $(".inpage a");
		
		for (var i = 0, ii = anchors.length; i < ii; i++)
		{
			var oldHref = anchors[i].href;
			var newHref = oldHref.replace(".html", ".jpg");
			anchors[i].href = newHref;
		}
		
		
		var newWin = $(".inpage a").lightBox();
	}
};

LightBoxHere.init();
