function sSwitch() {
	var $active = jQuery('#top-comment DIV.active');

	if ( $active.length == 0 ) $active = jQuery('#top-comment DIV:last');

	// use this to pull the divs in the order they appear in the markup
	var $next =  $active.next().length ? $active.next()
		: jQuery('#top-comment DIV:first');

// uncomment below to pull the divs randomly
// var $sibs  = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next  = $( $sibs[ rndNum ] );


$active.addClass('last-active');

$next.css({opacity: 0.0})
		.addClass('active')
		.animate({opacity: 1.0}, 1000, function() {
		$active.removeClass('active last-active');
	});
}

$(function() {
	setInterval( "slideSwitch()", 5000 );
});


jQuery(function() {
	jQuery("#top-comment").jCarouselLite({
		vertical: true,
		hoverPause:true,
		visible: 1,
		auto:5000,
		speed:1000
	});
});

function equalHeight(group) {
	tallest = 0;
	group.each(function() {
		thisHeight = jQuery(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
}

jQuery(document).ready(function(){
		jQuery("#menu-top-menu li:last,  #home-post .post:nth-child(3n), .row .post:nth-child(3n) ").addClass("last");
		jQuery(".row-container").append("<div class='clr'>");
		jQuery('#menu-top-menu').superfish();
		jQuery('#top-comment div:first').addClass('active');
		//jQuery("#top-comment").wrap("<div class='scroll-pane'>");
		equalHeight(jQuery("#top-comment ul li"));
})

