// screw you Google.
$(document).ready(function (){
	$("iframe[name=googleSearchFrame]").attr("width", "745");
});

$(function(){
  $(".article table tr:odd").addClass("odd-row");
});

$(document).ready(function (){
	$('.foo').tipsy({ gravity: 'n', fade: true });
	$('.why-tip').tipsy({ gravity: 'n', fade: true });
});

$(document).ready(function (){
    $("a.tab").click(function(e) {  
        $(".active-further").removeClass("active-further");  
        $(this).addClass("active-further");  
        $(".further-articles").hide();  
        var content_show = $(this).attr("title");  
        $("#"+content_show).show();  
        e.preventDefault();
	});
});

$(document).ready(function (){
	$(".tell-me-more").hide();
	$("a.tell-more-link").click(function(e) {
		var to_expand = $(this).attr("id"); 
		$("#content-"+to_expand).slideToggle();
		e.preventDefault();
	});
	$("a.tell-more-hide").click(function(e) {
		var to_close = $(this).closest("div").attr("id");
		$("#"+to_close).slideUp();
		e.preventDefault();
	});
});

$(document).ready(function() {
    $('#signup-list input[type="text"]').addClass("inactive-field");
	$('#signup-list input[type="text"]').focus(function() {
		$(this).removeClass("inactive-field").addClass("active-field");
    });
    $('#signup-list input[type="text"]').blur(function() {
    	$(this).removeClass("active-field").addClass("inactive-field");
    });
});

$(function() {
	$(".scrollable").scrollable({ 
		vertical: true, 
		mousewheel: true,
		circular: true 
	}).autoscroll({ 
		autoplay: true,
		interval: 10000
	});	
});
