HTML5 Template with javascript slice