/*var $$ = $.fn;
$$.extend({
	SplitID : function() {
		return this.attr('id').split('-').pop();
    },
	Slideshow : {
		Ready : function() {
			$('#wizzlr_menu_links li')
			.click(
				function() {
					if($$.Slideshow.Actief == $(this).SplitID())
					{
					}
					else
					{
						$$.Slideshow.Actief = $(this).SplitID();
						
						$$.Slideshow.Interrupted = true;

						$('.wizzlr_blok').hide();
						$('#wizzlr_menu_bg li').removeClass('actief');	
					
						$('#wizzlr_blok-' + $(this).SplitID()).show();
						$('#wizzlr_menu_bg li div').slideUp("fast");
						$('#wizzlr_menu-' + $(this).SplitID() + ' div').slideDown("fast");
        
						$$.Slideshow.Counter = parseInt($(this).SplitID());
						clearTimeout($$.Slideshow.Tijd);
						$$.Slideshow.Tijd = setTimeout('$$.Slideshow.Resume();', 5000);
					}
				}
			);

			this.Counter = 1;
			this.Interrupted = false;
			$$.Slideshow.Actief = 1;
			
			$$.Slideshow.Transition();
		},
		Resume : function() {
			$('div.wizzlr_blok').hide();
			$('#wizzlr_menu_bg li').removeClass('actief');	

			if (this.Counter == 4) {
				this.Counter = 1;
			}
			else {
				this.Counter++;
			}

			this.Interrupted = false;
			$$.Slideshow.Transition();
		},
		Transition : function() {
			if (this.Interrupted) {
				return;
			}

			this.Last = this.Counter - 1;

			if (this.Last < 1) {
				this.Last = 4;
			}

			$('#wizzlr_blok-' + this.Last).fadeOut(
				'slow',
				function() {
					$('#wizzlr_menu-' + $$.Slideshow.Last).removeClass('actief');
					$('#wizzlr_menu-' + $$.Slideshow.Last + ' div').slideUp("fast");
					$('#wizzlr_menu-' + $$.Slideshow.Counter + ' div').slideDown("fast");
					$('#wizzlr_menu-' + $$.Slideshow.Counter).addClass('actief');
					$('#wizzlr_blok-' + $$.Slideshow.Counter).fadeIn('slow');
					$$.Slideshow.Actief = $$.Slideshow.Counter;

					$$.Slideshow.Counter++;

					if ($$.Slideshow.Counter > 4) {
						$$.Slideshow.Counter = 1;
					}

					setTimeout('$$.Slideshow.Transition();', 5000);
				}
			);
		}
	}
});

$(document).ready(
	function() {
		$$.Slideshow.Ready();
	}
);
*/
//wizzlr blok (homepage bovenaan)
var $$ = $.fn;
$('#wizzlr_blok-1').hide();
$('#wizzlr_blok-2').hide();
$('#wizzlr_blok-3').hide();
$$.extend({
	SplitID : function() {
		return this.attr('id').split('-').pop();
    },
	Slideshow : {
		Ready : function() {
			$('#wizzlr_menu-vorige').click(
				function() {
					$$.Slideshow.Counter = $$.Slideshow.Actief-1;
					$$.Slideshow.Actief = $$.Slideshow.Actief-1;
					if ($$.Slideshow.Counter < 1) {
						$$.Slideshow.Counter = 3;
					}
					if ($$.Slideshow.Actief < 1) {
						$$.Slideshow.Actief = 3;
					}
					
					$$.Slideshow.Interrupted = true;

					$('.wizzlr_blok').hide();
					$('#wizzlr_blok-' + $$.Slideshow.Counter).show();
        
					clearTimeout($$.Slideshow.Tijd);
					$$.Slideshow.Tijd = setTimeout('$$.Slideshow.Resume();', 5000);
				}
			);
			$('#wizzlr_menu-volgende').click(
				function() {
					$$.Slideshow.Counter = $$.Slideshow.Actief+1;
					$$.Slideshow.Actief = $$.Slideshow.Actief+1;
					if ($$.Slideshow.Counter > 3) {
						$$.Slideshow.Counter = 1;
					}
					if ($$.Slideshow.Actief > 3) {
						$$.Slideshow.Actief = 1;
					}

					$$.Slideshow.Interrupted = true;

					$('.wizzlr_blok').hide();
					$('#wizzlr_blok-' + $$.Slideshow.Counter).show();
        
					clearTimeout($$.Slideshow.Tijd);
					$$.Slideshow.Tijd = setTimeout('$$.Slideshow.Resume();', 5000);
				}
			);

			this.Counter = 1;
			this.Interrupted = false;
			$$.Slideshow.Actief = 1;
			
			$$.Slideshow.Transition();
		},
		Resume : function() {
			$('.wizzlr_blok').hide();

			if (this.Counter == 3) {
				this.Counter = 1;
			}
			else {
				this.Counter++;
			}

			this.Interrupted = false;
			$$.Slideshow.Transition();
		},
		Transition : function() {
			if (this.Interrupted) {
				return;
			}

			this.Last = this.Counter - 1;

			if (this.Last < 1) {
				this.Last = 3;
			}

			$('#wizzlr_blok-' + this.Last).fadeOut(
				'slow',
				function() {
					$('#wizzlr_blok-' + $$.Slideshow.Counter).fadeIn('slow');
					$$.Slideshow.Actief = $$.Slideshow.Counter;

					$$.Slideshow.Counter++;

					if ($$.Slideshow.Counter > 3) {
						$$.Slideshow.Counter = 1;
					}
					
					setTimeout('$$.Slideshow.Transition();', 5000);
				}
			);
		}
	}
});

$(document).ready(
	function() {
		$$.Slideshow.Ready();
	}
);

