Remove dependency on jquery for layer ordering