jQuery(document).ready(function(){
	jQuery(function(){
		jQuery.ajax({
			type: "GET",
			url: "/images/home/sliders/PhotoGallery.xml", // set to path to BC photo gallery
			dataType: "xml",
			success: function(xml) {
				var location = '/images/home/sliders/'; // set to path to BC photo gallery
				jQuery(xml).find('img').each(function() {
					// step through xml file and add image info into the web page
					var myurl = jQuery(this).attr('src');
					var mystuff = jQuery(this).attr('alt').split("^");
					var myinfo = "";
					if ( mystuff.hasOwnProperty("0") ) { myinfo = myinfo + ' title="' + mystuff[0] + '"'; }
					if ( mystuff.hasOwnProperty("1") ) { myinfo = myinfo + ' alt="' + mystuff[1] + '"'; }
					if ( mystuff.hasOwnProperty("2") ) { myinfo = myinfo + ' longdesc="' + mystuff[2] + '"'; }
					var myimg = '<img class="bc-gallery-image" src="'+location+''+myurl+'" '+myinfo+ '" />';
					jQuery('#gallery1').append(myimg); // set to your div containing galleria
					});
					// load Galleria slideshow theme and start the show
					Galleria.loadTheme('/js/galleries/galleria/themes/bc-photogallery/galleria.bc-photogallery.js'); // set to your theme
					jQuery('#gallery1').galleria({ // set to your div containing galleria
						height: 410, // set to height of slide + height of thumbnails (default 50px)
						image_crop: true,
						carousel: true,
						carousel_speed: 5000,
						autoplay: true,
						thumbnails: false,
						showInfo: true,
						transition: 'fade',
						transition_speed: 600
						});
			}
		});
	});
});
