I'm making a realtime css editor using jQuery and it works just perfect except for one thing...

When I use solid backgrounds it works fine like this:
Code JavaScript:
jQuery("#boxtitleback").attachColorPicker();
jQuery("#boxtitleback").change(function() {jQuery('#boxtitle h1').css("background-color",jQuery("#boxtitleback").getValue())});

But what if I want to change one color of an -webkit-gradient???

How do i do that?
background:-webkit-gradient(linear,0% 0,0% 100%,from(#333),to(#5e5e65));

Thanks in advance ;-)