Championship Raith Rovers booked a ticket to the Scottish Cup quarter-finals after a 3-2 win over Hibernian in a cracking encounter at Easter Road.