var height1 = 0;
var height2 = 0;
var top1 =0;
var top2 =0;
$(document).ready(function(){
   height1 = $("#slide1").height();
   height2 = $("#slide2").height();	 
   top1 = -(height1);
   top2 = -(height2);
   
	$("#slide1").css({top:top1});
	$("#slide2").css({top:top2});
	
	$("#announcement").toggle(function(){
		
		$("#slide1").animate({top:8},"slow","easeOutBack");
			
	},function(){
		$("#slide1").animate({top:top1},"fast","easeInBack");
	});

	$("#moreinfo").toggle(function(){
		
		$("#slide2").animate({top:8},"slow","easeOutBack");
			
	},function(){
		$("#slide2").animate({top:top2},"fast","easeInBack");
	});



	$("#announcement").hover(function(){
	    $(this).css({backgroundPosition: '0px -32px'});
	},function(){	
		 $(this).css({backgroundPosition: '0px 0px'});
		});
	
	$("#moreinfo").hover(function(){
	    $(this).css({backgroundPosition: '0px -32px'});
	},function(){	
		 $(this).css({backgroundPosition: '0px 0px'});
		});
	
	//$(document).pngFix();
	
	 //$("div.rotator").cycle({fx:'fade',timeout:5000,cleartypeNoBg: 'true'});
		$("#rotator").cycle({fx:'fade',timeout:5000,pager:'#nav',pagerEvent: 'mouseover',fastOnEvent: true});
	$("#nav > a").after('<div class="space"></div>');	
	
	$(".iframe").fancybox({
	
	'frameWidth'  : 950,
	'frameHeight' : 455
	
	}); 
	
	$(".iframe2").fancybox({
	
	'frameWidth'  : 715,
	'frameHeight' : 461
	
	}); 
	
	$(".iframe3").fancybox({
	
	'frameWidth'  : 910,
	'frameHeight' : 461
	
	}); 
	
	

	
	
});

function mload(toload){
		var add = toload;
		$("#corpinfoframe").attr('src',toload);
	
	}
function mload2(toload){
		var add = toload;
		$("#careerframe").attr('src',toload);
	
	}
function clicker(whattoclick){
var clickthis = "#"+ whattoclick;

$(clickthis).click();


};

function confirmation(myrel){
	var r=confirm("Have you installed the digital certificates? Press Ok if you have, Cancel if you have not. The site will not work properly without the digital certificates. DO NOT upload your resume and scanned documents under the Attachment tab. Only your scanned profile photo (max 30KB) is required.");
	if (r==true)
	{
		window.open(myrel,"_blank");
	}
	else
	{
		mload2("cert.html");
	}
}
