I have this [code](http://jsfiddle.net/hmN7a/) which attempts to spin an image whenever the user clicks on the image. If the user clicks the image once and doesn't click it again it stops spinning after one attempt like I intended. Then they can click the image again and it will spin again. 

But if they click the image once and then click it again it speeds up, which is also the correct behavior. But then it won't stop spinning ever. 

```
    if(degree === 361){
        clearInterval($this.data('rotating'));
        $this.data('rotating', false);
        $this.data('degree', 0);
        return;
    }

```

This code should stop it spinning after the second rotate is over but it just continues to spin indefinitely. How can I get it to speed up and then stop spinning after the last spin per click is done?