$(function() {
	$('#memberHilight > ul').tabs();
	$('#siteVideo > ul').tabs();

	var ticker = $("#ticker");
	ticker.children().filter("dt").each(function() {
	  var dt = $(this),
		container = $("<div>");
	  dt.next().appendTo(container);
	  dt.prependTo(container);
	  container.appendTo(ticker);
	});

	ticker.css("overflow", "hidden");
	function animator(currentItem) {
	  var distance = currentItem.height();
		duration = (distance + parseInt(currentItem.css("marginTop"))) / 0.025;
	  currentItem.animate({ marginTop: -distance }, duration, "linear", function() {
		currentItem.appendTo(currentItem.parent()).css("marginTop", 0);
		animator(currentItem.parent().children(":first"));
	  }); 
	};

	animator(ticker.children(":first"));
	ticker.mouseenter(function() {
	  ticker.children().stop();
	});

	ticker.mouseleave(function() {
	  animator(ticker.children(":first"));
	});

	$("ul#topnav li").hover(function() { //Hover over event on list item
		$(this).css({ 'background' : '#558755 url(topnav_active.gif) repeat-x'}); //Add background color + image on hovered list item
		$(this).find("span").show(); //Show the subnav
	} , function() { //on hover out...
		$(this).css({ 'background' : 'none'}); //Ditch the background
		$(this).find("span").hide(); //Hide the subnav
	});

	$('#slideMember').bxSlider({
		mode: 'slide',
		speed: 250,
		wrapper_class: 'slideMember_container'
	});
});
