beginning refactoring plugin without ajax
ajax removed from plugin, and gallery class active implemented