/*
    This is a datastructure to store the information about a background image.
*/
var BackgroundImageDetails = function(url, caption) {
    this.url = url;
    this.caption = caption;
}

var BackgroundImageDetailsList = Class.create();
Object.extend(BackgroundImageDetailsList.prototype, {
    initialize: function(urlPrefix) {
        this.details = new Array();
        this.urlPrefix = urlPrefix;
    },

    addImage: function(imageName, caption) {
        this.details.push(new BackgroundImageDetails(this.urlPrefix + imageName, caption));
    },

    get: function(index) {
        return this.details[index];
    },

    each: function(func) {
        this.details.each(func);
    },

    getLength: function() {
        return this.details.length;
    }
});


