// Load the classic theme

	Galleria.loadTheme('js/galleria/themes/classic/galleria.classic.js');


// Initialize Galleria

var act_pg = '#welcome';

var init_gal = function(gal_div) {
	$(gal_div).galleria({
		clicknext: true,
		debug: false,
		height: '670px',
		image_crop: true,
		showImagenav: false,
		transition: 'fade',
		transition_speed: 200
/*		carousel_follow: false,

/*		// Extend to use custom addPan() on thumnail carousel
		extend: function(options) {
			// Galleria.log(this) // the gallery instance
			// Galleria.log(options) // the gallery options

			this.bind(Galleria.IMAGE, function(e) {
				this.addPan(this.get('thumbnails'));
				this.unbind(Galleria.IMAGE);
			});
		}
*/
	});
}

var show_pg = function(pg) {
	if(act_pg == '#welcome') $('#logo').show(600);
	if(act_pg == '#video_reel') $('#video_reel').html('&nbsp;');
	$(act_pg).hide();
	if(!$(pg).children('.galleria-container').length && $(pg).children('.gal_list').length) {
		$(pg).show();
		init_gal(pg);
	} else if(pg == '#video_reel') {
		$('#video_reel').html(unescape('%3Ciframe%20width%3D%22900%22%20height%3D%22600%22%20frameborder%3D%220%22%20src%3D%22http%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F26648463%3Ftitle%3D0%26amp%3Bbyline%3D0%26amp%3Bportrait%3D0%26amp%3Bcolor%3D91CDEA%26amp%3Bautoplay%3D1%22%3E%3C%2Fiframe%3E'));
		$('#video_reel').fadeIn(200);
	} else {
		$(pg).fadeIn(200);
	}
	act_pg = pg;
}
