function galleria_init(){
		Galleria.loadTheme('http://andy.untersteggaber.com/wp-content/themes/andy4/scripts/galleria_themes/own/galleria.own.js');
		var api_key = '0f55a727c4788763fbe29d50749a39ab';
		var flickr = new Galleria.Flickr(api_key);
}

function singleGallery(){
		    // run galleria and add some options
		    $('#galleria').galleria({
		        image_crop: false, // crop all images to fit
		        thumb_crop: true, // crop all thumbnails to fit
		        transition: 'fade', // crossfade photos
		        transition_speed: 300, // slow down the crossfade
		        preload: 10,
						data_config: function(img) {
            // will extract and return image captions from the source:
            	return  {
                title: $(img).parent().next('strong').html(),
                description: $(img).parent().next('strong').next().html()
            	};
        		},
						extend: function() {
                var gallery = this; // save the scope
                $('#g_fullscreen').click(function() {
                    gallery.enterFullscreen();
                });
		        }
		    });
}

jQuery(document).ready(function(){
	galleria_init();
	singleGallery();
});
