function createpageNav(){
	var list = '';
	$('.post h2').each(function(i){
		list = '<li><a href="#'+'h2_sel_'+i+'" id="h2_s_link_'+i+'">'+$(this).text()+'</a></li>'+list;
		$(this).parent().css('display','none').attr('id','h2_sel_'+i);
	});

	//here's the menu
	$('.section_menu').html('<ul>'+list+'</ul>');
	$('#h2_sel_0').css('display','block');
	$('#h2_s_link_0').addClass('active');
	
	current_active_section = '#h2_sel_0';
	current_active_link = '#h2_s_link_0';
	$('.section_menu li a').click(function(event){
		$(current_active_section).css('display','none');
		var mylink = $(this).attr('href');
		mylink = mylink.substring(mylink.indexOf('#'),mylink.length);
		$(mylink).css('display','block');
//		alert(mylink);
		current_active_section = mylink;
		
		$(this).addClass('active');
		$(current_active_link).removeClass('active');
		current_active_link = '#'+$(this).attr('id');

		return false;
	});
}


var _googleInterval;
function addGoogleTracking()
{
	var sc = document.createElement('script');
	sc.type = 'text/javascript';
	sc.src = 'http://www.google-analytics.com/ga.js';
	document.getElementsByTagName("head").item(0).appendChild(sc);
	_googleInterval = setInterval(activateGoogle,250);
}
function activateGoogle()
{
	if(typeof _gat != 'undefined') 
	{
		clearInterval(_googleInterval);
		var pageTracker = _gat._getTracker("UA-9372754-1");
		pageTracker._initData();
		pageTracker._trackPageview();
	}
}
