﻿$(function() {
    var Class;
    registerNS("ChristmasImprints.JS");
    Class = ChristmasImprints.JS.CardManager = function() {
        // Class entry point. Fired when instantiated.
        this.initialise();
    }

    function initialiseStatic() {
        // Initialise any static variables here...
    }

    Class.prototype = {

        // Initialise any member variables here...
        initialise: function() {
            this.cardDic = {};
        },

        addCard: function(id, title, size, description, img) {
            if (typeof (this.cardDic[id]) == "undefined") {
                this.cardDic[id] = {id:id, title:title, size:size, description:description, img:img };
            }
        },
        
        removeCard: function(id) {
            delete this.cardDic[id];
        },
        
        getCard: function(id) {
            return this.cardDic[id];
        }
    };
    initialiseStatic();
});
