def add_subheader_behaviors(self, subheader_top):
    subheader_top.set_unique_id()
    subheader_top.add_smart_style('spt_tab_subheader_item', 'pointer', 'cursor')
    subheader_top.add_relay_behavior({'type': 'click', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            var element_name = bvr.src_el.getAttribute("spt_element_name");\n            var title = bvr.src_el.getAttribute("spt_title");\n            var display_class = bvr.src_el.getAttribute("spt_class_name");\n            var kwargs_str = bvr.src_el.getAttribute("spt_kwargs");\n\n            if (!kwargs_str) {\n                kwargs = {}\n            }\n            else {\n                kwargs_str = kwargs_str.replace(/\\&amp;quot\\;/g, \'"\');\n                kwargs = JSON.parse(kwargs_str);\n            }\n\n            spt.tab.load_selected(element_name, title, display_class, kwargs);\n\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseenter', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            bvr.src_el.setStyle("background", "#DDD");\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseleave', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            bvr.src_el.setStyle("background", "");\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseleave', 'bvr_match_class': 'spt_tab_subheader', 'cbjs_action': '\n            bvr.src_el.setStyle("display", "none");\n            '})
def add_subheader_behaviors(self, subheader_top):
    subheader_top.set_unique_id()
    subheader_top.add_smart_style('spt_tab_subheader_item', 'pointer', 'cursor')
    subheader_top.add_relay_behavior({'type': 'click', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            var element_name = bvr.src_el.getAttribute("spt_element_name");\n            var title = bvr.src_el.getAttribute("spt_title");\n            var display_class = bvr.src_el.getAttribute("spt_class_name");\n            var kwargs_str = bvr.src_el.getAttribute("spt_kwargs");\n\n            if (!kwargs_str) {\n                kwargs = {}\n            }\n            else {\n                kwargs_str = kwargs_str.replace(/\\&amp;quot\\;/g, \'"\');\n                kwargs = JSON.parse(kwargs_str);\n            }\n\n            spt.tab.load_selected(element_name, title, display_class, kwargs);\n\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseenter', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            bvr.src_el.setStyle("background", "#DDD");\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseleave', 'bvr_match_class': 'spt_tab_subheader_item', 'cbjs_action': '\n            bvr.src_el.setStyle("background", );\n            '})
    subheader_top.add_relay_behavior({'type': 'mouseleave', 'bvr_match_class': 'spt_tab_subheader', 'cbjs_action': '\n            bvr.src_el.setStyle("display", "none");\n            '})