$( function()
{
	if( segment_1 == '' )
	{
		$("#primarynavlist a:first").addClass("active");
	}
	else
	{
		$("#primarynavlist a[href*='"+segment_1+"']").addClass("active");
	}
	
	loop_testimonial();
})

function loop_testimonial()
{
	$(".testimonials").each( function()
	{
		var testimonials = $( this ).children(".testimonial_entity");
	
		var min	=	0
		var max =	testimonials.length
		var n	=	Math.floor(Math.random()*max+min)
	
		testimonials.parent().children(".testimonial_entity:visible").fadeOut("slow", function()
		{
			testimonials.parent().children(".testimonial_entity:eq("+n+")").show().fadeIn("slow")
		})
	})	
	setTimeout( loop_testimonial, 7500 )
}