Update logic.js

A better jQuery document ready.