Cufon.replace('h1.sub_head', {fontFamily: 'whitney' });
Cufon.replace('h1.home_title_anunobstructed', {fontFamily: 'whitney-medium' });
Cufon.replace('h2',{fontFamily: 'whitney-medium' });
Cufon.replace('h2.home_title_inarapidly',{fontFamily: 'whitney-bold' });
Cufon.replace('h3', {fontFamily: 'whitney-bold' });
Cufon.replace('th.list_head',{
	fontFamily: 'whitney-bold',
	hover: {
		color: '#d9c980'
	}
});


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=320,height=280,left = 680,top = 385');");
}

function popUpEmail(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=280,left = 450,top = 385');");
}

function popUpContactme(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=355,left = 450,top = 385');");
}

function popUpPrint(URL) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=100%,left = 20,top = 385');");
}

function reqConChoice() {
				var phone =  document.getElementById('phone');
				var email =  document.getElementById('email');

				if (document.contact_form.contact_method.options[document.contact_form.contact_method.selectedIndex].value == 'phone'){

					phone.style.display = 'block';
					email.style.display = 'none';

				}
				if (document.contact_form.contact_method.options[document.contact_form.contact_method.selectedIndex].value == 'email'){

					phone.style.display = 'none';
					email.style.display = 'block';
			
				}
}

function reqConTypeChoice() {
			var role = document.getElementById('role');
			var company = document.getElementById('company');
			var questions = document.getElementById('questions');

			if (document.contact_form.contact_type.options[document.contact_form.contact_type.selectedIndex].value == ''){
				role.style.display = 'none';
				company.style.display = 'none';
				questions.style.display = 'none';
			}
			if (document.contact_form.contact_type.options[document.contact_form.contact_type.selectedIndex].value == 'advisor'){
				role.style.display = 'none';
				company.style.display = 'none';
				questions.style.display = 'none';
			}
			if (document.contact_form.contact_type.options[document.contact_form.contact_type.selectedIndex].value == 'client'){
				role.style.display = 'none';
				company.style.display = 'none';
				questions.style.display = 'block';
			}
			if (document.contact_form.contact_type.options[document.contact_form.contact_type.selectedIndex].value == 'press'){
				role.style.display = 'none';
				company.style.display = 'none';
				questions.style.display = 'block';
			}
			if (document.contact_form.contact_type.options[document.contact_form.contact_type.selectedIndex].value == 'other'){
				role.style.display = 'block';
				company.style.display = 'block';
				questions.style.display = 'block';
			}
}

function trackContact() {
	var contact_type = document.getElementById('choConType')[document.getElementById('choConType').selectedIndex].innerHTML;
	pageTracker._trackEvent('Request Info', 'Type ('+contact_type+')');
	//test('Request Info', 'Type ('+contact_type+')');
}

jQuery(document).ready(function($) {
	$('#pullout:not(.open)').hover(function () {
		$(this).css('left','-275px');
	},function() {
		$(this).css('left','-277px');
	});
	$container = $('#pullout');
	$('#pulloutRight').click(function() {
		$container.toggleClass('open');
		$container.unbind('hover');
		if ($container.hasClass('open')) {
			$('#pulloutContainer').css('width','310');
			$container.animate({
				left: '0px' 
			},500);
		}
		else {
			$container.bind('hover',function() {
				$('#pullout:not(.open)').hover(function () {
					$(this).css('left','-275px');
				},function() {
					$(this).css('left','-277px');
				});
			});
			$container.animate({
				left: '-277px'
			},500,function() {
				$('#pulloutContainer').css('width','35');
			});
		}
	});
});


