// JavaScript Document for TT iBlog
// Author: Axinte Adrian
// Created: 23/06/2010
// Version: v.1.0.2
// Last Rev: 02/08/2010

/* CUFON STYLE */
Cufon.replace(".post h2, #respond, #comments", {hover:true, fontFamily:"Myriad Pro"});

$(document).ready(function() {

	$("#topbar").click(function(){ 
		$("html, body").animate({scrollTop:0}, "slow"); 
	});
	$("#topbar").css({cursor:"pointer"});
	
	$(".tabs li:last, .sectabs li:last, .trdtabs li:last").css({marginRight:"0"});
	$(".trdtab_container").css({margin:"0"});
	$(".post:last").css({margin:"0", border:"none"});
	$(".twitter-feed ul li:last").css({paddingRight:"0"});
	$(".twitter-feed ul li:first").css({marginLeft:"10px"});
	$("#footer li:last").css({background:"transparent"});
	$("#footer li:last a").css({paddingRight:"0"});
	$("#topnavigation li:first-child a").css({paddingLeft:"0"});
						   
	$(".tab_content, .sectab_content, .trdtab_content").hide();
	$("ul.tabs li:nth-child(1), ul.sectabs li:nth-child(1), ul.trdtabs li:nth-child(1)").addClass("active").show(); 
	$(".tab_content:first, .sectab_content:first, .trdtab_content:first").show();
	$("ul.tabs li").click(function() {
		$("ul.tabs li").removeClass("active");
		$(this).addClass("active"); 
		$(".tab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn(); 
		return false;
	});
	$("ul.sectabs li").click(function() {
		$("ul.sectabs li").removeClass("active");
		$(this).addClass("active"); 
		$(".sectab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn(); 
		return false;
	});
	$("ul.trdtabs li").click(function() {
		$("ul.trdtabs li").removeClass("active");
		$(this).addClass("active"); 
		$(".trdtab_content").hide();
		var activeTab = $(this).find("a").attr("href");
		$(activeTab).fadeIn(); 
		return false;
	});
});