updated select2 to 3.4.5; extracted script registration to a static method