/*
  SUB office
  Copyright (C) 2010 by Systemantics, Bureau for Informatics

  Systemantics GmbH
  Am Lavenstein 3
  52064 Aachen
  GERMANY

  Web:    www.systemantics.net
  Email:  mail@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() {
	$(".post").each(function() {
		$("img", this).closest("a").insertAfter($("h3", this)).wrapAll('<div class="images"></div>').wrap('<div></div>');
	});

	if (!($.browser.msie && $.browser.version=="6.0")) {
		$(".images, .others").each(function() {
			var orig = $(this);
			var dupe = orig.clone();
			dupe
				.css({
					position: "absolute",
					left: $(orig).offset().left+"px",
					top: $(orig).offset().top+"px"
				})
				.appendTo("body");
			orig.css("opacity", "0.001");
		});
		
		$('<div id="shadow"></div>')
			.css("background", "transparent url(/wp-content/themes/suboffice/elements/back_0"+Math.ceil(Math.random()*4)+".png) top left no-repeat")
			.width($(window).width())
			.height(Math.max($(window).height(), $("#page").height()+$("#page").offset().top))
			.appendTo("body");
	} else {
		$("body").css("background", "transparent url(/wp-content/themes/suboffice/elements/back_0"+Math.ceil(Math.random()*4)+".gif) top left no-repeat");
	}
});

