rewrite some fn without jquery and fix bug with static-header in css