adjustment function became jquery plugin