//<![CDATA[
// load handler
$(document).ready(function () {
	GlobalHeaders.init();
}); 

/**
 * Class to manage the global headers
 */
var GlobalHeaders = 
{
	init: function () {

		this.styleSwitcher();
		this.doEffects();
		this.popup();
		
	}
	,
	styleSwitcher: function () {
	
		$('#switcher span a').click(function () {
			$('body').removeClass();
			//var thisID = $(this).attr('id');
				if (this.id == 'reg') {
					$('body').addClass('reg');
				}
				else if (this.id == 'L') {
					$('body').addClass('large');
				}
				else if (this.id == 'XL') {
					$('body').addClass('extralarge')
				}
			$('#switcher span a').removeClass('selected');
			$(this).addClass('selected');			
		});
	}
	,
	doEffects: function () {
		//hover states for li's
		$("#topNav li, #leftNav li").hover(
		function(){
   			$(this).addClass("hover");
 		},
		function(){
			$(this).removeClass("hover");
 		});
	}

	,
	popup: function () {
		$('li a#btnHCP').click(function (e) {
							  
			$('#popup-login').fadeIn('normal');
			e.preventDefault();
		
		});
		$('a.close').click(function (e) {
			$('#popup-login').fadeOut('fast');		
			e.preventDefault();
		});
		
		
//	$('a.close').click(function (e) {
//		$('#regPanel').fadeOut('fast');		
//			e.preventDefault();
//		});
		
		$('a.close').click(function (e) {
			$('#popup-thank').fadeOut('fast');		
			e.preventDefault();
		});
	}
}


//]]>// JavaScript Document