using animate with transform

using animate with transform

I am trying to get the animate jquery function to work with a transform
i started with this code which does work - it animates the border radius from 0-20 in 5 secs
-------------------------------------------
<style>
#jig{
 position:absolute;
 top:100px;
 left:100px;
 height:100px;
 width:100px;
 background-color:red;
 -webkit-transform: rotate(0deg);
 -webkit-transform-origin: top right;
 -webkit-border-radius:0px;
}
</style>













 
<script>
$(document).ready(go)
function go(){
 $("#jig").animate(
  {"-webkit-border-radius" : "20px"},5000)
}
</script>



 
<div id="jig"></div>
-----------------------------------------------
 
however when i change the code to animate the -webkit-transform: rotate(0deg); property it does not work
the code is exactly the same except {"-webkit-border-radius" : "20px"}, is replaced with
{"-webkit-transform" : "rotate(45deg); "},
 
here is the full updated code, which does not work
----------------------------------------------------
<style>
#jig{
position:absolute;
top:100px;
left:100px;
height:100px;
width:100px;
background-color:red;
-webkit-transform: rotate(0deg);
-webkit-transform-origin: top right;
-webkit-border-radius:0px;
}
</style>











<script>
$(document).ready(go)
function go(){
 $("#jig").animate(
  {"-webkit-transform" : "rotate(45deg)"},5000)
}
</script>



<div id="jig"></div>
--------------------------------------------
 
how can i make jquery handle it?

remember that -webkit- not compatable with all browsers so the solution will need to also work with the -moz-, -o- and regular css transform properties, as well as a IE compatable solution.

i know that i could animated it using regular javascripts



but this would involve using the setinterval() function to create each frame of animation, use of an if statement to detect if it has reached the end of the animation each time the setinterval and since the peoperty is not a whole number i would also have to use a string manipulation function to extract 30 from rotate(30deg). all in all this would be very messy so i want to get jquery working for it