



function headerEffects(){

	var that = this;
	
	that.images_amount = 0;
	
	var index = 0;
	
	
	this.run = function(){
		
		var next_index = index + 1;
		
		if( next_index >= that.images_amount )
			next_index = 0;
		
		$('#header_'+index).fadeOut("slow");
		$('#header_'+next_index).fadeIn("slow");
		
		index = next_index;
		
		_wait();
		
	}
	
	var _wait = function(){
		var t = setTimeout("he.run()", 4000);
	}
}


var he = new headerEffects();
he.images_amount = $('.swap_header').size();
he.run();


