I can't claim too much familiarity with Galleria, but I have used the JS function below to grab query string variable values.
function parseURLParams(name, locat) {
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(locat);
if (results) {
return results[1] || "";
} else {
return "";
}
}
So if you include the above function in your project, you could potentially set up your code like so:
Galleria.run('#galleria', { facebook: 'album:' + parseURLParams("albumid", window.location.href), width: 745, height: 550, lightbox: true});
Hope it helps!