$(document).ready(function(){

$('.boxgrid.captionfull').hover(function(){
$(".cover", this).stop().animate({top:'60px'},{queue:false,duration:160});
}, function() {
$(".cover", this).stop().animate({top:'90px'},{queue:false,duration:160});
});
			
$(".tab_content").hide();
$("ul#presenters-tabs li:first, ul#presenters-tabs-2 li:first").addClass("active").show();
$(".tab_content:first").show();
$("ul#presenters-tabs li, ul#presenters-tabs-2 li").click(function() {
$("#ulpresenters-tabs li, #ulpresenters-tabs-2 li").removeClass("active");
$(this).addClass("active");
$(".tab_content").hide();
var activeTab = $(this).find("a").attr("href");
$(activeTab).fadeIn("slow");
return false;
});

$(".tweet").tweet({
join_text: "",
username: "gatewebvideo",
avatar_size: 0,
count: 5,
auto_join_text_default: "we said,", 
auto_join_text_ed: "we",
auto_join_text_ing: "we were",
auto_join_text_reply: "we replied",
auto_join_text_url: "we were checking out",
loading_text: "Loading tweets..."
});

$("#footer").fadeTo("fast", 0.3);
$("#footer").hover(function(){
$(this).fadeTo("fast", 0.8);
},function(){
$(this).fadeTo("fast", 0.3);
});
			
});//End function

function clientSwitch() {
var $active = $('#clients img.active');
if ( $active.length == 0 ) $active = $('#clients img:last');
var $next =  $active.next().length ? $active.next()
: $('#clients img:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 600, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "clientSwitch()", 4000 );
});