jQuery.noConflict();
var popup$ = jQuery;

popup$.popup = {
	init: function() {
		for (module in popup$.popup) {
			if (popup$.popup[module].init)
				popup$.popup[module].init();
		}
	}
};

popup$(document).ready(popup$.popup.init);


popup$.popup.click = {
	init: function() {
		popup$('a.popup').bind('click', this.click);
		popup$('area.popup').bind('click', this.click);
		popup$('a.access_map_popup').bind('click', this.click2);
		popup$('a.comments_popup').bind('click', this.click3);
		popup$('a.event_popup').bind('click', this.click4);
	},
	click: function() {
		var w = window.open(this.href,"");
		w.focus();
		return false;
	},
	click2: function() {
		var features='width=960, height=640, location=no, menubar=no, status=no, scrollbars=no, resizable=no, toolbar=no';
		if (window.screen.width > 960) features+=", left="+(window.screen.width-960)/2;
		else features+=", width="+960;
		if (window.screen.height > 640) features+=", top="+(window.screen.height-640)/2;
		else features+=", height="+640;
		var w = window.open(this.href,'access_map',features);
		w.focus();
		return false;
	},
	click3: function() {
		var features='width=960, height=640, location=no, menubar=no, status=no, scrollbars=no, resizable=no, toolbar=no';
		if (window.screen.width > 960) features+=", left="+(window.screen.width-960)/2;
		else features+=", width="+960;
		if (window.screen.height > 540) features+=", top="+(window.screen.height-540)/2;
		else features+=", height="+540;
		var w = window.open(this.href,'comments',features);
		w.focus();
		return false;
	},
	click4: function() {
		var features='width=740, height=640, location=no, menubar=no, status=no, scrollbars=yes, resizable=no, toolbar=no';
		if (window.screen.width > 740) features+=", left="+(window.screen.width-740)/2;
		else features+=", width="+740;
		if (window.screen.height > 640) features+=", top="+(window.screen.height-640)/2;
		else features+=", height="+640;
		var w = window.open(this.href,'event',features);
		w.focus();
		return false;
	}
};
