Should wrap this all in `$(function() { });` so that it doesn't get executed until the DOM tree is finished loading.