Moved jquery initialization code to view file