Tweaked tag box javascript