cooking, programming and everyday life xrado

Sunday, April 13, 2008

mooFader - image fader slideshow

i needed one for the website i was working on, so i made small class that works with mootools 1.11.
<script type="text/javascript" src="mootools-1.11.js"></script>
<script type="text/javascript" src="moofader.js"></script>
var images = Array('<?=implode("','",glob('images/*.JPG'));?>');
window.addEvent('load', function(){ new mooFader('fader',images); } );
<div style="position: relative; width: 390px; height: 390px;" id="fader">
	<img src="images/rado.JPG">
var mooFader = new Class({

		duration: 3000,
		fade: 1000

	initialize: function(el,im,options) {
		this.holder = $(el);
		if(!this.holder) return;
		this.starter = this.holder.getElement('img');
		this.starter.setStyle('position','absolute'); = im;
		this.faders = [];
		this.images = im.length;
		this.counter = 0;
		new Asset.image([this.counter]);

	change: function(){
		if(this.counter > this.images-1) this.counter = 0;
		var img = new Element('img',{
			'src'	:[this.counter],
			'styles': { 'position':'absolute' }
		var fader = img.getNext();
		new Fx.Style(fader,'opacity',{ duration:this.options.fade, onComplete: function(el){ fader.remove(); } }).start('1', '0');
		new Asset.image([this.counter]);

mooFader.implement(new Options, new Events);
Demo page can be found here.

Thursday, April 03, 2008


thats how my drawer looks at work you see the jaffa cakes :))

Monday, March 10, 2008

Millet desert

raffaello like ...mmmm :Đ

cooked millet, grated coconut, milk (soy milk or whey protein), vanilla sugar, sugar

cook slowly with twice portion of water until millet get soft. when cooked all water should drain. while still hot, mix all together with a strong mixer including coconut, milk and add sugar to taste. serve with some more grated coconut on top. can be kept 2-3 days in a refrigerator

Preparation time:
45 min (best served when get cold or from refrigerator )

Monday, January 28, 2008

Rice with beans and vegetables

yeah, rice again :) ... what can i say, i love rice and beans. The secret is in dressing ingredients.

Ingredients: rice, beans (best cooked on steam), green pepper, carrot and radish (or pick any season vegetables)
Dressing: pepper, natural lemon juice, virgin olive oil and soy sauce
Preparation time: 5 min (if you have cooked rice)

rice with beans and vegetables
pages:  1   2   3   4   5   6   7   8   9   10