$(function() {
	$('#in_promo').cycle({ 
		 fx:    'fade', 
		 speed:  1500, 
		 timeout:  5000,
		 before:   onBefore 
	 });
	 
	function onBefore() { 
		$("#demo_link").attr('href','/demo/demo.asp?f=' + this.title);
		$("#product_link").attr('href','/product_' + this.title + '.asp');
		switch (this.title)
		{
		 case 'starter':  
				 $("#koop_link").html('Online kopen en downloaden'); 
				 $("#koop_link").attr('href','/shop/step_1.asp'); 
				 
				 $("#bttn_starter").removeClass("teaser_bg_off") 
				 $("#bttn_starter").addClass("teaser_bg")
				 $("#bttn_starter").siblings().addClass("teaser_bg_off") 
				  
				 break;
		 case 'professional': 
				 $("#koop_link").html('Online kopen en downloaden');
				 $("#koop_link").attr('href','/shop/step_1.asp?ug=2');  
				 
				 $("#bttn_professional").removeClass("teaser_bg_off") 
				 $("#bttn_professional").addClass("teaser_bg")
				 $("#bttn_professional").siblings().addClass("teaser_bg_off") 
													  
				 break;
		 case 'enterprise':  
				 $("#koop_link").html('Maak persoonlijke afspraak');
				 $("#koop_link").attr('href','/shop/afspraak.asp');   			 	   

				 $("#bttn_enterprise").removeClass("teaser_bg_off") 
				 $("#bttn_enterprise").addClass("teaser_bg")
				 $("#bttn_enterprise").siblings().addClass("teaser_bg_off")
				 
				 break;
		 }
		
	}
	$('.koppel_logo').cycle({ 
		 fx:    'fade', 
		 speed:  1500, 
		 timeout:  2000
	 });
	$('#getuigenissen').cycle({ 
		 fx:    'scrollDown', 
		 speed:  1500, 
		 timeout:  8000
	 });
	 $('.bttn_starter').mouseover(function() { 
		 $('#in_promo').cycle(
		 {
		 fx:    'fade', 
		 speed:  0, 
		 timeout:  0,
		 startingSlide: 0,
		 before:   onBefore
		 }); 
		 return false; 
	}); 
	 $('.bttn_professional').mouseover(function() { 
		 $('#in_promo').cycle(
		 {
		 fx:    'fade', 
		 speed:  0, 
		 timeout:  0,
		 startingSlide: 1,
		 before:   onBefore
		 });  
		 return false; 
	});
	 $('.bttn_enterprise').mouseover(function() { 
		 $('#in_promo').cycle(
		 {
		 fx:    'fade', 
		 speed:  0, 
		 timeout:  0,
		 startingSlide: 2,
		 before:   onBefore
		 }); 
		 return false; 
	});				
	
});