refactored behavior to make more sense; removed unnecessary calls with jQuery curCSS