Moved behavior to a js file and made it execute when the document is ready.