is there any reason for creating jQuery plugin? if this is supposed to be used outside may it would be better to move this logic to separate file?