As you are already using PHP, you could use a PHP include as follows.
(1) Change the filename of 'elaimet.xml' to 'elaimet.php' and change its contents to the following:
<?php header('Content-Type: application/xml'); ?>
<juiceboxgallery
useFlickr="true"
flickrShowTitle="false"
flickrShowDescription="true"
flickrImageSize="ORIGINAL"
flickrImageCount="200"
flickrUserId=""
flickrSetId="721576XXXXXXXX"
flickrSort="date-taken-desc"
<?php include 'extra.php'; ?>
/>
(2) Put your common configuration options into a file named 'extra.php' (just as below):
backgroundColor="rgba(248,248,248,1)"
buttonBarBackColor="rgba(0,0,0,.4)"
buttonBarIconHoverColor="rgba(255,0,0,1)"
buttonBarPosition="TOP"
captionBackColor="rgba(248,248,248,.8)"
captionHAlign="LEFT"
captionPosition="BELOW_IMAGE"
displayTime="4"
enableAutoPlay="true"
enableDirectLinks="true"
frameWidth="1"
galleryFontFace="Arial,Helvetica,sans-serif;"
galleryHeight="450"
galleryTitle=""
galleryTitlePosition="NONE"
galleryWidth="500"
imageFrameColor="rgba(0,0,0,.4)"
imageNavPadding="30"
imageNavPosition="IMAGE"
imageShadowBlur="0"
imageShadowColor="rgba(0,0,0,0)"
imageTransitionTime="0.2"
imageTransitionType="CROSS_FADE"
importCaption="IPTC"
importTitle="IPTC"
languageList="Näytä pistenavigointi|Piilota pistenavigointi|Suurenna kokoruutuutilaan|Sulje kokoruututila|Avaa kuva uudessa ikkunassa|Kuvat|Seuraava kuva|Edellinen kuva|Soita musiikki|Pysäytä musiikki|Näytä tiedot|Piilota tiedot|Aloita näytös|Pysäytä näytös|Näytös päällä|Näytös suljettu|Mene takaisin|Osta tämä kuva|Jaa: Facebook|Jaa: Twitter|Jaa: Google+|Jaa: Pinterest|Jaa: Tumblr|/"
maxCaptionHeight="30"
navButtonBackColor="rgba(0,0,0,0.4)"
navButtonIconHoverColor="rgba(255,0,0,1)"
showAutoPlayButton="true"
showImageNav="false"
showImageOverlay="ALWAYS"
showNavButtons="true"
showOpenButton="false"
showPagingText="False"
showSmallThumbsOnLoad="true"
showThumbsButton="false"
showThumbsOnLoad="true"
splashButtonText="Avaa galleria"
textColor="rgba(0,0,0,1)"
textShadowColor="rgba(0,0,0,0)"
thumbFrameColor="rgba(255,0,0,0.8)"
thumbHeight="60"
thumbHoverFrameWidth="1"
thumbSelectedFrameWidth="2"
thumbShadowColor="rgba(0,0,0,0)"
thumbsVAlign="BOTTOM"
thumbWidth="60"
topAreaHeight="0"
topBackColor="rgba(255,255,255,0)"
useFullscreenExpand="true"
(3) Use the following embedding code (changing the file extension of the configUrl):
<!--START JUICEBOX EMBED-->
<script src="galleriat/jbcore/juicebox.js" type="text/javascript"></script>
<script>
new juicebox({
configUrl: "galleriat/elaimet.php",
containerId: "juicebox-container",
galleryWidth: "500",
galleryHeight: "450",
backgroundColor: "rgba(248,248,248,1)"
});
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->