function controlkeyframes(obj,proc,str){
var obj = $(obj);
var procent = proc;
var rules = str.split(';');
var css = "";
rules.forEach(function(item, i, arr) {
var methods = item.split(',');
var methodd = methods[0].split('.');
var method = methodd[0];
var methodstyle = methodd[1];
var amount = methods[1];
var keystart = Number(methods[2]);
var keyend = Number(methods[3]);
var rev = methods[4];
if(rev=="rev"){
if(procent>50){
procent = procent-(procent-50)*2;
procent = procent*2;
}else{
procent = procent*2;
}
}
if(method=="transform"){
var step = (keyend-keystart)/100;
var valueprocent = (step*procent)+keystart;
css += method+":"+methodstyle+"("+valueprocent+amount+");";
}else{
var step = (keyend-keystart)/100;
var valueprocent = (step*procent)+keystart;
css += method+":"+valueprocent+amount+";";
}
});
obj.attr('style', css);
}