changed show and hiding feature to use css instead of dom