var slideshow, slide_int_id, slide_current, slide_total;

slide_total = 5;
slide_current = 1;
var imageList = [
    {
        img: 'http://www.TheJungleClub.com/minigallery_29359/thumb/6974.jpg',
        link: 'http://www.TheJungleClub.com/minigallery_29359/6974.jpg'
    },
    {
        img: 'http://www.TheJungleClub.com/minigallery_29359/thumb/6975.jpg',
        link: 'http://www.TheJungleClub.com/minigallery_29359/6975.jpg'
    },
    {
        img: 'http://www.TheJungleClub.com/minigallery_29359/thumb/6976.jpg',
        link: 'http://www.TheJungleClub.com/minigallery_29359/6976.jpg'
    },
    {
        img: 'http://www.TheJungleClub.com/minigallery_29359/thumb/6977.jpg',
        link: 'http://www.TheJungleClub.com/minigallery_29359/6977.jpg'
    },
    {
        img: 'http://www.TheJungleClub.com/minigallery_29359/thumb/6978.jpg',
        link: 'http://www.TheJungleClub.com/minigallery_29359/6978.jpg'
    },
];

var captionList = [
    {
        num: '0',
        cap: 'Roger Travis crosses the finish line at the 20th Annual Jungle Club 5K Run'
    },
    {
        num: '1',
        cap: 'The Lions Club served up an awesome pancake breakfast after the race!'
    },
    {
        num: '2',
        cap: 'Florence Lundy beat her time from last year by 12 seconds!'
    },
    {
        num: '3',
        cap: 'Elizabeth Knutson and Shirley Granims relax after the race'
    },
    {
        num: '4',
        cap: 'Kids race participants Zoe Kleckner, Grace Levelston, and Stephanie Sullivan'
    },
];

function startLytebox(title, url) {
      var anchor = this.document.createElement('a');
      anchor.setAttribute('title', title);
      anchor.setAttribute('href', url);
      anchor.setAttribute('rel', 'lytebox');
      myLytebox.start(anchor, false, false);
      return false;
}

function SlideShow_event(e, arg){
	e = e || window.event;
	switch(e){
		case 'ready':
			for(var i = 0, l = imageList.length; i < l; i++){
				slideshow.addImage(imageList[i].img, imageList[i].link);
			}
			break;

		case 'image_change':
			var imagenumber = arg+1;
			document.getElementById('mininav').innerHTML='Picture '+imagenumber+' of '+slide_total
			document.getElementById('minicap').innerHTML = captionList[arg].cap;
			break;

		case 'image_click':
			startLytebox(captionList[arg].cap,imageList[arg].link);			break;

		default:
			alert(e);
    }
}


