raphael gradient refactoring