var timerWait=3000;
var fadeInTime=1200;
var fadeOutTime=800;
var fadeInTimeHover=600;
var fadeOutTimeHover=600;


var timerSpeeds = new Array();
timerSpeeds['#wk_hot_proef']=10000;
timerSpeeds['#wk_hot_sublimo']=8000;
timerSpeeds['#wk_hot_carbo_pro_pou']=8000;
timerSpeeds['#wk_hot_prestige']=8000;
timerSpeeds['#wk_hot_design_pou']=8000;

timerSpeeds['#wk_hot_proeftab']=10000;
timerSpeeds['#wk_hot_sublimotab']=8000;
timerSpeeds['#wk_hot_carbo_pro_poutab']=8000;
timerSpeeds['#wk_hot_prestigetab']=8000;
timerSpeeds['#wk_hot_design_poutab']=8000;

var vologorde = [1,2,3,4,5]
var vol_loper = 0;

var timer;
var loper;

$(document).ready(function(){
	$('#waterkoeler_hot > li').each(function(){$(this).css('opacity',0).css('display','none');});
	$('#waterkoeler_hot > li:first').css('opacity',1).css('display','block');
	$('#waterkoeler_hot_ov > li > a').mouseenter(function(){
		clearTimeout(timer);
		loper=$(this).attr('href').substring($(this).attr('href').indexOf('#'));
		$('#waterkoeler_hot :animated').stop(true);
		$('#waterkoeler_hot > li').each(function(){$(this).animate({opacity:0},fadeOutTimeHover,function(){ $(this).css('display','none'); });});
		$($(this).attr('href').substring($(this).attr('href').indexOf('#'))+'tab').stop().css('display','block').animate({opacity:1},fadeInTimeHover);
	});
	$('#waterkoeler_hot_ov > li > a').mouseleave(function(){
		timer=setTimeout("changeBigImage()",timerSpeeds[loper]); 
	}).click(function(){ 
		window.location=$($(this).attr('href').substring($(this).attr('href').indexOf('#'))+'tab p a').attr('href');
		
	});
	loper= $('#waterkoeler_hot_ov > li > a').attr('href').substring($('#waterkoeler_hot_ov > li > a').attr("href").indexOf('#'));
	timer=setTimeout("changeBigImage()",timerSpeeds[loper]); 
	$('.hot_button a img').mouseenter(function(){ clearTimeout(timer); }).mouseleave(function(){ timer=setTimeout("changeBigImage()",timerSpeeds[loper]);  });
});

function changeBigImage(){
	if(	vol_loper == vologorde.length - 1) vol_loper = 0; else vol_loper=vol_loper+1;
	$('#waterkoeler_hot > li').each(function(i){
		if(i==vologorde[vol_loper]-1) {
		
			$('#waterkoeler_hot :animated').stop(true);
			$('#waterkoeler_hot > li').each(function(){$(this).animate({opacity:0},fadeOutTime,function(){ $(this).css('display','none'); });});
			$(this).stop().css('display','block').animate({opacity:1},fadeInTime);
			timer=setTimeout("changeBigImage()",timerSpeeds["#"+$(this).attr('id')]);
			return false;
		}
	});
}