eko24,
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<style type="text/css">
div{ height : 50px ; width : 50px; margin : 1px; background-color : black; border-radius : 25px; border: solid 1px #000;text-align: center;}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$.fn.plugin = function (b) {
b.push(b[1]);
return this.each(function (f, d) {
var a = 0,
e = ["#008000", "#FFFF00", "#FF0000", "#FFFF00"],
c = function () {
$(d)
.css({
"background-color": e[a]
});
window.setTimeout(c, 1E3 * b[a]);
a = ++a % 4
};
c()
})
};
</script>
<script type="text/javascript">
$(window).load(function(){
$(".box").plugin([8,2,8]);
$(".too").plugin([2,2,2]);
});
</script>
<title></title>
</head>
<body>
<div class="box">is box</div>[8,2,8]
<div class="too">is too</div>[2,2,2]
</body>
</html>