Added if statements for browsers that don't support HTML5