this is a lot of jquery... there will come a day when we don't need this >_>