Fixed hide issue of the simple color swatch in Internet Explorer

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33543&start=0

The color selection popup element doesn't hide correctly in Internet Explorer.
When you click on the icon to show it, then click somewhere to hide it, the click on 'anywhere' will toggle the display of that element.

This fix adds an extra if check to make it only hide when the element is visible.

_PS: This PR also includes some general codestyle fixes. The real differens is the extra if in the ```hide``` method._

### Testing instructions
Either create a module or view that uses the ```<field name="color" type="color" control="simple" ... />``` form element.
Or simply test with Advanced Module Manager (http://www.nonumber.nl/extensions/advancedmodulemanager) that uses this element in the views.
Then play around with it in Internet Explorer.