var startState = {
fill:"red",
stroke: "#000",
strokeWidth:1
};
var s = Snap("#svg");
var ball = s.circle(150, 150, 15);
ball.attr(startState);
var twoBall= s.circle(150, 150, 15);
twoBall.node.onmouseover = function(){
twoBall.animate({ transform:'translate(10,-30,5)'}, 50);
};
twoBall.node.onmouseout = function(){
twoBall.animate(startState, 50);
};
twoBall.node.onclick = function(){
twoBall.attr({ fill:"green"});
}