﻿$(document).ready(function() {

  if(window.location.href.indexOf("Post:",0) > -1 | window.location.href.indexOf("Post%3a",0) > -1 | window.location.href.indexOf("Post%3A",0) > -1) {
    $("div.primary-grid-block div:first").addClass("blogpostpage");
  }

  $('.SiteLife_RSS').clone().appendTo('.BloggerProfile_Title');
  
  $(".BlogMain_EntryDetails a:nth-child(2)").hide();

	//When page loads...
	$(".tab-content").hide(); //Hide all content
	$("ul.tab-archive li:first").addClass("active").show(); //Activate first tab
	$(".tab-content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tab-archive li").click(function() {

		$("ul.tab-archive li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab-content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active ID content
		
		var thirdColHeight = $("#blog3col").height();
        var contentColHeight = $(".simpleView").height();
        
        if (thirdColHeight > contentColHeight) {
            $(".simpleView").height(thirdColHeight);
        }
		
		return false;
	});
	


});
