jQuery.fn.mailme = function(test) {
    var at = / at /;
    var dot = / dot /g;
    this.each( function() {
        var addr = jQuery(this).text().replace(at,"@").replace(dot,".");
        var title = jQuery(this).attr('title')
        $(this)
            .after('<a href="mailto:'+addr+'" title="'+title+'" class="'+test+'">'+ addr +'</a>')
            .remove();
    });
};
jQuery.fn.contains = function(txt) { return jQuery(this).indexOf(txt) >= 0; }
//
$(document).ready(function(){

	var taal = $('html').attr('lang');
	var wachten = "Even geduld a.u.b.";
	if(taal=="en"){
		wachten = "Please wait ...";
	}	

	

	// INDEX (FEATURES)
	if($('.features article').length>2){
		setInterval(function(){
			$('.features .articles article:first').hide().appendTo('.articles');
			$('.features .articles article:first').hide().removeClass('feature2').appendTo('.articles');
			$('.features .articles article:eq(0)').fadeIn(1000);
			$('.features .articles article:eq(1)').addClass('feature2').delay(200).fadeIn(1000);
			
		},6000);		
	}
	
		// INDEX (FEATURES)
	if($('.featuresB article').length>2){
		setInterval(function(){
			$('.featuresB .articles article:first').hide().appendTo('.articles');
			$('.featuresB .articles article:first').hide().removeClass('feature2').appendTo('.articles');
			$('.featuresB .articles article:eq(0)').fadeIn(2000);
			$('.featuresB .articles article:eq(1)').addClass('feature').delay(200).fadeIn(2000);
			
		},6000);		
	}
	
	
	

	
});
