$(document).ready(function(){
$("#popTag-1").hover(function(){
  setTimeout(function(){LoadChild2('1')},10);
//  setTimeout('chk();',1);

});	

$("#popTag-3").hover(function(){
  setTimeout(function(){LoadChild2('3')},10);
});	
$("#popTag-4").hover(function(){
  setTimeout(function(){LoadChild2('4')},10);
});
$("#popTag-7").hover(function(){
  setTimeout(function(){LoadChild2('7')},10);
});
$("#popTag-8").hover(function(){
  setTimeout(function(){LoadChild2('8')},10);
});
$("#popTag-6").hover(function(){
 if (document.getElementById('lblActionCountry'))
 {		
 if (document.getElementById('lblActionCountry').innerHTML == 'USA' )
 {
	 
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag5.png';
	 document.getElementById('lblActionCountry').innerHTML = 'USA';
	
 }
 else
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tagnusn.png';
	 document.getElementById('lblActionCountry').innerHTML = '';
	
 }
 }
 
if (document.getElementById('lblActionCountry1'))
 {		
 if (document.getElementById('lblActionCountry1').innerHTML == 'USA' )
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag5.png';
	 document.getElementById('lblActionCountry1').innerHTML = 'USA';
	
 }
 else
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tagnusn.png';
	 document.getElementById('lblActionCountry1').innerHTML = '';
 }
 }
 
 });
 $("#popTag-5").hover(function(){
 if (document.getElementById('lblActionCountry'))
 {

 if (document.getElementById('lblActionCountry').innerHTML == 'USA' )
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag5.png';
	 document.getElementById('lblActionCountry').innerHTML = 'USA';
 }
 else
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tagnusn.png';
	 document.getElementById('lblActionCountry').innerHTML = '';
 }
 }
 
  if (document.getElementById('lblActionCountry1'))
 {

 if (document.getElementById('lblActionCountry1').innerHTML == 'USA' )
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag5.png';
	 document.getElementById('lblActionCountry1').innerHTML = 'USA';
	 
 }
 else
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tagnusn.png';
	 document.getElementById('lblActionCountry1').innerHTML = '';
 }
 }
 
}); 
  $("#popTag-12").hover(function(){

 if (document.getElementById('lblActionCountry2').innerHTML == 'USA' )
 {

	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag-home-us.png'
	 document.getElementById('lblActionCountry2').innerHTML = 'USA'



 }
 else
 {
	 document.getElementById('over-5').src = '/Images/R-Boxes/read-tag-home.png'
	 
	 document.getElementById('lblActionCountry2').innerHTML = ''

 }
});


//Sample : Popups(PopUp id, L or R, hover image, close button id, Margin Top, Extra Top , Extra Left){
$('#popTag-1').Popups('popover-1', 'L', 'over-1', 'over-close', 30, -5, 8);
$('#popTag-2').Popups('popover-2', 'L', 'over-2', 'over-closecontact', 30, -5, 16);
$('#popTag-3').Popups('popover-1', 'L', 'over-3', 'imgclose2', 150, -5, 10);
$('#popTag-4').Popups('popover-1', 'L', 'over-4', 'imgclose2', 100, -5, 30);
$('#popTag-5').Popups('popover-5', 'T', 'over-5', 'over-closepop', 184, 0, 90);
$('#popTag-6').Popups('popover-5', 'T', 'over-5', 'over-closepop', 184, 0, 90);
$('#popTag-7').Popups('popover-1', 'L', 'over-4', 'imgclose2', 100, -5, 30);
$('#popTag-8').Popups('popover-1', 'L', 'over-3', 'imgclose2', 150, -5, -7);
$('#popTag-12').Popups('popover-5', 'T', 'over-5', 'over-closepop', 184, -6, 90);
});




function LoadChild2(chk)
{




	var a="";
	var a=chk;
	var heading;
	var body;
	heading = document.getElementById("textname");
		body = document.getElementById("divText");
				heading.innerHTML = "";
	if(heading!=null)
	{
		//alert(a);
		
		 if(a=='1')
		{
			heading.innerHTML = "Request Information";
			body.innerHTML = "to request information from MUST High School.";
		}
		 if(a=='3')
		{
			heading.innerHTML = "Request Program Guide";
			body.innerHTML = "to download our detailed program guide.";
		}
    	 if(a=='4')
		{
			heading.innerHTML = "Request Information";
			body.innerHTML = "to request information from MUST High School.";
		}
		if(a=='7')
		{
			heading.innerHTML = "Request Information";
			body.innerHTML = "to request information from MUST High School.";
		}
		if(a=='8')
		{
			heading.innerHTML = "Request Program Guide";
			body.innerHTML = "to download our detailed program guide.";
		}

		
		
	}
	var hdfpopup = document.getElementById('hdfpopup');
	if(hdfpopup.value=='0')
	{
		var RequestInfoPopOverIFrame = document.getElementById("RequestInfoPopOverIFrame");
		if (!RequestInfoPopOverIFrame.src)
			RequestInfoPopOverIFrame.src = "/preapplication/requestinformation/RequestInfoPopover.aspx";
	
			hdfpopup.value='1';
	}

}

	 $(window).load(function () {
	 $("#NewsDiv").slideUp();
	});

        function ToggleNewsDiv() {
            $('#NewsDiv').slideToggle("slow");
            if ($('#NewsDivState').attr("value") == "0") {
                $('#NewsArrowDown').attr("src", "/images/uparrow.png");
                $('#NewsDivState').attr("value", "1");
				//$('#NewsDivState').attr("overflow", "visible");
            }
            else {
                $('#NewsArrowDown').attr("src", "/images/down-arrow.png");
                $('#NewsDivState').attr("value", "0");
				//$('#NewsDivState').attr("overflow", "hidden");
            }
        }
