var slideshow, slide_int_id, slide_current, slide_total;

slide_total = 9;
slide_current = 1;
var imageList = [
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/cultural-council1.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/cultural-council1.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/cultural-council2.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/cultural-council2.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/fredshanholtzer.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/fredshanholtzer.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/iamproudtobeme.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/iamproudtobeme.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/kdonahey.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/kdonahey.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/mrsteve.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/mrsteve.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/rosaryhome.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/rosaryhome.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/sweeneyholidaydogart.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/sweeneyholidaydogart.jpg'
    },
    {
        img: 'http://www.nvacs.com/minigallery_27669/thumb/yds.jpg',
        link: 'http://www.nvacs.com/minigallery_27669/yds.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;'
    },
];

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);
    }
}


