 $(document).ready(function(){
// Your code here

// variable of pane height
var paneHeight = $(".pane").height();

// onLoad, makes centers and committees slide down
$("div#centers").animate({
		marginTop: 260,
		height: 37
		}, 1500,
		function(){
		   $("div#centers h2 a").addClass("up");
		}
);
	
$("div#committees").animate({
		marginTop: 260,
		height: 37
		}, 1500,
		function(){
		   $("div#committees h2 a").addClass("up");
		}
);

// remaining functionality for slideys
$("div#centers h2 a").toggle(
	function() {
		 $("div#centers").animate({
			marginTop: 297 - paneHeight,
			height: 37 + paneHeight
			}, 800,
			function(){
			   $("div#centers h2 a").removeClass("up");
			}
		 );
	},
	function() {
		 $("div#centers").animate({
			marginTop: 260,
			height: 37
			}, 800, 
			function(){
			   $("div#centers h2 a").addClass("up");
			}
		 );
	}
);

$("div#committees h2 a").toggle(
	function() {
		 $("div#committees").animate({
			marginTop: 297 - paneHeight,
			height: 37 + paneHeight
			}, 800,
			function(){
			   $("div#committees h2 a").removeClass("up");
			}
		 );
	},
	function() {
		 $("div#committees").animate({
			marginTop: 260,
			height: 37
			}, 800,
			function(){
			   $("div#committees h2 a").addClass("up");
			}
		 );
	}
);


$("div#departments h2 a").toggle(
	function() {
		 $("div#departments").animate({
			marginTop: 260,
			height: 37
			}, 800,
			function(){
			   $("div#departments h2 a").addClass("up");
			}
		 );
	},
	function() {
		 $("div#departments").animate({
			marginTop: 297 - paneHeight,
			height: 37 + paneHeight
			}, 800,
			function(){
			   $("div#departments h2 a").removeClass("up");
			}
		 );
	}
);



// End your code here
});
 
// Trying to limit supersleight in IE, but it breaks the overflow:hidden attribute.
// supersleight.init();
// supersleight.limitTo('departments');
