This feels a bit odd to me for some reason. Maybe use $.extend ?