$(document).ready(function(){$.each($(".current-bar"),function(){var prop=parseInt($(this).attr("property"));var valp="20px";switch(prop){case 2:valp="30%";break;case 3:valp="45%";break;case 4:valp="62%";break;case 5:valp="80%";break;case 6:valp="100%";break;case 7:valp="0";break;} $(this).animate({width:valp},500,function(){});});});