function ReferentieSlides(el)
{
	var thisClass = this;
	
	this.select = function(classes)
	{
		var i = 0;
		el.children(".slide").each(function()
		{
			if (classes[0] != "all" && classes[1] != "all") {
				if (($(this).hasClass(classes[0])) && (($(this).hasClass(classes[1])))) {
					if ($(this).is(":not(:visible)")) {
						//setTimeout("referenties.show(" + i + ");", i * 500);
						$(this).show();
						$(this).next(".spacer").show();
						i++;
					}
				} else {
					if ($(this).is(":visible")) {
						//setTimeout("referenties.hide(" + i + ");", i * 500);
						$(this).hide();
						$(this).next(".spacer").hide();
						i++;
					}			
				}
			} else if (classes[0] == "all" && classes[1] == "all") {
				if ($(this).is(":not(:visible)")) {
					//setTimeout("referenties.show(" + i + ");", i * 500);
					$(this).show();
					$(this).next(".spacer").show();
					i++;
				}
			} else if (classes[0] == "all" || classes[1] == "all") {
				if (classes[0] == "all") {
					if ($(this).hasClass(classes[1])) {
						if ($(this).is(":not(:visible)")) {
							//setTimeout("referenties.show(" + i + ");", i * 500);
							$(this).show();
							$(this).next(".spacer").show();
							i++;
						}						
					} else {
						if ($(this).is(":visible")) {
							//setTimeout("referenties.hide(" + i + ");", i * 500);
							$(this).hide();
							$(this).next(".spacer").hide();
							i++;
						}					
					}
				} else if (classes[1] == "all") {
					if ($(this).hasClass(classes[0])) {
						if ($(this).is(":not(:visible)")) {
							//setTimeout("referenties.show(" + i + ");", i * 500);
							$(this).show();
							$(this).next(".spacer").show();
							i++;
						}						
					} else {
						if ($(this).is(":visible")) {
							//setTimeout("referenties.hide(" + i + ");", i * 500);
							$(this).hide();
							$(this).next(".spacer").hide();
							i++;
						}					
					}				
				}
			}
		});
	};
	
	this.show = function(i)
	{
		$($(el).children(".slide")[i]).fadeIn(500);
		$($(el).children(".slide")[i]).next(".spacer").show();	
	};
	
	this.hide = function(i)
	{
		$($(el).children(".slide")[i]).fadeOut(500);
		$($(el).children(".slide")[i]).next(".spacer").hide();	
	};
};
