function loadSlideshow() {
	
	//get next slide
	var next_slide = nextSlide(current_slide);

	//get next alt tag
	var next_alt = nextAlt(current_slide);

	//load next slide
	if (current_s==1) {
		$("#s2").html('<img src="images/slideshow/' + next_slide + '" alt="' + next_alt + '">');	
		$("#s1").fadeOut(700);
		current_s = 2;
	}
	else {
		$("#s1").html('<img src="images/slideshow/' + next_slide + '" alt="' + next_alt + '">');	
		$("#s1").fadeIn(700);
		current_s = 1;
	}
	
	current_slide = nextSlideNumber(current_slide);
	
}

function countSlides() {
	var count = arr_files.length;
	return count;
}

function nextSlide(slide) {
	var count = (countSlides()-1);
	var next = (slide+1);
	if (next>count) {
		next=0;	
	}
	next_slide = arr_files[next];
	return next_slide;
}

function nextSlideNumber(number) {
	var count = (countSlides()-1);
	var next = (number+1);
	if (next>count) {
		next=0;	
	}
	return next;
}

function nextAlt(slide) {
	var count = (countSlides()-1);
	var next = (slide+1);
	if (next>count) {
		next=0;	
	}
	next_alt = arr_alts[next];
	return next_alt;	
}

/* PHOTO GALLERIES */
function loadPhoto(file,gallery) {
	//$("div#photo_current").load("/fol_coachella/images/galleries/" + gallery + "/" + file);
	$("div#photo_current").load("includes/photo.asp?photo=" + file + "&gallery=" + gallery);
}

function loadGallery(gallery) {
	$("div#photos").load("includes/gallery.asp?g=" + gallery);
}
