$(document).ready(function() {
	  /* Load Navigation */
	  var nav = { movie:"/swf/nav.swf", width:"369", height:"82",
      majorversion:"6", build:"40", flashvars:"currentSection=" + $("body").attr("id") };
      UFO.create(nav, "navigation");

	  $("a#email_link").click(function(event) {
	  	window.frames['rsframe'].location.replace("/misc/contact.html");
	  	event.preventDefault();
	  });
      
	  var home_animation = { movie:"/swf/dman_brief.swf", width:"100%", height:"100%",
      majorversion:"6", build:"40" };
      UFO.create(home_animation, "home_animation");
      
	  var approach_animation = { movie:"/swf/approach.swf", width:"766", height:"233",
      majorversion:"6", build:"40" };
      UFO.create(approach_animation, "approach_animation");

	  var process_animation = { movie:"/swf/process.swf", width:"220", height:"284",
      majorversion:"6", build:"40" };
      UFO.create(process_animation, "process_animation");
      
	  var map_newark = { movie:"/swf/newark.swf", width:"400", height:"371",
      majorversion:"6", build:"40" };
      UFO.create(map_newark, "map_newark");

	  var map_lincoln = { movie:"/swf/lincoln.swf", width:"400", height:"371",
      majorversion:"6", build:"40" };
      UFO.create(map_lincoln, "map_lincoln");
      
   	$(function()
	{
   		$(".popup").popupwindow();
   	});


	  $("div#portfolio_browser a").click(function(){
		  $("div#photo img").hide().attr({"src": $(this).attr("href"), "title": $("> img", this).attr("title")});
		  $("h3#caption").empty();
		  
		  $("h3#caption").hide().prepend($("> img", this).attr("alt"));
		  $("h3#weblink a").hide().attr({"href": $("> img", this).attr("longdesc")});
	      return false;
	  });
	  
	$('#news_box').innerfade({
		animationtype: 'fade',
		speed: 1000,
		timeout: 5000,
		containerheight: '122px'
	});

      $("div#photo>img").load(function(){$("div#photo>img:hidden").fadeIn("slow");
      	   									 $("h3#caption").fadeIn("fast");
      	   									 $("h3#weblink a").fadeIn("fast");      
      }
      );

});