refactored js code: now it initializes by function call on jQuery selector, markup is constructed dynamically, added ability to change urls after initialization, removed most of the class-adding code, added ability to call public function on instances