Bug fix: fixing broken toggle for piecharts

See 10041328a9bec4a8487e6ecc7782e35ec04fb060
Class open and closed are now toggled after the method toggleContent is called, not before like it used to be, so a check needs to be done on hasClass('closed') instead of hasClass('open')