// JavaScript Document
$(document).ready(init);



function init(){
	//init starting page
	getPage("news.html");
	$("#capitalAppeals").click(function(){getPage("capitalAppeals.html");updateFLV_JS("capitalAppeals");});
	$("#schoolEnrol").click(function(){getPage("schoolEnrol.html");updateFLV_JS("schoolEnrol");});
	$("#corporate").click(function(){getPage("corporate.html");updateFLV_JS("corporate")});
	$("#nfp").click(function(){getPage("nfp.html");updateFLV_JS("nfp")});
	$("#govt").click(function(){getPage("govt.html");updateFLV_JS("govt")});
	$("#beingDad").click(function(){getPage("beingDad.html");updateFLV_JS("beingDad");});
	$("#film").click(function(){getPage("film.html");updateFLV_JS("film")});
	$("#team").click(function(){getPage("team.html");updateFLV_JS("team")});
	

};


function getPage(thePage){
//If undefined - add current page as first history item. Current Page at the end...
	

$("#pageLoader").ajaxStart(function(){
   $("#pageLoader").append('<div id = "loader"></div>');
});

	
	
$.ajax({
  url: thePage,
  cache: false,
  html: true,
  global: true,
  success: function(html){
	
	  $("#loader").remove;
  $("#pageLoader").html(html);
	 
  }
});	

return false;
}

 