function load_gallery(){
	
	var newWidth = 940;
	
	if($(window).width() > 480 && $(window).width() < 940){
		newWidth = $(window).width()-15;
	}
	else if($(window).width() < 480){
		newWidth = $(window).width()-10;
	}
	
	$('#gallery').galleria({
		width: newWidth,
		height: 400,
		autoplay: 5000,
		imageCrop: true,
		showCounter: false,
		pauseOnInteraction: false
	});
	
	$('#gallery').css('visibility', 'visible');
}

$(document).ready(function(){
	load_gallery();
});

