Accordion Callback Help

Accordion Callback Help

What I'm trying to do is when you click on an accordion header is to add a CSS class to that element (ui-accordion-header) and the accordion content section (ui-accordion-content). When I click on another accordion header I want to add classes to that header and content area and remove them from the other ones. I tried the following, but it doesn't work. It also doesn't approach doing the second half of my issue.
 
  1.     $("#accordion").accordion({
            fillSpace: true,
            change: function(event, ui) {
                accordionclass();
            }
        });

        jQuery.fn.accordionclass = function() {
            (".ui-accordion-header").addClass("headerover");
            (".ui-accordion-content").addClass("contentover");
        };









Any help is appreciated. Let me know if clarification is needed.