[fix] make sure variables are transmit to javascript before time it may use them
jquery plugin to scroll to a element