/*
  NEXT Architects
  Copyright (C) 2007-2010 by Systemantics, Bureau for Informatics

  Systemantics GmbH
  Am Lavenstein 3
  52064 Aachen
  GERMANY

  Web:    www.systemantics.net
  Email:  hello@systemantics.net

  Permission granted to use the files associated with this
  website only on your webserver.

  Changes to these files are PROHIBITED due to license restrictions.
*/



$(function() {
	$(".projects #navigation,.blog #navigation")
		.append('<div id="menu2"><img src="/elements/loading.gif" alt="Loading ..." /></div>')
		.wrapInner("<div></div>");
	$(".projects #menu1 a:not(.project),.blog #menu1 a:not(.project)").click(function() {
		this.blur();
		$(this).addClass("selected");
		var href = this.href;
		$("#navigation > div")
			.animate({marginLeft: "-132px"}, 500)
			.queue(function() {
				location.href = href;
			});
		return false;
	});
	$(".projects #previous a,.blog #previous a").click(function() {
		this.blur();
		var href = this.href;
		if (href!=location.href && !$("#menu1 .selected").hasClass("project")) {
			$("#menu0 .selected").removeClass("selected");
			$("#navigation > div")
				.animate({marginLeft: "132px"}, 500)
				.queue(function() {
					$("#navigation").prepend('<img src="/elements/loading.gif" alt="Loading ..." />');
					location.href = href;
				});
			return false;
		}
	});
});

