    var goSlide = 0;
	var t="";

	function CountIt(){
		//$('#more_nav').slideUp("slow");
		//$('#more_nav').css("left","0px");
	}

$(document).ready(function() {

  $('#header').hoverIntent({
    sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
    interval: 100, // number = milliseconds for onMouseOver polling interval
    timeout: 0, // number = milliseconds delay before onMouseOut
    over: function() {
      $("#more_nav").slideDown("normal");
    }, // function = onMouseOver callback (REQUIRED)
    out: function() { 
      $("#more_nav").slideUp("normal");
    } // function = onMouseOut callback (REQUIRED)
  });

  $(".hidden_bar.hide_now").hide();

	
	//header - footer then calculate the remaining height
	//var bodyHeight = $(window).height() - 65+"px";
	//var mainHeight = $(window).height() - 5+"px";
	//$('#fb').css("z-index","1");
	//$('#fb').height(bodyHeight);
	//$('#holder').height(bodyHeight);
	$('#theblocker').css("background-color","#000000");
	//$('body').height(mainHeight);

	if ($.browser.msie && $.browser.version.substr(0,1)<7) {
		$('.article_thumb').css("margin-left","5px");
	}
	
	
	//twitter api
	
		$.getJSON('http://twitter.com/status/user_timeline/team_blaqbook.json?count=1&callback=?', function(data){
		$.each(data, function(index, item){
			$('#twitter').append('<div class="tweet"><p class="cuf" style="font-size:18px; color:#cccccc;">' + item.text.linkify() + '</p><p><strong>' + relative_time(item.created_at) + '</strong></p></div>');
		});
	
	});
		
	
	function relative_time(time_value) {
	  var values = time_value.split(" ");
	  time_value = values[1] + " " + values[2] + ", " + values[5] + " " + values[3];
	  var parsed_date = Date.parse(time_value);
	  var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
	  var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);
	  delta = delta + (relative_to.getTimezoneOffset() * 60);
	  
	  var r = '';
	  if (delta < 60) {
		r = 'a minute ago';
	  } else if(delta < 120) {
		r = 'couple of minutes ago';
	  } else if(delta < (45*60)) {
		r = (parseInt(delta / 60)).toString() + ' minutes ago';
	  } else if(delta < (90*60)) {
		r = 'an hour ago';
	  } else if(delta < (24*60*60)) {
		r = '' + (parseInt(delta / 3600)).toString() + ' hours ago';
	  } else if(delta < (48*60*60)) {
		r = '1 day ago';
	  } else {
		r = (parseInt(delta / 86400)).toString() + ' days ago';
	  }
	  
	  return r;
	}
	
	String.prototype.linkify = function() {
		return this.replace(/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&\?\/.=]+/, function(m) {
			return m.link(m);
		});
	};
	

});
/*start ohsnap fadeit*/
	$('body').ready(function(){
		$('#theblocker').fadeOut(1000);	
		$('.tweet').css("display","none");
		$('.tweet').eq(0).css("display","block");
		
	});
	
var requestPage;
function showFade(page){
	requestPage = page;
	$('#theblocker').fadeIn(2000);	
	setTimeout("gotoLocation()",2000);
}
function gotoLocation(){
	document.location.href = requestPage;
}
/*stop ohsnap fadeit*/

/*tab fadeit*/
$(document).ready(function() {
	$('.tab').eq(0).css("display","block");
	$('.tab_header').eq(0).addClass('tab_header_selected');
	$('.tab_header').eq(2).css("margin","0px 0px 0px 0px");
	$('.small_preview_article').eq(3).css("border-bottom","none");
	$('.footer_column').eq(2).css("margin","20px 0 0 0");
	$('.footer_column').eq(2).css("width","290px");
	
		$("#tab1").hover(function(){
					$(this).find(".featured_post_title").fadeIn();
					
					},function(){					
					$(this).find(".featured_post_title").fadeOut();
				});
});
function showIt(place){
	$('.tab_header_selected').removeClass('tab_header_selected');
	selecthead = place - 1;
	$('.tab_header').eq(selecthead).addClass('tab_header_selected');
	$('div.tab').css("display","none");
	$('#tab'+place).fadeIn(2000);
}
/*tab fadeit*/


