//this waits untill the DOM is loaded
$(document).ready(function() { 
			//************************************* CLOSE ME

	$("#content").hide();




//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW MOD 2 Took this out 10-12 / today
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW MOD 2 
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW MOD 2 

	
/*	//we want to make it possible for the user to type in the URL and get served the correct page. To do this we check the hash value when the page loads and change the content accordingly:					   
	var hash = window.location.hash.substr(1);
	var href = $('.mod2AJAX li a').each(function(){
		var href = $(this).attr('href');
		if(hash==href.substr(0,href.length-5)){
			var toLoad = hash+'.html #content';
			$('#content').load(toLoad)
		}											
	});

	//target the links within the navigation and wait untill clicked
	$('.mod2AJAX li a').click(function(){

		//function here	 // this will 	...     1) Remove current page content 2) Get new page content and append to content DIV.
			// We need to define what page to get the data from when a link is clicked on. 
			//All we have to do here is obtain the 'href' attribute of the clicked link and define that as the page to call the data from, 
			//plus we need to define whereabouts on the requested page to pull the data from – i.e. 
			//We don't want to pull ALL the data, just the data within the 'content' div, so:
		var toLoad = $(this).attr('href')+' #content';
			//Instead of making it just disappear we're going to use jQuery's 'hide' function like this:
		$('#content').hide('slow',loadContent);
			//once that effect finished it then initiates the "loadContent" function (load the new content [via ajax])
		$('#load').remove();
		
		//"loading" graphic so they know something is happening in the background:
		$('#wrapper').append('<span id="load">LOADING...</span>');
		$('#load').fadeIn('normal');
		//********************** 1st. CLOSE BUTTON TOP == DROP
		//********************** 1st. CLOSE BUTTON TOP == DROP
			closeButtonMoveDown();	
			function closeButtonMoveDown() {
				//alert("1");
				$(".c_closeBlack").animate({ top:-60 },'slow',
					function(){
						$(".c_closeBlack").animate({ top:-30 },'fast');
					});
			};
			
			//We only need to add one line of code to the 'click' function for the hash to be added to the URL whenever the user clicks on a navigation link: 
		window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
			//write that loadContent function which we called earlier
			//**** AJAX
		function loadContent() {
			//popOut();

			$('#content').fadeIn( 'slow');
			$('#content').show('slow', 'easein');
			$('#content').load(toLoad,'',showNewContent())
		}
		

			//The loadContent function calls the requested page, then, once that is done, calls the 'showNewContent' function:
			//This showNewContent function uses jQuery's show function... makes the new (requested) content appear within the '#content' div
		function showNewContent() {
			$('#content').show('normal',hideLoader());
		}
			//Once it has called the content it initiates the 'hideLoader' function:
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
			//We have to remember to "return false" at the end of our click function – this is so the browser does not navigate to the page

		return false;
		
	
	});
*///WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE DOWNLOAD BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE DOWNLOAD BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE DOWNLOAD BUTTON
	//target the links within the navigation and wait untill clicked
	$('.c_quickLinks3').click(function(){
			//Instead of making it just disappear we're going to use jQuery's 'hide' function like this:
		$('#content').hide('slow',loadContent);
			//once that effect finished it then initiates the "loadContent" function (load the new content [via ajax])
		$('#load').remove();
		//"loading" graphic so they know something is happening in the background:
		$('#wrapper').append('<span id="load">LOADING...</span>');
		$('#load').fadeIn('normal');
		//********************** 1st. CLOSE BUTTON TOP == DROP
		//********************** 1st. CLOSE BUTTON TOP == DROP
			closeButtonMoveDown();	
			function closeButtonMoveDown() {
				//alert("1");
				$(".c_closeBlack").animate({ top:-60 },'slow',
					function(){
						$(".c_closeBlack").animate({ top:-30 },'fast');
					});
			};
			//We only need to add one line of code to the 'click' function for the hash to be added to the URL whenever the user clicks on a navigation link: 
		//window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
			//write that loadContent function which we called earlier
			//**** AJAX
		function loadContent() {
			$('#content').fadeIn( 'slow');
			$('#content').show('slow', 'easein');
			$('#content').load('kgic_downloadsPage.html','',showNewContent())
		}
			//The loadContent function calls the requested page, then, once that is done, calls the 'showNewContent' function:
			//This showNewContent function uses jQuery's show function... makes the new (requested) content appear within the '#content' div
		function showNewContent() {
			$('#content').show('normal',hideLoader());
		}
			//Once it has called the content it initiates the 'hideLoader' function:
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
			//We have to remember to "return false" at the end of our click function – this is so the browser does not navigate to the page
		return false;
	});
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE NEWS BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE NEWS BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE NEWS BUTTON
	//target the links within the navigation and wait untill clicked
	$('.c_quickLinks5').click(function(){
			//Instead of making it just disappear we're going to use jQuery's 'hide' function like this:
		$('#content').hide('slow',loadContent);
			//once that effect finished it then initiates the "loadContent" function (load the new content [via ajax])
		$('#load').remove();
		//"loading" graphic so they know something is happening in the background:
		$('#wrapper').append('<span id="load">LOADING...</span>');
		$('#load').fadeIn('normal');
		//********************** 1st. CLOSE BUTTON TOP == DROP
		//********************** 1st. CLOSE BUTTON TOP == DROP
			closeButtonMoveDown();	
			function closeButtonMoveDown() {
				//alert("1");
				$(".c_closeBlack").animate({ top:-60 },'slow',
					function(){
						$(".c_closeBlack").animate({ top:-30 },'fast');
					});
			};
			//We only need to add one line of code to the 'click' function for the hash to be added to the URL whenever the user clicks on a navigation link: 
		//window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
			//write that loadContent function which we called earlier
			//**** AJAX
		function loadContent() {
			$('#content').fadeIn( 'slow');
			$('#content').show('slow', 'easein');
			$('#content').load('kgic_newsPage.html','',showNewContent())
		}
			//The loadContent function calls the requested page, then, once that is done, calls the 'showNewContent' function:
			//This showNewContent function uses jQuery's show function... makes the new (requested) content appear within the '#content' div
		function showNewContent() {
			$('#content').show('normal',hideLoader());
		}
			//Once it has called the content it initiates the 'hideLoader' function:
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
			//We have to remember to "return false" at the end of our click function – this is so the browser does not navigate to the page
		return false;
	});

//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE BLOGS BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE BLOGS BUTTON
//WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW HOME PAGE BLOGS BUTTON
	//target the links within the navigation and wait untill clicked
	$('.c_quickLinks8').click(function(){
			//Instead of making it just disappear we're going to use jQuery's 'hide' function like this:
		$('#content').hide('slow',loadContent);
			//once that effect finished it then initiates the "loadContent" function (load the new content [via ajax])
		$('#load').remove();
		//"loading" graphic so they know something is happening in the background:
		$('#wrapper').append('<span id="load">LOADING...</span>');
		$('#load').fadeIn('normal');
		//********************** 1st. CLOSE BUTTON TOP == DROP
		//********************** 1st. CLOSE BUTTON TOP == DROP
			closeButtonMoveDown();	
			function closeButtonMoveDown() {
				//alert("1");
				$(".c_closeBlack").animate({ top:-60 },'slow',
					function(){
						$(".c_closeBlack").animate({ top:-30 },'fast');
					});
			};
			//We only need to add one line of code to the 'click' function for the hash to be added to the URL whenever the user clicks on a navigation link: 
		//window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
			//write that loadContent function which we called earlier
			//**** AJAX
		function loadContent() {
			$('#content').fadeIn( 'slow');
			$('#content').show('slow', 'easein');
			$('#content').load('kgic_blogsPage.html','',showNewContent())
		}
			//The loadContent function calls the requested page, then, once that is done, calls the 'showNewContent' function:
			//This showNewContent function uses jQuery's show function... makes the new (requested) content appear within the '#content' div
		function showNewContent() {
			$('#content').show('normal',hideLoader());
		}
			//Once it has called the content it initiates the 'hideLoader' function:
		function hideLoader() {
			$('#load').fadeOut('normal');
		}
			//We have to remember to "return false" at the end of our click function – this is so the browser does not navigate to the page
		return false;
	});

}); // end of function







		//********************** 2nd. CLOSE BUTTON TOP == CLOSE ALL
		//********************** 2nd. CLOSE BUTTON TOP == CLOSE ALL
$(document).ready(function CBcloseAll() { 
		$(".c_closeBlack").click(function() {
			//alert("3");
			$("#content").hide();
			$(".c_closeBlack").animate({ top:-60 },'fast');
		});
});





