$(document).ready(function(){

	$('#keyword').clearOnFocus();

	$(".column").equalHeightColumns();

	$(".tab_content").hide();
	$(".tabs table a:first").addClass("active").show();
	$(".tab_content:first").show();
	$(".tabs table a").click(function() {
		$(".tabs table a").removeClass("active");
		$(this).addClass("active");
		$(".tab_content").hide();
		var activeTab = $(this).attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$(".video_content").hide();
	$(".videos table a:first").addClass("active").show();
	$(".video_content:first").show();
	$(".videos table a").click(function() {
		$(".videos table a").removeClass("active");
		$(this).addClass("active");
		$(".video_content").hide();
		var activeTab = $(this).attr("href");
		$(activeTab).fadeIn();
		return false;
	});
	
	$('.header .navbar .nav li').hover(function() {
		$(this).find("ul").fadeIn(125);
		$(this).find("a").addClass('hover');
	}, function() {
		$(this).find("ul").fadeOut(125);
		$(this).find("a").removeClass('hover');
	});

	$(".carousel").slides({
		pagination: true,
		generatePagination: false,
		preload: true,
		play: 5000,
		pause: 2500,
		hoverPause: true,
		slideSpeed: 300,
		slideEasing: "easeOutQuad",
		effect: 'slide'
	});

	$(".carouselLink").qtip({
			style: {classes: 'ui-tooltip-dark'},
			position: {
               my: 'bottom left', // Use the corner...
               at: 'top center' // ...and opposite corner
            }
	});

	$(".wcarousel").jCarouselLite({
		btnNext: ".wnext",
		btnPrev: ".wprev",
		visible: 5,
		scroll: 1,
		circular: true,
		vertical: true
	});

	VideoJS.setupAllWhenReady();



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