If you can't ping devices on the same LAN then it's got nothing to do with the router.The router would never even see that traffic, it's layer 2 traffic only.So you're back to the switches being bad or cables between them.
Also, try from the switches to the internet, you don't say how they're connected