// JavaScript Document
$(document).ready(function() {

	Shadowbox.init({
		animate: false,
		overlayOpacity: 0.7,
		displayNav: false,
		handleOversize: 'none'
	});
	

	$(window).bind("resize", function(){
		var $container = $("#container");
		var $footer = $("#footer");
		var wh = $(window).height();
		if ($container.height()<wh){
			$footer.css("position", "absolute");
			$footer.css("bottom", 0);
			$container.css("height", wh+"px");
			if ( !jQuery.browser.msie )
				$container.trigger("resize");
		} else {
			$footer.css("position", "relative");
		}
	}).trigger("resize");

	$("a.popup_link").click(function() {
		var $this = $(this);
		var popup_div = $($this.attr('href'));
	
		// open a welcome message as soon as the window loads
		Shadowbox.open({
			content:    popup_div.html(),
			player:     "html",
			title:      false,
			height:     popup_div.height()+80,
			width:      popup_div.width()+80
		});
		return false;
	});

});
