$(document).ready(function() {
Enlarged = false;
$('.wrapClass').addClass('main-content');
$('.menuText').hover(function(){
$(this).css({color:'#FFCC00'})
.css({cursor:'pointer'});
},function(){
$(this).css({color:'#FFFFFF'});
});
$('.JumpToNews').hover(function(){
$(this).addClass('Point');
},function(){
$(this).removeClass('Point');
});
$('.JumpToNews').click(function(){
var Page = this.id;
window.location = Page;
});
//This function is for the upper links Home, about us, contact us, site menu
$('.iconText').hover(function(){
$(this).addClass('UpperLinks');
},function(){
$(this).removeClass('UpperLinks');
});
//This function directs users to the homepage:
$('#HomePage').click(function(){
var Page = 'index.php';
window.location = Page;
});
//This function directs users to the about us page:
$('#AboutUs').click(function(){
var Page = 'pages.php?p=pages&id=64';
window.location = Page;
});
//This function directs users to the site map  page:
$('#Map').click(function(){
var Page = 'pages.php?p=Index_map';
window.location = Page;
});
//This function directs users to the contact us page:
$('#ContactUs').click(function(){
var Page = 'pages.php?p=pages&id=74';
window.location = Page;
});
//This function redirects based on changes in drop down menu:
$('#PhotoFolder').change(function(){
var y1 = document.getElementById("PhotoFolder");
var FolderID = y1.options[y1.selectedIndex].value; 
window.location = "pages.php?p=ImageGallery&Operation=ShowImages&FolderID="+FolderID+"&id=24";
});
/*$('img.gallery').click(function(){
$('div.SlideShow').empty();
var SRC = this.src;
var OldWidth = this.width;
var OldHeight = this.height;
var NewWidth = OldWidth*2;
var NewHeight = OldHeight*2;
var MyImages = "<img src='"+SRC+"'>";
$(MyImages).prependTo('div.SlideShow').hide()
.fadeIn('slow');
});*/
$('img.gallery').toggle(function(){
Enlarged = true;
ImageID = this.id;
var DivID = ImageID+"DIV";
var DivWrap = ImageID+"WRAP";
$('#'+DivID).hide('slow');
var OldWidth = this.width;
var OldHeight = this.height;
var NewWidth = OldWidth*2;
var NewHeight = OldHeight*2;
$(this).animate({left: '250px'}, 'slow')
.animate({height: NewHeight, width: NewWidth}, 'slow');
$('#'+DivWrap).removeClass('main-content');
$('#'+DivID).hide('slow');
},function(){
Enlarged = false;
ImageID = this.id;
var DivID = ImageID+"DIV";
var DivWrap = ImageID+"WRAP";
var OldWidth = this.width;
var OldHeight = this.height;
var NewWidth = OldWidth/2;
var NewHeight = OldHeight/2;
$(this).animate({height: NewHeight, width: NewWidth}, 'slow')
.animate({left: '0px'}, 'slow',function(){
$('#'+DivWrap).addClass('main-content');
});
});
$('img.gallery').hover(function(){
var ImageID = this.id;
var DivID = ImageID+"DIV";
var SpanID = ImageID+"SPAN";
if(!Enlarged)
{
$('#'+DivID).show('slow');
}
},function(){
var ImageID = this.id;
var DivID = ImageID+"DIV";
$('#'+DivID).hide('slow');
});
$('.IsPageNum').hover(function(){
$('.IsPageNum').addClass('Highlight'); 
},function(){
$('.IsPageNum').removeClass('Highlight');
});
$('span.DirectSearch').hover(function(){
$(this).addClass('HighlightandPoint'); 
},function(){
$(this).removeClass('HighlightandPoint');
});
$('span.DirectSearch').click(function(){
var Target = this.id;
window.open(Target);
});
$('span.DirectPageSearch').hover(function(){
$(this).addClass('HighlightandPoint'); 
},function(){
$(this).removeClass('HighlightandPoint');
});
$('span.DirectPageSearch').click(function(){
var Target = this.id;
var Location = "pages.php?p=pages&id="+Target+"&Operation=LinkPage";
window.open(Location);
});
$('input.MyButtons').hover(function(){
$(this).addClass('MyButtonsHighlight');
},function(){
$(this).removeClass('MyButtonsHighlight');
});
$('span.BackButton').hover(function(){
$(this).addClass('HighLightresearchers');
},function(){
$(this).removeClass('HighLightresearchers');
});
$('span.BackButton').click(function(){
var Location = this.id;
window.location = Location;
});
$('span.MyRNameR').hover(function(){
$(this).addClass('HighLightresearchers');
},function(){
$(this).removeClass('HighLightresearchers');
});
$('span.MyRNameR').click(function(){
var MyID = this.id;
var DivID = "Div"+MyID;
$('div#'+DivID).slideDown('slow');
});
$('span.CloseMe').hover(function(){
$(this).addClass('HighLightresearchers');
},function(){
$(this).removeClass('HighLightresearchers');
});
$('span.CloseMe').click(function(){
var MyID = this.id;
var DivID = "Div"+MyID;
$('div#'+DivID).slideUp('slow');
});
$('span.MyUniName').hover(function(){
$(this).addClass('HighLightresearchers');
},function(){
$(this).removeClass('HighLightresearchers');
});
$('span.MyUniName').click(function(){
var Location = this.id;
window.location = Location;
});
$('span.MyEngResearchName').hover(function(){
$(this).addClass('HighLightresearchers');
},function(){
$(this).removeClass('HighLightresearchers');
});
$('span.MyEngResearchName').click(function(){
var Location = this.id;
window.location = Location;
});
$('input#ShowRName').click(function(){
$('div.HideUName').fadeOut('slow');
$('div.HideEnglishResearchName').fadeOut('slow');
$('div.HideCollegeResearchName').fadeOut('slow');
$('div.HideDepgeResearchName').fadeOut('slow');
$('div.HideRName').fadeIn('slow');
});
$('input#ShowHideUName').click(function(){
$('div.HideRName').fadeOut('slow');
$('div.HideEnglishResearchName').fadeOut('slow');
$('div.HideCollegeResearchName').fadeOut('slow');
$('div.HideDepgeResearchName').fadeOut('slow');
$('div.HideUName').fadeIn('slow');
});
$('input#ShowEnglishResearch').click(function(){
$('div.HideRName').fadeOut('slow');
$('div.HideUName').fadeOut('slow');
$('div.HideCollegeResearchName').fadeOut('slow');
$('div.HideDepgeResearchName').fadeOut('slow');
$('div.HideEnglishResearchName').fadeIn('slow');
});
$('input#ShowCollegeResearch').click(function(){
$('div.HideRName').fadeOut('slow');
$('div.HideUName').fadeOut('slow');
$('div.HideEnglishResearchName').fadeOut('slow');
$('div.HideDepgeResearchName').fadeOut('slow');
$('div.HideCollegeResearchName').fadeIn('slow');
});
$('input#ShowDepResearch').click(function(){
$('div.HideRName').fadeOut('slow');
$('div.HideUName').fadeOut('slow');
$('div.HideEnglishResearchName').fadeOut('slow');
$('div.HideCollegeResearchName').fadeOut('slow');
$('div.HideDepgeResearchName').fadeIn('slow');
});
$('div#ArabicSite').click(function(){
window.location = "./HCArabic";
});
});