function isAdmin()
{
	var winUrl = new String(window.location.href);
	if (winUrl.match('admin=1') != null)
		return true;
	return false;	
}

function displayAdminNav()
{
	jQuery('#PopupFooterNav').css('display', 'block');
	jQuery('#PopupFooterNav a')
		.not(':first')
		.each(function()
				{
					var adminLink = jQuery(this);
					adminLink.attr('href', adminLink.attr('href') + '?admin=1')
				});
}

function adjustContentWrapper()
{
	jQuery('.PopupContent')
		.css({
			 	width: 'auto',
			 	height: '398px'
			 });
	jQuery('h1')
		.css({
			 	width: 'auto'
			 })
}

function setPDFLinks()
{
	jQuery('a[href$=.pdf]').attr('target', '_blank');
}

jQuery(function(){
	if (isAdmin())
	{
		displayAdminNav();				
	}
	else
	{
		adjustContentWrapper();	
	}
	setPDFLinks();
})