jquery in head. custom story tmpl
factorizing code