brand.customerService = {}

brand.customerService.faq = {
    activeId: null,
    
    init: function() {
        // get drop down                
        var menu = $("faq-questions");
        var self = this;
        self.showAnswer(menu.value);
        menu.onchange = function() {
            self.showAnswer(menu.value);
        }
    },
    showAnswer: function(questionId) {
        var activeNode = $(this.activeId);
        if (activeNode) {
            activeNode.style.display = "none";
        }
        var answerNode = $(questionId);
        if (answerNode) {
            answerNode.style.display = "block";
        }
        this.activeId = questionId;
    }
}