function getPhotoURL(){
    pathArray = window.location.pathname.split('/');
    newPathname = "";
    if (pathArray.length > 0) {
        for (i = 0; i < pathArray.length - 2; i++) {
            newPathname += "/";
            newPathname += pathArray[i];
        }
    }
    photoURL = window.location.protocol + "//" + window.location.host + newPathname + "/wp-content/themes/friendsofchildren/images/banner/photo";
    return photoURL;
}

photoURL = getPhotoURL();
websiteURL = window.location.protocol + "//" + window.location.host;
ext = ".png";
var mygallery = new fadeSlideShow({
    wrapperid: "banner", //ID of blank DIV on page to house Slideshow
    dimensions: [402, 247], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [[photoURL + "1" + ext, websiteURL, ""], [photoURL + "2" + ext, websiteURL, ""], [photoURL + "3" + ext, websiteURL, ""], [photoURL + "4" + ext, websiteURL, ""], [photoURL + "5" + ext, websiteURL, ""], [photoURL + "6" + ext, websiteURL, ""], [photoURL + "7" + ext, websiteURL, ""], [photoURL + "8" + ext, websiteURL, ""], [photoURL + "9" + ext, websiteURL, ""]//no trailing comma after very last image element!
]    ,
    displaymode: {
        type: 'auto',
        pause: 5000,
        cycles: 0,
        wraparound: true
    },
    persist: true, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
});

