$(document).ready(function(){
			
			var col12Width = $(".content .twelvecol").width();
			$("body").find("#galleria").width(col12Width);
			
			$(window).resize(function() {
				var col12Width = $(".content .twelvecol").width();
				$("body").find("#galleria").width(col12Width);
				$("body").find(".galleria-container").width(col12Width);
				$("body").find(".galleria-image").width(col12Width);
			});

	 	 $(function () {
				 $.ajax({
					  type: "GET",
					  url: "/img/slider/PhotoGallery.xml", // replace with absolute URL of your gallery's xml file
					  dataType: "xml",
					  success: function(xml) {
						  $(xml).find('img').each(function() {
							 var location = '/img/slider/'; // replace with absolute path to the directory that holds your images
							 var url = $(this).attr('src');
							 var alt = $(this).attr('alt');
							  $('<img src="'+location+''+url+'" alt="'+alt+'"/>').appendTo('#galleria');
							  
						  });
						  
						 // Galleria.loadTheme('/js/src/themes/classic/galleria.classic.js');

						  $('#galleria').galleria({
								image_crop: false, // crop all images to fit
								thumb_crop: false, // crop all thumbnails to fit
								show_counter: false,
								show_imagenav: false,
								thumbnails:false,
								transition:'fade',
								image_margin: 2,
								autoplay:3000,
								clicknext: true, // crossfade photos
								extend: function() {
						
									this.bind(Galleria.IMAGE, function(e) {
							
										$('.caption').html(this.$('info-description').html());
										$('.caption').contents().filter(function() {
										  return this.nodeType == 3;
										})
										  .wrap('<p></p>')
										.end()
										.filter('br')
										  .remove();
										  
										$('.caption p:first-child').addClass("image-title");
										$(".caption").fadeIn();
							
									})
								}
					
					
							});
							//parseImg();	
						  
					  }
	  
				  });
	
			  })
	
		
	});
	                   
	



// JavaScript Document
