Fix javascript load order

Many projects put the javascripts (jquery etc) right before the closing body tag. In this case its good to use content_for :javascripts to yield your inline javascript to the end of the file also so jquery etc is loaded before you try to use them.