var React = require('react'), SectionCollection = require('../../models/sectionCollection'), Section = require('../../models/section'), Category = require('../../models/category'), Backbone = require('backbone'), NavigationStore = require('../../stores/navigationStore'), SectionStore = require('../../stores/sectionStore'), SectionActions = require('../../actions/sectionActions'), NavigationActions = require('../../actions/navigationActions'); Backbone.$ = $; var SectionsListComponent = React.createClass({ _onChange: function () { if (this.isMounted()) { this.setState(SectionStore.getState()); } }, getInitialState: function() { return SectionStore.getState(); }, componentDidMount: function() { SectionStore.addChangeListener(this._onChange); SectionActions.loadSections(); }, onMouseOver: function(section) { SectionActions.setSectionHover(section); }, onMouseOut: function() { SectionActions.unsetSectionHover(); }, onMouseLeave: function() { SectionActions.unsetSectionHover(); }, onSectionClick: function(section) { SectionActions.unsetSectionHover(); NavigationActions.goToSection(section); event.preventDefault(); }, onCategoryClick: function(category, section) { SectionActions.unsetSectionHover(); NavigationActions.goToCategory(new Category(category), section); event.preventDefault(); }, onSubcategoryClick: function(subcategory) { // implement in navigation actions // and call // when ready return false; }, render: function() { var self = this; var style = { position: 'relative' }; var abStyle = { position: 'absolute' }; return (