Time refreshing javascript

@rbran100
1.change the position to set the variable
2. add jquery to refresh the markup