
/*********************************************************************************************
	JQuery functions
*********************************************************************************************/

$(document).ready(function(){ 

	// Declare global jquery variable (section)
	$.myVariable = { 
		section : ""
	} 
	
	// *** Navigation Events

	// Interview Nav
	$("#navInterview").mouseover(function() {
		$("#navInterview").animate ({top: "41px"}, 75);
		if ($('a#InterviewPreview img').attr('src') == "Images/Student/student_img_apply_off.jpg")
		{
			$("a#InterviewPreview img").attr("src", "Images/Student/student_img_apply.jpg"); 
		}
	});

	$("#navInterview").click(function() {
		url = document.location.href;
		if (url.indexOf("Student.aspx") != -1)
		{
			OpenModuleInterview();
		}
		else
		{
			window.location = "Student.aspx?section=interview";
		}
	});

	$("#navInterview").mouseout(function() {
		HideNavigation();
		if ($.myVariable.section != "")
		{
			if ($('a#InterviewPreview img').attr('src') == "Images/Student/student_img_apply.jpg")
			{
				$("a#InterviewPreview img").attr("src", "Images/Student/student_img_apply_off.jpg"); 
			}
		} 		
	});

	//Student Life Nav
	$("#navStudentLife").mouseover(function() {
   		$("#navStudentLife").animate ({	top: "41px"	}, 75); 
		if ($('a#StudentLifePreview img').attr('src') == "Images/Student/student_img_life_off.jpg")
		{
			$("a#StudentLifePreview img").attr("src", "Images/Student/student_img_life.jpg"); 
		}   		
	});

	$("#navStudentLife").click(function() {
		url = document.location.href;
		if (url.indexOf("Student.aspx") != -1)
		{
			OpenModuleStudentLife();
		}
		else
		{
			window.location = "Student.aspx?section=life";
		}	
	});	

	$("#navStudentLife").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#StudentLifePreview img').attr('src') == "Images/Student/student_img_life.jpg")
			{
				$("a#StudentLifePreview img").attr("src", "Images/Student/student_img_life_off.jpg"); 
			}
		}   		
	});

	//Get Involved Nav
	$("#navGetInvolved").mouseover(function() {
   		$("#navGetInvolved").animate ({	top: "41px"	}, 75); 
		if ($('a#GetInvolvedPreview img').attr('src') == "Images/Student/student_img_involved_off.jpg")
		{
			$("a#GetInvolvedPreview img").attr("src", "Images/Student/student_img_involved.jpg"); 
		}    		
	});

	$("#navGetInvolved").click(function() {
		url = document.location.href;
		if (url.indexOf("Student.aspx") != -1)
		{
			OpenModuleGetInvolved();
		}
		else
		{
			window.location = "Student.aspx?section=involved";
		}	
	});	

	$("#navGetInvolved").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#GetInvolvedPreview img').attr('src') == "Images/Student/student_img_involved.jpg")
			{
				$("a#GetInvolvedPreview img").attr("src", "Images/Student/student_img_involved_off.jpg"); 
			}
		}   		
	});

	//Pay for School Nav
	$("#navPaySchool").mouseover(function() {
   		$("#navPaySchool").animate ({ top: "41px" }, 75); 
		if ($('a#PaySchoolPreview img').attr('src') == "Images/Student/student_img_pay_off.jpg")
		{
			$("a#PaySchoolPreview img").attr("src", "Images/Student/student_img_pay.jpg"); 
		}    		
	});

	$("#navPaySchool").click(function() {
		url = document.location.href;
		if (url.indexOf("Student.aspx") != -1)
		{
			OpenModulePaySchool();
		}
		else
		{
			window.location = "Student.aspx?section=pay";
		}	
	});		

	$("#navPaySchool").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#PaySchoolPreview img').attr('src') == "Images/Student/student_img_pay.jpg")
			{
				$("a#PaySchoolPreview img").attr("src", "Images/Student/student_img_pay_off.jpg"); 
			}
		}	    		
	});
		
	// EducationalResources Nav
	$("#navEducationalResources").mouseover(function() {
		$("#navEducationalResources").animate ({top: "40px"}, 75);
		if ($('a#EducationalResourcesPreview img').attr('src') == "Images/Educators/subNavEducational_out.jpg")
		{
			$("a#EducationalResourcesPreview img").attr("src", "Images/Educators/subNavEducational_normal.jpg"); 
		}
	});

	$("#navEducationalResources").click(function() {
		url = document.location.href;
		if (url.indexOf("Educators.aspx") != -1)
		{
			OpenModuleEducationalResources();
		}
		else
		{
			window.location = "Educators.aspx?section=educational";
		}
	});
	
	$("#navEducationalResources").mouseout(function() {
		HideNavigation();
		if ($.myVariable.section != "")
		{
			if ($('a#EducationalResourcesPreview img').attr('src') == "Images/Educators/subNavEducational_normal.jpg")
			{
				$("a#EducationalResourcesPreview img").attr("src", "Images/Educators/subNavEducational_out.jpg"); 
			}
		} 		
	});
	
	//Creative Learning
	$("#navCreativeLearning").mouseover(function() {
   		$("#navCreativeLearning").animate ({	top: "40px"	}, 75); 
		if ($('a#CreativeLearningPreview img').attr('src') == "Images/Educators/subNavLearning_out.jpg")
		{
			$("a#CreativeLearningPreview img").attr("src", "Images/Educators/subNavLearning_normal.jpg"); 
		}   		
	});

	$("#navCreativeLearning").click(function() {
		url = document.location.href;
		if (url.indexOf("Educators.aspx") != -1)
		{
			OpenModuleCreativeLearning();
		}
		else
		{
			window.location = "Educators.aspx?section=creative";
		}	
	});	

	$("#navCreativeLearning").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#CreativeLearningPreview img').attr('src') == "Images/Educators/subNavLearning_normal.jpg")
			{
				$("a#CreativeLearningPreview img").attr("src", "Images/Educators/subNavLearning_out.jpg"); 
			}
		}   		
	});
	
	//Student Scholarships
	$("#navScholarshipsEvents").mouseover(function() {
   		$("#navScholarshipsEvents").animate ({	top: "40px"	}, 75); 
		if ($('a#ScholarshipsEventsPreview img').attr('src') == "Images/Educators/subNavScholarships_out.jpg")
		{
			$("a#ScholarshipsEventsPreview img").attr("src", "Images/Educators/subNavScholarships_normal.jpg"); 
		}    		
	});

	$("#navScholarshipsEvents").click(function() {
		url = document.location.href;
		if (url.indexOf("Educators.aspx") != -1)
		{
			OpenModuleScholarshipsEvents();
		}
		else
		{
			window.location = "Educators.aspx?section=scholarships";
		}	
	});	

	$("#navScholarshipsEvents").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#ScholarshipsEventsPreview img').attr('src') == "Images/Educators/subNavScholarships_normal.jpg")
			{
				$("a#ScholarshipsEventsPreview img").attr("src", "Images/Educators/subNavScholarships_out.jpg"); 
			}
		}   		
	});
	
	//Culinary Resources
	$("#navCulinaryResources").mouseover(function() {
   		$("#navCulinaryResources").animate ({ top: "40px" }, 75); 
		if ($('a#CulinaryResourcesPreview img').attr('src') == "Images/Educators/subNavCulinary_out.jpg")
		{
			$("a#CulinaryResourcesPreview img").attr("src", "Images/Educators/subNavCulinary_normal.jpg"); 
		}    		
	});

	$("#navCulinaryResources").click(function() {
		url = document.location.href;
		if (url.indexOf("Educators.aspx") != -1)
		{
			OpenModuleCulinaryResources();
		}
		else
		{
			window.location = "Educators.aspx?section=culinary";
		}	
	});		

	$("#navCulinaryResources").mouseout(function() {
   		HideNavigation();
   		if ($.myVariable.section != "")
		{
			if ($('a#CulinaryResourcesPreview img').attr('src') == "Images/Educators/subNavCulinary_normal.jpg")
			{
				$("a#CulinaryResourcesPreview img").attr("src", "Images/Educators/subNavCulinary_out.jpg"); 
			}
		}	    		
	});

		
	// *** Home page Preview Image Events	
	$('#InterviewPreview').click(function()  
		{OpenModuleInterview();}
	);
		
	$('#StudentLifePreview').click(function()  
		{OpenModuleStudentLife();}
	);

	$('#GetInvolvedPreview').click(function()  
		{OpenModuleGetInvolved();}
	);

	$('#PaySchoolPreview').click(function()  
		{OpenModulePaySchool();}
	);
	
	$('#EducationalResourcesPreview').click(function()  
		{OpenModuleEducationalResources();}
	);
		
	$('#CreativeLearningPreview').click(function()  
		{OpenModuleCreativeLearning();}
	);

	$('#ScholarshipsEventsPreview').click(function()  
		{OpenModuleScholarshipsEvents();}
	);

	$('#CulinaryResourcesPreview').click(function()  
		{OpenModuleCulinaryResources();}
	);
	
	
	// *** Open Default Module Functions (per URL variable)
	function OpenDefaultModules()
	{
		url = document.location.href;
		ndx = url.indexOf ("?");
		if (ndx != -1)
		{
			queryStr  = url.substring (ndx + 1);
			if (queryStr.indexOf("section=interview") != -1)
			{
				OpenModuleInterview();
			}
			if (queryStr.indexOf("section=life") != -1)
			{
				OpenModuleStudentLife();
			}
			if (queryStr.indexOf("section=involved") != -1)
			{
				OpenModuleGetInvolved();
			}
			if (queryStr.indexOf("section=pay") != -1)
			{
				OpenModulePaySchool();
			}
			if (queryStr.indexOf("section=educational") != -1)
			{
				OpenModuleEducationalResources();
			}
			if (queryStr.indexOf("section=creative") != -1)
			{
				OpenModuleCreativeLearning();
			}
			if (queryStr.indexOf("section=scholarships") != -1)
			{
				OpenModuleScholarshipsEvents();
			}
			if (queryStr.indexOf("section=culinary") != -1)
			{
				OpenModuleCulinaryResources();
			}
		}
	}
	OpenDefaultModules();		
	
	


	// *** Open Module Functions

	function OpenModuleInterview()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "interview") 
		{
			$.myVariable.section = "interview";
			HideModules();  //Hide Modules 
			
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "100px",	left: "100px"}, 400);
				
			$("#InterviewFull").fadeIn('slow'); //Show Full Module
			$("#InterviewScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}	

	function OpenModuleStudentLife()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "life") 
		{
			$.myVariable.section = "life";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "100px",	left: "-100px"}, 400);

			$("#StudentLifeFull").fadeIn('slow');  //Show Full Module
			$("#StudentScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}

	function OpenModuleGetInvolved()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "involved") 
		{
			$.myVariable.section = "involved";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "-50px",left: "100px"}, 400);

			$("#GetInvolvedFull").fadeIn('slow');  //Show Full Module
			$("#GetInvolvedScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}
		
	function OpenModulePaySchool()
	{	
		HideOverlayedLayers();
		if ($.myVariable.section != "pay") 
		{
			$.myVariable.section = "pay";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "-50px",	left: "-100px"}, 400);

			$("#PaySchoolFull").fadeIn('slow');  //Show Full Module
			$("#PaySchoolScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}
	
	function OpenModuleEducationalResources()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "educational") 
		{
			$.myVariable.section = "educational";
			HideModules();  //Hide Modules 
			
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "100px",	left: "100px"}, 400);
				
			$("#EducationalResourcesFull").fadeIn('slow'); //Show Full Module
			$("#EducationalResourcesScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}	

	function OpenModuleCreativeLearning()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "creative") 
		{
			$.myVariable.section = "creative";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "100px",	left: "-100px"}, 400);

			$("#CreativeLearningFull").fadeIn('slow');  //Show Full Module
			$("#CreativeLearningScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}

	function OpenModuleScholarshipsEvents()
	{
		HideOverlayedLayers();
		if ($.myVariable.section != "scholarships") 
		{
			$.myVariable.section = "scholarships";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "-50px",left: "100px"}, 400);

			$("#ScholarshipsEventsFull").fadeIn('slow');  //Show Full Module
			$("#ScholarshipsEventsScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}
		
	function OpenModuleCulinaryResources()
	{	
		HideOverlayedLayers();
		if ($.myVariable.section != "culinary") 
		{
			$.myVariable.section = "culinary";
			HideModules();  //Hide Modules 
			$('#moduleContainer').animate  	//Move Module Container 
				({top: "-50px",	left: "-100px"}, 400);

			$("#CulinaryResourcesFull").fadeIn('slow');  //Show Full Module
			$("#CulinaryResourcesScrollPane").jScrollPane();
			
			HideNavigation(); // Hide Navigation
			ShowNavigation(); // Show Navigation
			ShowPreviewOffImages(); //. Show Preview Off state Images
			return false; 
		}
	}

});


// *** Hide Navigation	
HideNavigation = function()
{
	if ($.myVariable.section != "interview") 
	{ 
		$("#navInterview").animate ({top: "0"}, 75); 
	}
	
	if ($.myVariable.section != "life") 
	{ 
		$("#navStudentLife").animate ({top: "0"}, 75); 
	}
	
	if ($.myVariable.section != "involved") 
	{ 
		$("#navGetInvolved").animate ({top: "0"}, 75);
	}
	
	if ($.myVariable.section != "pay") 
	{
		$("#navPaySchool").animate ({top: "0"}, 75);  
	}

	if ($.myVariable.section != "educational") 
	{ 
		$("#navEducationalResources").animate ({top: "0"}, 75); 
	}
	
	if ($.myVariable.section != "creative") 
	{ 
		$("#navCreativeLearning").animate ({top: "0"}, 75); 
	}
	
	if ($.myVariable.section != "scholarships") 
	{ 
		$("#navScholarshipsEvents").animate ({top: "0"}, 75);
	}
	
	if ($.myVariable.section != "culinary") 
	{
		$("#navCulinaryResources").animate ({top: "0"}, 75);  
	}
}

// *** Show Navigation
ShowNavigation = function()
{
	if ($.myVariable.section == "interview") 
	{ 
		$("#navInterview").animate ({top: "41px"}, 75); 
	}
	
	if ($.myVariable.section == "life") 
	{ 
		$("#navStudentLife").animate ({top: "41px"}, 75); 
	}
	
	if ($.myVariable.section == "involved") 
	{ 
		$("#navGetInvolved").animate ({top: "41px"}, 75);
	}
	
	if ($.myVariable.section == "pay")
	{
		$("#navPaySchool").animate ({top: "41px"}, 75);  
	}

	if ($.myVariable.section == "educational") 
	{ 
		$("#navEducationalResources").animate ({top: "40px"}, 75); 
	}
	
	if ($.myVariable.section == "creative") 
	{ 
		$("#navCreativeLearning").animate ({top: "40px"}, 75); 
	}
	
	if ($.myVariable.section == "scholarships") 
	{ 
		$("#navScholarshipsEvents").animate ({top: "40px"}, 75);
	}
	
	if ($.myVariable.section == "culinary")
	{
		$("#navCulinaryResources").animate ({top: "40px"}, 75);  
	}

}

// *** Hide Student Preview Off Images / Setup Preview on/off states
ShowPreviewOffImages = function()
{
	$("a#InterviewPreview img").show();
	$("a#StudentLifePreview img").show();
	$("a#GetInvolvedPreview img").show();
	$("a#PaySchoolPreview img").show();
	$("a#EducationalResourcesPreview img").show();
	$("a#CreativeLearningPreview img").show();
	$("a#ScholarshipsEventsPreview img").show();
	$("a#CulinaryResourcesPreview img").show();
	
	if ($.myVariable.section != "interview") 
	{ 
		$("a#InterviewPreview img").attr("src", "Images/Student/student_img_apply_off.jpg"); 
		$("a#InterviewPreview img").hover(function() 
			{$(this).attr("src","Images/Student/student_img_apply.jpg"); }, function() 
			{$(this).attr("src","Images/Student/student_img_apply_off.jpg");
		});	
		
	}
	
	if ($.myVariable.section != "life") 
	{ 
		$("a#StudentLifePreview img").attr("src", "Images/Student/student_img_life_off.jpg"); 
		$("a#StudentLifePreview img").hover(function() 
			{$(this).attr("src","Images/Student/student_img_life.jpg"); }, function() 
			{$(this).attr("src","Images/Student/student_img_life_off.jpg");
		});
	
	}

	if ($.myVariable.section != "involved") 
	{
		$("a#GetInvolvedPreview img").attr("src", "Images/Student/student_img_involved_off.jpg"); 
		$("a#GetInvolvedPreview img").hover(function() 
			{$(this).attr("src","Images/Student/student_img_involved.jpg"); }, function() 
			{$(this).attr("src","Images/Student/student_img_involved_off.jpg");
		});	
	}
	
	if ($.myVariable.section == "pay") // written differently as preview needs to disapear for this particular image
	{
		$("a#PaySchoolPreview img").hide();
	}
	else
	{
		$("a#PaySchoolPreview img").attr("src", "Images/Student/student_img_pay_off.jpg"); 
		$("a#PaySchoolPreview img").hover(function() 
			{$(this).attr("src","Images/Student/student_img_pay.jpg"); }, function() 
			{$(this).attr("src","Images/Student/student_img_pay_off.jpg");
		});	
	}
	
	if ($.myVariable.section != "educational") 
	{ 
		$("a#EducationalResourcesPreview img").attr("src", "Images/Educators/subNavEducational_out.jpg"); 
		$("a#EducationalResourcesPreview img").hover(function() 
			{$(this).attr("src","Images/Educators/subNavEducational_normal.jpg"); }, function() 
			{$(this).attr("src","Images/Educators/subNavEducational_out.jpg");
		});	
		
	}
	
	if ($.myVariable.section != "creative") 
	{ 
		$("a#CreativeLearningPreview img").attr("src", "Images/Educators/subNavLearning_out.jpg"); 
		$("a#CreativeLearningPreview img").hover(function() 
			{$(this).attr("src","Images/Educators/subNavLearning_normal.jpg"); }, function() 
			{$(this).attr("src","Images/Educators/subNavLearning_out.jpg");
		});
	
	}

	if ($.myVariable.section != "scholarships") 
	{
		$("a#ScholarshipsEventsPreview img").attr("src", "Images/Educators/subNavScholarships_out.jpg"); 
		$("a#ScholarshipsEventsPreview img").hover(function() 
			{$(this).attr("src","Images/Educators/subNavScholarships_normal.jpg"); }, function() 
			{$(this).attr("src","Images/Educators/subNavScholarships_out.jpg");
		});	
	}
	
	if ($.myVariable.section == "culinary") // written differently as preview needs to disapear for this particular image
	{
		$("a#CulinaryResourcesPreview img").hide();
	}
	else
	{
		$("a#CulinaryResourcesPreview img").attr("src", "Images/Educators/subNavCulinary_out.jpg"); 
		$("a#CulinaryResourcesPreview img").hover(function() 
			{$(this).attr("src","Images/Educators/subNavCulinary_normal.jpg"); }, function() 
			{$(this).attr("src","Images/Educators/subNavCulinary_out.jpg");
		});	
	}
		
}


// *** Hide all Student Modules 

HideModules = function() 
{ 
	if ($('div#InterviewFull').is(':visible')) { 
    $('div#InterviewFull').fadeOut('fast'); 
    } 

	if ($('div#StudentLifeFull').is(':visible')) { 
    $('div#StudentLifeFull').fadeOut('fast'); 
    } 
    
    if ($('div#GetInvolvedFull').is(':visible')) { 
    $('div#GetInvolvedFull').fadeOut('fast'); 
    } 

	if ($('div#PaySchoolFull').is(':visible')) { 
    $('div#PaySchoolFull').fadeOut('fast'); 
    } 

    if ($('div#EducationalResourcesFull').is(':visible')) { 
    $('div#EducationalResourcesFull').fadeOut('fast'); 
    } 

	if ($('div#CreativeLearningFull').is(':visible')) { 
    $('div#CreativeLearningFull').fadeOut('fast'); 
    } 
    
    if ($('div#ScholarshipsEventsFull').is(':visible')) { 
    $('div#ScholarshipsEventsFull').fadeOut('fast'); 
    } 

	if ($('div#CulinaryResourcesFull').is(':visible')) { 
    $('div#CulinaryResourcesFull').fadeOut('fast'); 
    } 

} 


/*********************************************************************************************
	Interstitials
*********************************************************************************************/
var redirectPath = "";

function ShowInterstitial(urlPath)
{
	HideOverlayedLayers();
	redirectPath = urlPath;
	$('div#Interstitial').fadeIn('slow'); 
}

function HideInterstitial()
{
	$('div#Interstitial').fadeOut('slow'); 
}

function RedirectInterstitial()
{
	window.open(redirectPath, "AiAdvantage");
	HideInterstitial();
}

/*********************************************************************************************
	Interstitials Third Party
*********************************************************************************************/

function ShowInterstitialThirdParty(urlPath)
{
	HideOverlayedLayers();
	redirectPath = urlPath;
	$('div#InterstitialThirdParty').fadeIn('slow'); 
}

function HideInterstitialThirdParty()
{
	$('div#InterstitialThirdParty').fadeOut('slow'); 
}

function RedirectInterstitialThirdParty()
{
	window.open(redirectPath, "AiAdvantage");
	HideInterstitialThirdParty();
}


/*********************************************************************************************
	Request A Presentation at Your School
*********************************************************************************************/
function ShowInterstitialEducator(urlPath)
{
	HideOverlayedLayers();
	redirectPath = urlPath;
	$('div#requestPresentation').fadeIn('slow'); 
	$("#requestPresentationScrollPane").jScrollPane();
}

function HideInterstitialEducator()
{
	$('div#requestPresentation').fadeOut('slow'); 
}

/*********************************************************************************************
	Educator Interstitial
*********************************************************************************************/
function ShowEducatorInterstitial(urlPath)
{
	HideOverlayedLayers();
	redirectPath = urlPath;
	$('div#EducatorInterstitial').fadeIn('slow'); 
}

function HideEducatorInterstitial()
{
	$('div#EducatorInterstitial').fadeOut('slow'); 
}

/*********************************************************************************************
	Hide all Overlayed Layers
*********************************************************************************************/
function HideOverlayedLayers()
{
	$('div#EducatorInterstitial').fadeOut('fast'); 
	$('div#Interstitial').fadeOut('fast'); 
	$('div#InterstitialThirdParty').fadeOut('fast'); 
	$('div#requestPresentation').fadeOut('fast'); 
}





/*********************************************************************************************
	Popup window function
*********************************************************************************************/
function NewWindow(url, width, height)
{
    var popWin = window.open(url, '_blank', 'width=' + width + ',height=' + height + ',scrollbars=1,resizable=1');
    if (popWin != null)
    {
        popWin.focus();
    }
}

/*********************************************************************************************
	Bookmark function
*********************************************************************************************/
function AddBookmark()
{
	var BookmarkURL=document.URL;
	var BookmarkTitle=document.title;
	// If the browser is Internet Explorer
	if (document.all)
	{
	   // Add to Favorites (Internet Explorer)
	   window.external.AddFavorite(BookmarkURL,BookmarkTitle)
	}
	else
	{
	  // Add to Bookmarks (Mozilla Firefox)
	  window.sidebar.addPanel(BookmarkTitle, BookmarkURL, '');
	}
	
}

	