Optimize index.js and add style consistency

Declared all jQuery objects once where needed instead of diving into the DOM multiple times for the same object.

Added style consistency between variable declarations, if/else statements and functions.
Save here too (https://github.com/TryGhost/Casper/pull/130/files#r17217359)