$(document).ready(function(){
	
	// scroll
	$(function()
	{
		// this initialises the demo scollpanes on the page.
		$('#pane2').jScrollPane({showArrows:true, scrollbarWidth: 11, arrowSize: 10, });
		$('#pane3').jScrollPane({showArrows:true, scrollbarWidth: 11, arrowSize: 10, });
	});
	
	// colorbox
	$(".login").colorbox({width:"400px", inline:true, href:"#login"});
	$("#signup_").colorbox({width:"400px", inline:true, href:"#signup"});
	// $(".more").colorbox({width:"620px", inline:true, href:"#contact"});
	// end colorbox
	
	
	// for login
	$("#login_button").click
	(		
		function()
		{
			var loginDetails 	= new Array();
			loginDetails		= getLoginDetails();
			sendData(loginDetails);			
		}
	);
	
	function getLoginDetails()
	{
		var data_array	= new Array();
		var user_type	= $("#user_type").val();
		var email		= $("#email").val();
		var password	= $("#password").val();
		
		data_array.push(user_type, email, password);
		return data_array;		
	}
	
	function sendData(loginDetails)
	{
		$.ajax({
			url: "./handler/login.php",
			type: "POST",
			data: {'login' : loginDetails},
			error: function(data){
				console.log(data);
			},
			success: function(data){		
				window.location.replace("index.php");
				$.colorbox.close();				
			}
		});	
	}
	// end login
	
	// hall of fame
	$(".hofi").hover(
		function () {
			$(this).next().show();
			$(this).next().fadeTo("fast",0.9);
		},
		function () {
			$(this).next().hide();
		}
	);
	// end hall of fame
			
	// learn more	
	$("#more_button").click
	(		
		function()
		{
			var learnMoreDetails 	= new Array();
			learnMoreDetails		= getLearnMoreDetails();
			if( learnMoreDetails != false){			
				$("#contact").hide();
				// $('#cboxLoadingOverlay, #cboxLoadingGraphic').show(); 
				sendDataLearnMore(learnMoreDetails);			
			}
		}
	);	
	function getLearnMoreDetails()
	{
		
		var data_array	= new Array();
		
		var fname		= $("#fname").val();
		if( fname == ''){
			$('#fname').css('border','1px solid #EAD3E3');
			$('#fname').css('background','#F6EFF4');
			alert('Ooops! There is a problem! Please provide your first name.');
			return false;
		}	else{
			$('#fname').css('border','1px solid #D5D7D8');
			$('#fname').css('background','#F5F7F7');
		}
		
		var lname		= $("#lname").val();
		if( lname == ''){
			$('#lname').css('border','1px solid #EAD3E3');
			$('#lname').css('background','#F6EFF4');
			alert('Ooops! There is a problem! Please provide your last name.');
			return false;
		}	else{
			$('#lname').css('border','1px solid #D5D7D8');
			$('#lname').css('background','#F5F7F7');
		}
		
		var address		= $("#address").val();		
		var country		= $("#country").val();
		if( country == ''){
			$('#country').css('border','1px solid #EAD3E3');
			$('#country').css('background','#F6EFF4');
			alert('Ooops! There is a problem! You must select a country.');
			return false;
		}	else{
			$('#country').css('border','1px solid #D5D7D8');
			$('#country').css('background','#F5F7F7');
		}
		
		var email		= $("#email-contact").val();		
		if( email == ''){
			$('#email-contact').css('border','1px solid #EAD3E3');
			$('#email-contact').css('background','#F6EFF4');
			alert('Ooops! There is a problem! You must provide an email address.');
			return false;
		}	else{
			$('#email-contact').css('border','1px solid #D5D7D8');
			$('#email-contact').css('background','#F5F7F7');
		}
		var emailcb		= $("#emailcb:checked").val()
		
		var mobile		= $("#mobile").val();		
		var mobilecb	= $("#mobilecb:checked").val()
		
		var landline	= $("#landline").val();		
		var landlinecb	= $("#landlinecb:checked").val()
		
		var skype		= $("#skype").val();		
		var skypecb		= $("#skypecb:checked").val()
		
		var hour		= $("#hour").val();
		var ampm		= $("#ampm").val();
		var month		= $("#month").val();
		var day			= $("#day").val();
		var year		= $("#year").val();

		var time_		= year+'-'+month+'-'+day+' '+hour+':'+ampm;
		
		var learn		= $("#learn").val();
		if( learn == 'Select'){
			$('#learn').css('border','1px solid #EAD3E3');
			$('#learn').css('background','#F6EFF4');
			alert('Ooops! There is a problem! You must provide more info field.');
			return false;
		}	else{
			$('#learn').css('border','1px solid #D5D7D8');
			$('#learn').css('background','#F5F7F7');
		}
		var message		= $("#message").val();
		
		
		
		data_array.push(fname, lname, address, country, email);
		
		if( mobilecb == 'on' ){
			data_array.push(mobile);
		} else {
			mobile = 'none';
			data_array.push(mobile);
		}
			
			
		if( landlinecb == 'on' ){
			data_array.push(landline);
		} else{
			landline = 'none';
			data_array.push(landline);
		}
		
		if( skypecb == 'on' ){
			data_array.push(skype);
		} else{
			skype = 'none';
			data_array.push(skype);	
		}
			
		data_array.push(time_,learn, message);
			
		return data_array;
	}
	function sendDataLearnMore(learnMoreDetails)
	{
		$.ajax({
			url: "query",
			type: "POST",
			data: {'learnmore' : learnMoreDetails},
			error: function(data){
				console.log('ERROR: '+data);
			},
			success: function(data){		
				//window.location.replace("home.php");
				$('#thank-you-msg').show();
				console.log('SUCCESS: '+data);
				// $('#cboxLoadingOverlay, #cboxLoadingGraphic').hide(); 
				// $.colorbox({ html: "Thank you.", width: 500, opacity: 0.8 }); 
				// console.log(data);
				//$.colorbox.close();				
			}
		});	
	}
	
	// bottom_detail hover
	$(".bottom_label1").hover(
		function () {
			$("#label1").hide();
			$("#label2").hide();
			$("#label3").hide();
			$("#label4").hide();
			$("#label1_hid").show();
			//$("#hof1_hid").fadeTo("fast",0.9);
		},
		function () {
			$("#label1_hid").hide();
			$("#label1").show();
			$("#label2").show();
			$("#label3").show();
			$("#label4").show();
			//$("#hof1_hid").hide();
		}
	);
	
	$(".bottom_label2").hover(
		function () {
			$("#label1").hide();
			$("#label2").hide();
			$("#label3").hide();
			$("#label4").hide();
			$("#label2_hid").show();
			//$("#hof1_hid").fadeTo("fast",0.9);
		},
		function () {
			$("#label2_hid").hide();
			$("#label1").show();
			$("#label2").show();
			$("#label3").show();
			$("#label4").show();
			//$("#hof1_hid").hide();
		}
	);
	
	$(".bottom_label3").hover(
		function () {
			$("#label1").hide();
			$("#label2").hide();
			$("#label3").hide();
			$("#label4").hide();
			$("#label3_hid").show();
			//$("#hof1_hid").fadeTo("fast",0.9);
		},
		function () {
			$("#label3_hid").hide();
			$("#label1").show();
			$("#label2").show();
			$("#label3").show();
			$("#label4").show();
			//$("#hof1_hid").hide();
		}
	);
	
	$(".bottom_label4").hover(
		function () {
			$("#label1").hide();
			$("#label2").hide();
			$("#label3").hide();
			$("#label4").hide();
			$("#label4_hid").show();
			//$("#hof1_hid").fadeTo("fast",0.9);
		},
		function () {
			$("#label4_hid").hide();
			$("#label1").show();
			$("#label2").show();
			$("#label3").show();
			$("#label4").show();
			//$("#hof1_hid").hide();
		}
	);
			
	/*** navs ***/
	$("#school").hover(
		function () {
			//$(".hof_full").css('z-index', '-1');
			$("#school_sublink").show();	
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});			
		},
		function () {
			$("#school_sublink").hide();
		//	$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	$("#school_active").hover(
		function () {
		//	$(".hof_full").css('z-index', '-1');
			$("#school_sublink").show();	
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});			
		},
		function () {
			$("#school_sublink").hide();
		//	$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	$("#validations").hover(
		function () {
			//$(".hof_full").css('z-index', '-1');
			$("#val_sublink").show();
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});				
		},
		function () {
			$("#val_sublink").hide();
			//$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	$("#validations_active").hover(
		function () {
			// $(".hof_full").css('z-index', '-1');
			$("#val_sublink").show();
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});				
		},
		function () {
			$("#val_sublink").hide();
			//$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	$("#admissions").hover(
		function () {
			//$(".hof_full").css('z-index', '-1');
			$("#admission_sublink").show();
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});				
		},
		function () {
			$("#admission_sublink").hide();
			//$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	$("#admissions_active").hover(
		function () {
			$(".hof_full").css('z-index', '-1');
			$("#admission_sublink").show();
			
			$('.hof_full').css('z-index', function(index, value) {
				console.log('show value: '+value);
			});				
		},
		function () {
			$("#admission_sublink").hide();
			$(".jScrollPaneContainer").css('z-index', '1');
			$('.jScrollPaneContainer').css('z-index', function(index, value) {
				console.log('hide value: '+value);
			});
		}
	);
	
	
	
	// validation auto scroll
	$('#top_val').click( 
		function()
		{
			var targetOffset = $("#topS_val").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);			
		} 		
	);
	$('#sub1_val').click( 
		function()
		{
			var targetOffset = $("#sub1S_val").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
		} 		
	);
	$('#sub1_link1').click( 
		function()
		{
			var targetOffset = $("#sub1S_link1").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt1').show();
		} 		
	);
	$('#sub1_link2').click( 
		function()
		{
			var targetOffset = $("#sub1S_link2").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt2').show();
		} 		
	);
	$('#sub2_val').click( 
		function()
		{
			var targetOffset = $("#sub2S_val").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
		} 		
	);
	$('#sub2_link1').click( 
		function()
		{
			var targetOffset = $("#sub2S_val").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt3').show();
		} 		
	);
	$('#sub2_link2').click( 
		function()
		{
			var targetOffset = $("#sub2S_link2").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt4').show();
		} 		
	);
	$('#sub2_link3').click( 
		function()
		{
			var targetOffset = $("#sub2S_link3").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt5').show();
		} 		
	);
	$('#sub2_link4').click( 
		function()
		{
			var targetOffset = $("#sub2S_link4").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt6').show();
		} 		
	);
	$('#sub2_link5').click( 
		function()
		{
			var targetOffset = $("#sub2S_link5").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt7').show();
		} 		
	);
	$('#sub2_link6').click( 
		function()
		{
			var targetOffset = $("#sub2S_link6").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt8').show();
		} 		
	);
	
	
	// admission auto scroll
	$('#top_ad1').click( 
		function()
		{
			var targetOffset = $("#topS_ad1").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt1').show();
		} 		
	);
	$('#top_ad2').click( 
		function()
		{
			var targetOffset = $("#topS_ad2").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt2').show();
		} 		
	);
	$('#top_ad3').click( 
		function()
		{
			var targetOffset = $("#topS_ad3").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt3').show();
		} 		
	);
	
	// about auto scroll
	$('#top_ad1').click( 
		function()
		{
			var targetOffset = $("#topS_ad1").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt1').show();
		} 		
	);
	$('#top_ad2').click( 
		function()
		{
			var targetOffset = $("#topS_ad2").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt2').show();
		} 		
	);
	$('#top_ad3').click( 
		function()
		{
			var targetOffset = $("#topS_ad3").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt3').show();
		} 		
	);
	$('#top_ad4').click( 
		function()
		{
			alert('hey');
			var targetOffset = $("#topS_ad4").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt4').show();
		} 		
	);
	$('#top_ad5').click( 
		function()
		{
			var targetOffset = $("#topS_ad5").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt5').show();
		} 		
	);
	
	// back to top
	$('.btt1').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt1').hide();
		} 		
	);
	$('.btt2').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt2').hide();
		} 		
	);
	$('.btt3').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt3').hide();
		} 		
	);
	$('.btt4').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt4').hide();
		} 		
	);
	$('.btt5').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt5').hide();
		} 		
	);
	$('.btt6').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt6').hide();
		} 		
	);
	$('.btt7').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt7').hide();
		} 		
	);
	$('.btt8').click( 
		function()
		{			
			var targetOffset = $(".private").offset().top;	
			$('html,body').animate({scrollTop: targetOffset}, 1);
			$('.btt8').hide();
		} 		
	);
	
	/** About CIE accordion **/
	$('#minVision').click( 
		function()
		{
			$('#maxVision').show();
			$('#minVision').hide();
			$('#vision').slideUp('fast');
		} 		
	);
	$('#maxVision').click( 
		function()
		{
			var targetOffset = $("#visionUp").offset().top;
			
			$('#maxVision').hide();
			$('#minVision').show();
			$('#vision').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}		
			);
		} 		
	);
	
	$('#maxHist').click( 
		function()
		{
			var targetOffset = $("#historyUp").offset().top;
			
			$('#maxHist').hide();
			$('#minHist').show();
			$('#history').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
		} 		
	);
	$('#minHist').click( 
		function()
		{
			$('#maxHist').show();
			$('#minHist').hide();
			$('#history').slideUp('fast');
		} 		
	);
	
	$('#maxFounder').click( 
		function()
		{
			var targetOffset = $("#founderUp").offset().top;
			
			$('#maxFounder').hide();
			$('#minFounder').show();
			$('#founder').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
		} 		
	);
	$('#minFounder').click( 
		function()
		{
			$('#maxFounder').show();
			$('#minFounder').hide();
			$('#founder').slideUp('fast');
		} 		
	);
	
	$('#maxAdvocacy').click( 
		function()
		{
			var targetOffset = $("#advocacyUp").offset().top;				
			
			$('#maxAdvocacy').hide();
			$('#minAdvocacy').show();
			
			$('#advocacy').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	/* hash */
	if(window.location.hash == '#pearl'){
			var targetOffset = $("#advocacyUp").offset().top;				
			
			$('#maxAdvocacy').hide();
			$('#minAdvocacy').show();
			
			$('#advocacy').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	if(window.location.hash == '#ie'){
			var targetOffset = $("#internationalUp").offset().top;				
			
			$('#maxInt').hide();
			$('#minInt').show();
			
			$('#international').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	if(window.location.hash == '#ee'){
			var targetOffset = $("#esolUp").offset().top;				
			
			$('#maxEsol').hide();
			$('#minEsol').show();
			
			$('#esol').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	if(window.location.hash == '#er'){
			var targetOffset = $("#requireUp").offset().top;				
			
			$('#maxReq').hide();
			$('#minReq').show();
			
			$('#requirements').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	if(window.location.hash == '#pa'){
			var targetOffset = $("#procedureUp").offset().top;				
			
			$('#maxProc').hide();
			$('#minProc').show();
			
			$('#procedure').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	if(window.location.hash == '#df'){
			var targetOffset = $("#downloadUp").offset().top;				
			
			$('#maxDl').hide();
			$('#minDl').show();
			
			$('#download').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);
	}
	
	$('#minAdvocacy').click( 
		function()
		{
			$('#maxAdvocacy').show();
			$('#minAdvocacy').hide();
			$('#advocacy').slideUp('fast');
		} 		
	);
	
	/** Admission accordion **/
	
	$('#maxReq').click( 
		function()
		{
			var targetOffset = $("#requireUp").offset().top;				
			
			$('#maxReq').hide();
			$('#minReq').show();
			
			$('#requirements').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minReq').click( 
		function()
		{
			$('#maxReq').show();
			$('#minReq').hide();
			$('#requirements').slideUp('fast');
		} 		
	);
	
	$('#maxProc').click( 
		function()
		{
			var targetOffset = $("#procedureUp").offset().top;				
			
			$('#maxProc').hide();
			$('#minProc').show();
			
			$('#procedure').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minProc').click( 
		function()
		{
			$('#maxProc').show();
			$('#minProc').hide();
			$('#procedure').slideUp('fast');
		} 		
	);
	
	$('#maxDl').click( 
		function()
		{
			var targetOffset = $("#downloadUp").offset().top;				
			
			$('#maxDl').hide();
			$('#minDl').show();
			
			$('#download').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minDl').click( 
		function()
		{
			$('#maxDl').show();
			$('#minDl').hide();
			$('#download').slideUp('fast');
		} 		
	);
	
	/** Validation accordion **/
	
	$('#maxInt').click( 
		function()
		{
			var targetOffset = $("#internationalUp").offset().top;				
			
			$('#maxInt').hide();
			$('#minInt').show();
			
			$('#international').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minInt').click( 
		function()
		{
			$('#maxInt').show();
			$('#minInt').hide();
			$('#international').slideUp('fast');
		} 		
	);
	
	$('#maxIntSub1').click( 
		function()
		{
			var targetOffset = $("#internationalUpSub1").offset().top;				
			
			$('#maxIntSub1').hide();
			$('#minIntSub1').show();
			
			$('#internationalSub1').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minIntSub1').click( 
		function()
		{
			$('#maxIntSub1').show();
			$('#minIntSub1').hide();
			$('#internationalSub1').slideUp('fast');
		} 		
	);
	
	$('#maxIntSub2').click( 
		function()
		{
			var targetOffset = $("#internationalUpSub2").offset().top;				
			
			$('#maxIntSub2').hide();
			$('#minIntSub2').show();
			
			$('#internationalSub2').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minIntSub2').click( 
		function()
		{
			$('#maxIntSub2').show();
			$('#minIntSub2').hide();
			$('#internationalSub2').slideUp('fast');
		} 		
	);
	
	$('#maxEsol').click( 
		function()
		{
			var targetOffset = $("#esolUp").offset().top;				
			
			$('#maxEsol').hide();
			$('#minEsol').show();
			
			$('#esol').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsol').click( 
		function()
		{
			$('#maxEsol').show();
			$('#minEsol').hide();
			$('#esol').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub1').click( 
		function()
		{
			var targetOffset = $("#esolUpSub1").offset().top;				
			
			$('#maxEsolSub1').hide();
			$('#minEsolSub1').show();
			
			$('#esolSub1').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub1').click( 
		function()
		{
			$('#maxEsolSub1').show();
			$('#minEsolSub1').hide();
			$('#esolSub1').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub2').click( 
		function()
		{
			var targetOffset = $("#esolUpSub2").offset().top;				
			
			$('#maxEsolSub2').hide();
			$('#minEsolSub2').show();
			
			$('#esolSub2').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub2').click( 
		function()
		{
			$('#maxEsolSub2').show();
			$('#minEsolSub2').hide();
			$('#esolSub2').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub3').click( 
		function()
		{
			var targetOffset = $("#esolUpSub3").offset().top;				
			
			$('#maxEsolSub3').hide();
			$('#minEsolSub3').show();
			
			$('#esolSub3').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub3').click( 
		function()
		{
			$('#maxEsolSub3').show();
			$('#minEsolSub3').hide();
			$('#esolSub3').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub4').click( 
		function()
		{
			var targetOffset = $("#esolUpSub4").offset().top;				
			
			$('#maxEsolSub4').hide();
			$('#minEsolSub4').show();
			
			$('#esolSub4').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub4').click( 
		function()
		{
			$('#maxEsolSub4').show();
			$('#minEsolSub4').hide();
			$('#esolSub4').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub5').click( 
		function()
		{
			var targetOffset = $("#esolUpSub5").offset().top;				
			
			$('#maxEsolSub5').hide();
			$('#minEsolSub5').show();
			
			$('#esolSub5').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub5').click( 
		function()
		{
			$('#maxEsolSub5').show();
			$('#minEsolSub5').hide();
			$('#esolSub5').slideUp('fast');
		} 		
	);
	
	$('#maxEsolSub6').click( 
		function()
		{
			var targetOffset = $("#esolUpSub6").offset().top;				
			
			$('#maxEsolSub6').hide();
			$('#minEsolSub6').show();
			
			$('#esolSub6').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minEsolSub6').click( 
		function()
		{
			$('#maxEsolSub6').show();
			$('#minEsolSub6').hide();
			$('#esolSub6').slideUp('fast');
		} 		
	);
	
	/** Milestones accordion **/
	$('#maxEng').click( 
		function()
		{
			var targetOffset = $("#englishUp").offset().top;				
			
			$('#maxEng').hide();
			$('#minEng').show();
			
			$('#english').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}				
			);
			
		} 		
	);
	
	$('#minEng').click( 
		function()
		{
			$('#maxEng').show();
			$('#minEng').hide();
			$('#english').slideUp('fast');
		} 		
	);	

	$('#maxLang').click( 
		function()
		{
			var targetOffset = $("#langUp").offset().top;				
			
			$('#maxLang').hide();
			$('#minLang').show();
			
			$('#lang').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#minLang').click( 
		function()
		{
			$('#maxLang').show();
			$('#minLang').hide();
			$('#lang').slideUp('fast');
		} 		
	);	
	
	
	/* graduate accordion */
	$('#max1').click( 
		function()
		{
			var targetOffset = $("#oneUp").offset().top;				
			
			$('#max1').hide();
			$('#min1').show();
			
			$('#one').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#min1').click( 
		function()
		{
			$('#max1').show();
			$('#min1').hide();
			$('#one').slideUp('fast');
		} 		
	);
	
	$('#max2').click( 
		function()
		{
			var targetOffset = $("#twoUp").offset().top;				
			
			$('#max2').hide();
			$('#min2').show();
			
			$('#two').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#min2').click( 
		function()
		{
			$('#max2').show();
			$('#min2').hide();
			$('#two').slideUp('fast');
		} 		
	);
	
	$('#max3').click( 
		function()
		{
			var targetOffset = $("#threeUp").offset().top;				
			
			$('#max3').hide();
			$('#min3').show();
			
			$('#three').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#min3').click( 
		function()
		{
			$('#max3').show();
			$('#min3').hide();
			$('#three').slideUp('fast');
		} 		
	);
	
	$('#max4').click( 
		function()
		{
			var targetOffset = $("#fourUp").offset().top;				
			
			$('#max4').hide();
			$('#min4').show();
			
			$('#four').slideDown('fast',
				function()
				{
					$('html,body').animate({scrollTop: targetOffset}, 1000);
				}
			);						
		} 		
	);
	
	$('#min4').click( 
		function()
		{
			$('#max4').show();
			$('#min4').hide();
			$('#four').slideUp('fast');
		} 		
	);	
	
		
});

