var timer1 = null;
var img_counter = 1;
var img_max = null;

function run()
{
	$("div.hp_select .images img.show").fadeOut(1000, function(){
		$(this).removeClass('show');
	});
	$("div.hp_select .images img#img_"+img_counter).fadeIn(2000, function(){
		$(this).addClass('show');
	});
	img_counter++;

	if (img_counter > img_max)
		img_counter = 0;
}

$(document).ready(function(){
	img_max = $("div.hp_select .images img").length-1;
	run_timer();
});

function run_timer()
{
	timer = setInterval('run()', 5000);
}

