use setTimeout in visibility methods just in case plus refactoring
version 1.7.6