Use jQuery so you don't have to write inline javascript on
element:
$(document).ready(function(){
$("li > a").each(function(index, value) {
var link = $(this).attr("href");
$(this).parent().bind("click", function() {
location.href = link;
});
});
});