var PointsHome = {
    init: function() {
        this.setAccordion();
    },
    setAccordion: function () {
        var myObj = this;
        
        $('#addedInfo dt .toggleInfo').each(function(index) {
            $(this).click(function() {
                var myParent = $(this.parentNode);
                myObj.resetAll();
                myParent.hide();
                myParent.next().show();
                myObj.resetFooter();
                return false;
            });
        });
        
        $('#addedInfo dd .toggleInfo').click(function() {
            myObj.resetAll();
            myObj.resetFooter();
            return false;
        });
    },
    resetFooter: function() {
        if (PointsGlobal) {
            PointsGlobal.resetContainerHeight();
            PointsGlobal.positionFooter();
        }
    },
    resetAll: function() {
        $('#addedInfo dd').hide();
        $('#addedInfo dt').show();
    }
};

$(function () {
    PointsHome.init();
});

