js splitted up to avoid yui in frontend