template.js updated for flatstrap style