var slideshow, slide_int_id, slide_current, slide_total;

slide_total = 15;
slide_current = 1;
var imageList = [
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/community-center-exterior-1-08.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/community-center-exterior-1-08.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/comm-ctr-entry.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/comm-ctr-entry.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/comm-ctr-kitchen.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/comm-ctr-kitchen.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/comm-ctr-west-wall.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/comm-ctr-west-wall.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/comm-ctr-north-wall.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/comm-ctr-north-wall.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/center-window.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/center-window.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/covered-side-entry-to-comm-ctr.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/covered-side-entry-to-comm-ctr.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/cctr-wedding-circle-of-chairs.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/cctr-wedding-circle-of-chairs.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/irshores-cctr-fm-lawn-web.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/irshores-cctr-fm-lawn-web.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/tent-for-community-center-event-3-10-ws.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/tent-for-community-center-event-3-10-ws.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/caterer-has-screen-to-shield-kitchen-view-ws.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/caterer-has-screen-to-shield-kitchen-view-ws.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/wooden-screens-provided-by-caterer.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/wooden-screens-provided-by-caterer.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/5775.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/5775.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/5776.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/5776.jpg'
    },
    {
        img: 'http://www.IRShores.com/minigallery_23651/thumb/5777.jpg',
        link: 'http://www.IRShores.com/minigallery_23651/5777.jpg'
    },
];

var captionList = [
    {
        num: '0',
        cap: '&nbsp;'
    },
    {
        num: '1',
        cap: '&nbsp;'
    },
    {
        num: '2',
        cap: '&nbsp;'
    },
    {
        num: '3',
        cap: '&nbsp;'
    },
    {
        num: '4',
        cap: '&nbsp;'
    },
    {
        num: '5',
        cap: '&nbsp;'
    },
    {
        num: '6',
        cap: '&nbsp;'
    },
    {
        num: '7',
        cap: '&nbsp;'
    },
    {
        num: '8',
        cap: '&nbsp;'
    },
    {
        num: '9',
        cap: 'Tent rented for winter event'
    },
    {
        num: '10',
        cap: 'Caterer provided screen to separate kitchen'
    },
    {
        num: '11',
        cap: 'Another way to screen kitchen provided by caterer'
    },
    {
        num: '12',
        cap: 'Outdoor wedding ceremony in April'
    },
    {
        num: '13',
        cap: 'College Decor for Graduation Party'
    },
    {
        num: '14',
        cap: 'Small formal gathering (charter high school prom)'
    },
];

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);
    }
}


