/*
  Marijn Akkermans
  Copyright (C) 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() {
	$("#logo").click(function() {
		$("#menu").show();
		$(this).hide();
	});

	$("#home").click(function() {
		location.href = $("a", this).attr("href");
	});

	$("a[href^=http://]").click(function() {
		window.open(this.href);
		this.blur();
		return false;
	});
});

$(window).resize(function() {
	var works = $("#works");
	works.css("left", Math.max(0, ($(window).width()-works.width())/2));
	works = $(".home #works");
	if (works.length) {
		works.css("top", ($(window).height()-works.height())/2);
	}
	var work = $("#image");
	var img = work.find("img");
	work.css({
		left: Math.max(175, ($(window).width()-img.width())/2),
		top: Math.max(0, ($(window).height()-img.height())/2)
	});
	work.css("visibility", "visible");
});

$(window).load(function() {
	$(window).resize();
});

