Added jQuery function - bugfix 2