
function gotohell(director) {
  $('#author-info-' + director).toggle(); // Toggle author info
}

function deleteCookie(e) {
  e.preventDefault();
	$.cookie('no-effect', null);
	window.location.reload();
}

$(document).ready(function() {
  var effect = $.cookie('no-effect');
	if (effect == null) {
	  $('div#bytes-header').append('<span style="float:right;font-size:13px;color:green;font-weight:bold;">The byte-fall effect is turned on</span>');
		var delay = 0;
		var arr = jQuery.makeArray($("div.content"));
		arr.reverse();
		$(arr).each(function() {
			$(this).delay(delay).slideDown(800);
			delay += 1500;
		});
		$.cookie('no-effect', 'true');
	} else {
	 $('div.content').each(function() { $(this).show(); });
	 $('div#bytes-header').append('<span style="float:right;font-size:13px;font-weight:bold;color:red;">The byte-fall effect is turned off (<a href="javascript:;" id="toggleeffect">Turn on</a>)</span>');
	}
  $('a#toggleeffect').click(deleteCookie);
  
	// Hide initially
	$('div.about-seminars').hide();
	$('div.about-itbytes').hide();
	$('div.about-career').hide();
	$('a#about-seminars').click(function() {
	  $('div.about-workshops').hide();
	  $('div.about-itbytes').hide();
	  $('div.about-career').hide();
	  $('div.about-seminars').fadeIn();
	});
	$('a#about-workshops').click(function() {
	  $('div.about-seminars').hide();
	  $('div.about-career').hide();
	  $('div.about-itbytes').hide();
	  $('div.about-workshops').fadeIn();
	});
	$('a#about-itbytes').click(function() {
	  $('div.about-seminars').hide();
	  $('div.about-workshops').hide();
	  $('div.about-career').hide();
	  $('div.about-itbytes').fadeIn();
	});
	$('a#about-career').click(function() {
	  $('div.about-seminars').hide();
	  $('div.about-workshops').hide();
	  $('div.about-itbytes').hide();
	  $('div.about-career').fadeIn();
	});
});
