Please help me improve this function that compares the jQuery version currently available (or not) with the one required.
function(need) {
if (typeof(jQuery) != 'undefined') {
if (!need) return true;
var re = /(\d+)\.(\d+)\.(\d+)/,
cur = re.exec(jQuery.fn.jquery),
need = re.exec(need);
return (need[1] <= cur[1] && need[2] <= cur[2] && need[3] <= cur[3]);
} else return false;
}