// JavaScript Document
jQuery(function($) {
		Veil.toOpen.easing = "easeInOutQuad";
		Veil.toClose.easing = "easeInOutQuad";
		
		Veil.hide(".answer", {duration:10,easing:"jswing"});
		
		$(".question").click(function() {
			var r = 125;
			var h = $(this).siblings().innerHeight();
			
			if( $(this).siblings().children().is(":hidden") ) {
				$(this).siblings().children().show();
				h = $(this).siblings().innerHeight()
				$(this).siblings().children().hide();
			}
			
			Veil.toOpen.duration = ( (h < r*2) ? h : r*2) / 125 * 1000;
			Veil.toClose.duration = Veil.toOpen.duration * .6;
			if( !$(this).siblings().is(":animated") ) {
				$(this).parent().toggleClass("ctrl-expand");
				Veil.showHide("#" + $(this).parent().attr("id") + " .answer");
			}
		});
});