$(document).ready(function() {
	
	//text replace
	$('.childpageentry h4 a').each(function(){$(this).text($(this).text().replace('Protected','Confidential'));});
	$('.post-174 h2').each(function(){$(this).text($(this).text().replace('Protected','Confidential'));});
	
	//logins slider
	$('.logintoggle').click(function() {
		$('#logins').slideDown(500);
	});
	$('.loginsclose').click(function() {
		$('#logins').slideUp(500);
	});
	
	//whitepaper slider
	var page = location.hash;
	switch(page)
	{
	case "#usermessagea":
	$('#whiteform').show();
	break;
	default:
	$('#whiteform').hide();
	} 

	$('.whitepaperlink').click(function(){
		$('#whiteform').slideDown(500);
	});

	$('.whitepaperclose').click(function() {
		$('#whiteform').slideUp(500);
	});
	
	
	//promo box toggles
	$('.first').click(function() { 
		$('.promofirst').removeClass('notactive'); 
		$('.promosecond').addClass('notactive'); 
		$('.promothird').addClass('notactive'); 
		$('.promofourth').addClass('notactive'); 

		$('.promoblockfirst').fadeIn(200); 
		$('.promoblocksecond').fadeOut(200); 
		$('.promoblockthird').fadeOut(200);  
		$('.promoblockfourth').fadeOut(200);  
	});

	$('.second').click(function() { 
		$('.promofirst').addClass('notactive');
		$('.promosecond').removeClass('notactive');
		$('.promothird').addClass('notactive');
		$('.promofourth').addClass('notactive');

		$('.promoblockfirst').fadeOut(200); 
		$('.promoblocksecond').fadeIn(200); 
		$('.promoblockthird').fadeOut(200);  
		$('.promoblockfourth').fadeOut(200);  
	});

	$('.third').click(function() { 
		$('.promofirst').addClass('notactive');
		$('.promosecond').addClass('notactive');
		$('.promothird').removeClass('notactive');
		$('.promofourth').addClass('notactive');

		$('.promoblockfirst').fadeOut(200); 
		$('.promoblocksecond').fadeOut(200); 
		$('.promoblockthird').fadeIn(200);  
		$('.promoblockfourth').fadeOut(200);  
	});

	$('.fourth').click(function() { 
		$('.promofirst').addClass('notactive');
		$('.promosecond').addClass('notactive');
		$('.promothird').addClass('notactive');
		$('.promofourth').removeClass('notactive');

		$('.promoblockfirst').fadeOut(200); 
		$('.promoblocksecond').fadeOut(200); 
		$('.promoblockthird').fadeOut(200);  
		$('.promoblockfourth').fadeIn(200);  
	});

});	

//stuff for the time
var currentTime = new Date()
var hours = currentTime.getHours()
var minutes = currentTime.getMinutes()

var suffix = "AM";
if (hours >= 12) {
suffix = "PM";
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}

if (minutes < 10)
minutes = "0" + minutes
