var slideshow, slide_int_id, slide_current, slide_total;

slide_total = 4;
slide_current = 1;
var imageList = [
    {
        img: 'http://www.IRShores.com/minigallery_19161/thumb/chambers-entry-from-courtyard-9-7-07-ws-la.jpg',
        link: 'http://www.IRShores.com/minigallery_19161/chambers-entry-from-courtyard-9-7-07-ws-la.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_19161/thumb/chambers-se-corner.jpg',
        link: 'http://www.IRShores.com/minigallery_19161/chambers-se-corner.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_19161/thumb/council-chambers-ws-la.jpg',
        link: 'http://www.IRShores.com/minigallery_19161/council-chambers-ws-la.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_19161/thumb/4210.jpg',
        link: 'http://www.IRShores.com/minigallery_19161/4210.jpg'
    },
];

var captionList = [
    {
        num: '0',
        cap: 'Courtyard Entrance'
    },
    {
        num: '1',
        cap: 'Council Chambers Interior'
    },
    {
        num: '2',
        cap: 'Indian River Shores Council Chambers Interior'
    },
    {
        num: '3',
        cap: 'Council Chambers'
    },
];

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);
    }
}


